[PATCH i-g-t] lib/igt_fb: Align tile4 stride on Xe2 as if it was always compressed

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Fri Jun 28 13:14:05 UTC 2024


Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
 lib/igt_fb.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index ab162a5b7..c81cabded 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -827,7 +827,10 @@ static uint32_t calc_plane_stride(struct igt_fb *fb, int plane)
 		igt_get_fb_tile_size(fb->fd, fb->modifier, fb->plane_bpp[plane],
 				     &tile_width, &tile_height);
 
-		if (is_gen12_ccs_modifier(fb->modifier))
+		if (is_gen12_ccs_modifier(fb->modifier) ||
+		    (is_xe_device(fb->fd) &&
+		    intel_graphics_ver(intel_get_drm_devid(fb->fd)) >= IP_VER(20, 0) &&
+		    fb->modifier == I915_FORMAT_MOD_4_TILED))
 			tile_align = 4;
 
 		return ALIGN(min_stride, tile_width * tile_align);
-- 
2.43.2



More information about the igt-dev mailing list