[igt-dev] [PATCH i-g-t 15/17] tests/kms_draw_crc: Use 4 tiling when filling framebuffer

Jeevan B jeevan.b at intel.com
Mon Feb 7 18:21:50 UTC 2022


From: Mika Kahola <mika.kahola at intel.com>

For platforms with 4 tiling, let's use 4 tiling instead of Y tiling.

Signed-off-by: Mika Kahola <mika.kahola at intel.com>
Signed-off-by: Jeevan B <jeevan.b at intel.com>
---
 tests/i915/kms_draw_crc.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/i915/kms_draw_crc.c b/tests/i915/kms_draw_crc.c
index 6348e803..d34cd46b 100644
--- a/tests/i915/kms_draw_crc.c
+++ b/tests/i915/kms_draw_crc.c
@@ -223,6 +223,7 @@ static void fill_fb_subtest(void)
 	int rc;
 	struct igt_fb fb;
 	igt_crc_t base_crc, crc;
+	bool has_4tile = intel_get_device_info(intel_get_drm_devid(drm_fd))->has_4tile;
 
 	igt_create_fb(drm_fd, ms.mode->hdisplay, ms.mode->vdisplay,
 		      DRM_FORMAT_XRGB8888, DRM_FORMAT_MOD_LINEAR, &fb);
@@ -245,7 +246,9 @@ static void fill_fb_subtest(void)
 	igt_assert_crc_equal(&crc, &base_crc);
 
 	if (intel_display_ver(intel_get_drm_devid(drm_fd)) >= 9) {
-		get_fill_crc(I915_FORMAT_MOD_Y_TILED, &crc);
+		get_fill_crc(has_4tile ?
+			     I915_FORMAT_MOD_4_TILED : I915_FORMAT_MOD_Y_TILED,
+			     &crc);
 		igt_assert_crc_equal(&crc, &base_crc);
 	}
 
-- 
2.17.1



More information about the igt-dev mailing list