[PATCH i-g-t] tests/kms_getfb: Add GEN12 CCS format modifier

Mika Kahola mika.kahola at intel.com
Tue Nov 19 11:15:00 UTC 2019


We need to add GEN12 specific format modifier for getfb-reject-ccs
subtest.

Signed-off-by: Mika Kahola <mika.kahola at intel.com>
---
 tests/kms_getfb.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/kms_getfb.c b/tests/kms_getfb.c
index ca0b01c0..5a1d54a9 100644
--- a/tests/kms_getfb.c
+++ b/tests/kms_getfb.c
@@ -91,6 +91,11 @@ static void get_ccs_fb(int fd, struct drm_mode_fb_cmd2 *ret)
 	igt_require(has_addfb2_iface(fd));
 	igt_require_intel(fd);
 
+	if ((intel_gen(intel_get_drm_devid(fd))) >= 12) {
+		add.modifier[0] = I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS;
+		add.modifier[1] = add.modifier[0];
+	}
+
 	/* An explanation of the magic numbers can be found in kms_ccs.c. */
 	add.pitches[0] = ALIGN(add.width * 4, 128);
 	add.offsets[1] = add.pitches[0] * ALIGN(add.height, 32);
-- 
2.17.1



More information about the Intel-gfx-trybot mailing list