summaryrefslogtreecommitdiff
path: root/lib/veboxcopy_gen12.c
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2021-05-01 04:50:43 +0300
committerImre Deak <imre.deak@intel.com>2021-05-05 16:20:23 +0300
commit839450de13473b0ec49e8037c57fa9667f6bc820 (patch)
treed4d7b6be8f9601e3d53deaae8d915bee915fe350 /lib/veboxcopy_gen12.c
parente2f8cf03a30c41ba373fe46c81ce2df5b533b1e0 (diff)
lib/veboxcopy_gen12: Add support for MC_CCS/XYUV8888 conversions
Use the AYUV encodings for both the surface format and the AUX page table tag. This matches the layout of XYUV8888, except for the missing alpha channel, and this is the closest format I found in bspec. Tested by igt/kms_plane and kms_ccs. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Juha-Pekka Heikkilä <juha-pekka.heikkila@intel.com>
Diffstat (limited to 'lib/veboxcopy_gen12.c')
-rw-r--r--lib/veboxcopy_gen12.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/veboxcopy_gen12.c b/lib/veboxcopy_gen12.c
index b4cd7bdd..17564493 100644
--- a/lib/veboxcopy_gen12.c
+++ b/lib/veboxcopy_gen12.c
@@ -28,6 +28,7 @@
#define YCRCB_NORMAL 0
#define PLANAR_420_8 4
+#define PACKED_444A_8 5
#define R8G8B8A8_UNORM 8
#define PLANAR_420_16 12
@@ -136,6 +137,7 @@ static bool format_is_interleaved_yuv(int format)
{
switch (format) {
case YCRCB_NORMAL:
+ case PACKED_444A_8:
case PLANAR_420_8:
case PLANAR_420_16:
return true;
@@ -279,9 +281,9 @@ void gen12_vebox_copyfunc(struct intel_bb *ibb,
YCRCB_NORMAL;
break;
case 32:
- igt_assert(!src->format_is_yuv &&
- !src->format_is_yuv_semiplanar);
- format = R8G8B8A8_UNORM;
+ igt_assert(!src->format_is_yuv_semiplanar);
+ format = src->format_is_yuv ? PACKED_444A_8 :
+ R8G8B8A8_UNORM;
break;
default:
igt_assert_f(0, "Unsupported bpp: %u\n", src->bpp);