[igt-dev] [PATCH RFC i-g-t 03/10] tests/kms_ccs: Add GEN12 CCS render compression format modifiers

Mika Kahola
2019-09-25T13:09:40Z

Add GEN12 CCS format modifiers for render compression.

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

diff --git a/tests/kms_ccs.c b/tests/kms_ccs.c
index 1ce66cde..cde62416 100644
--- a/tests/kms_ccs.c
+++ b/tests/kms_ccs.c
@@ -75,6 +75,10 @@ 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,
+};
+
/*
* 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 +311,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);