[PATCH i-g-t] tests/kms_ccs: Test XRGB2101010

Ville Syrjala ville.syrjala at linux.intel.com
Mon May 6 13:37:48 UTC 2024


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

I want to enable 10bpc CCS support for i915. To that end start
testing it.

Note that we are faking things a bit because rendercopy will
still use a 8:8:8:8 format here (plumbing the full pixel format,
as opposed to just bpp, would require quite a bit more work).
However this seems to work fine, I suspect due to:
- we only do 1:1: copies of data
- the compression is lossless

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

diff --git a/tests/intel/kms_ccs.c b/tests/intel/kms_ccs.c
index a5cb3b3b4f27..c91370a9abe7 100644
--- a/tests/intel/kms_ccs.c
+++ b/tests/intel/kms_ccs.c
@@ -197,6 +197,7 @@ static const struct {
 static const uint32_t formats[] = {
 	DRM_FORMAT_XYUV8888,
 	DRM_FORMAT_XRGB8888,
+	DRM_FORMAT_XRGB2101010,
 	DRM_FORMAT_YUYV,
 	DRM_FORMAT_NV12,
 	DRM_FORMAT_P012,
@@ -635,6 +636,7 @@ static uint32_t blt_compression_format(struct blt_copy_data *blt,
 {
 	switch (fb->drm_format) {
 	case DRM_FORMAT_XRGB8888:
+	case DRM_FORMAT_XRGB2101010:
 	case DRM_FORMAT_P010:
 	case DRM_FORMAT_P012:
 	case DRM_FORMAT_P016:
@@ -849,7 +851,8 @@ static bool try_config(data_t *data, enum test_fb_flags fb_flags,
 		return false;
 
 	if (is_ccs_cc_modifier(data->ccs_modifier) &&
-	    data->format != DRM_FORMAT_XRGB8888)
+	    data->format != DRM_FORMAT_XRGB8888 &&
+	    data->format != DRM_FORMAT_XRGB2101010)
 		return false;
 
 	if ((fb_flags & FB_MISALIGN_AUX_STRIDE) ||
-- 
2.43.2



More information about the igt-dev mailing list