[igt-dev] [PATCH i-g-t 5/5] tests/kms_ccs: Add GEN12 CCS format modifiers

Mika Kahola mika.kahola at intel.com
Mon Sep 9 13:07:08 UTC 2019


Add GEN12 CCS format modifiers for render and media
compression.

Signed-off-by: Mika Kahola <mika.kahola at intel.com>
---
 tests/kms_ccs.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index 1ce66cde..6d2ae840 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -75,6 +75,11 @@ static const uint64_t ccs_modifiers[] = {
 	LOCAL_I915_FORMAT_MOD_Yf_TILED_CCS,
 };
 
+static const uint64_t ccs_gen12_modifiers[] = {
+	LOCAL_I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS,
+	LOCAL_I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS,
+};
+
 /*
  * Limit maximum used sprite plane width so this test will not mistakenly
  * fail on hardware limitations which are not interesting to this test.
@@ -307,9 +312,16 @@ static int __test_output(data_t *data)
 
 	igt_output_set_pipe(data->output, data->pipe);
 
-	for (i = 0; i < ARRAY_SIZE(ccs_modifiers); i++) {
-		data->ccs_modifier = ccs_modifiers[i];
-		valid_tests += test_ccs(data);
+	if (intel_gen(intel_get_drm_devid(data->drm_fd)) >= 12) {
+		for (i = 0; i < ARRAY_SIZE(ccs_gen12_modifiers); i++) {
+			data->ccs_modifier = ccs_gen12_modifiers[i];
+			valid_tests += test_ccs(data);
+		}
+	} else {
+		for (i = 0; i < ARRAY_SIZE(ccs_modifiers); i++) {
+			data->ccs_modifier = ccs_modifiers[i];
+			valid_tests += test_ccs(data);
+		}
 	}
 
 	igt_output_set_pipe(data->output, PIPE_NONE);
-- 
2.17.1



More information about the igt-dev mailing list