[PATCH i-g-t 28/37] lib/vebox: Add 10bpc support

Ville Syrjala ville.syrjala at linux.intel.com
Tue Jul 2 23:28:08 UTC 2024


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

Add specific 10bpc support for VEBOX.

FIXME: This just hangs the VEBOX :(
       Bspec did have some notes that this is only
       supported for IECP on earlier platforms, but
       that restriction is no longer listed for more modern
       stuff, but maybe it's still there?

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

diff --git a/lib/veboxcopy_gen12.c b/lib/veboxcopy_gen12.c
index af52a96578d9..fedefb0842a2 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:
@@ -344,7 +347,8 @@ void gen12_vebox_copyfunc(struct intel_bb *ibb,
 	case 32:
 		igt_assert(!src->format_is_yuv_semiplanar);
 		format = src->format_is_yuv ? PACKED_444A_8 :
-					      R8G8B8A8_UNORM;
+			 src->depth == 30 ? R10G10B10A2_UNORM :
+					    R8G8B8A8_UNORM;
 		break;
 	case 64:
 		igt_assert(!src->format_is_yuv_semiplanar);
-- 
2.44.2



More information about the igt-dev mailing list