[PATCH i-g-t v2 13/18] lib/vebox: Document that 2:10:10:10 is unusable with VEBOX

Ville Syrjala ville.syrjala at linux.intel.com
Wed Sep 18 12:05:13 UTC 2024


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

VEBOX has a specific format for R10G10B10A2_UNORM, but it
just hangs the engine if you try to use it.

For most platforms bsepc says: "Valid format only for when
IECP is enabled and in output state only. Not supported in
HSB mode."

Document this fact so that the next fella doesn't try to
implement it like I did :/

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 lib/veboxcopy_gen12.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/veboxcopy_gen12.c b/lib/veboxcopy_gen12.c
index af52a96578d9..4e3aefaf1f44 100644
--- a/lib/veboxcopy_gen12.c
+++ b/lib/veboxcopy_gen12.c
@@ -29,6 +29,7 @@
 #define YCRCB_NORMAL	0
 #define PLANAR_420_8	4
 #define PACKED_444A_8	5
+#define R10G10B10A2_UNORM	7
 #define R8G8B8A8_UNORM	8
 #define PACKED_444_16	9
 #define PLANAR_420_16	12
@@ -168,6 +169,8 @@ static uint32_t compression_format(int format, struct intel_buf *buf)
 	switch (format) {
 	case R16G16B16A16:
 		return 0x1;
+	case R10G10B10A2_UNORM:
+		return 0xe;
 	case R8G8B8A8_UNORM:
 		return 0xa;
 	case PLANAR_420_8:
@@ -343,6 +346,15 @@ void gen12_vebox_copyfunc(struct intel_bb *ibb,
 		break;
 	case 32:
 		igt_assert(!src->format_is_yuv_semiplanar);
+		/*
+		 * R10G10B10A2_UNORM is not usable.
+		 *
+		 * Bspec says: "Valid format only for when IECP is enabled
+		 * and in output state only. Not supported in  HSB mode."
+		 *
+		 * VEBOX hangs if you try use it.
+		 */
+		igt_assert(src->depth != 30);
 		format = src->format_is_yuv ? PACKED_444A_8 :
 					      R8G8B8A8_UNORM;
 		break;
-- 
2.44.2



More information about the igt-dev mailing list