From 037bc69fde7e66511781ebd3fb3f712056fc1ff2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Syrj=C3=A4l=C3=A4?= Date: Fri, 12 Feb 2016 21:28:54 +0200 Subject: [PATCH] lib/igt_fb: Fix gen2 and 915 Y tile sizes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit gen2 tile dimensions are 128x32 for both X and Y tiling 915 tile dimensions are 512x8 for both X and Y tiling Fix igt_get_fb_tile_size() to return the correct Y tile dimensions for these platforms. X tile was fine already. Cc: Paulo Zanoni Signed-off-by: Ville Syrjälä --- lib/igt_fb.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/igt_fb.c b/lib/igt_fb.c index 6a816a24..7b535560 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -93,11 +93,16 @@ static void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp, } break; case LOCAL_I915_FORMAT_MOD_Y_TILED: - if (IS_915(devid)) - *width_ret = 512; - else + if (intel_gen(devid) == 2) { *width_ret = 128; - *height_ret = 32; + *height_ret = 16; + } else if (IS_915(devid)) { + *width_ret = 512; + *height_ret = 8; + } else { + *width_ret = 128; + *height_ret = 32; + } break; case LOCAL_I915_FORMAT_MOD_Yf_TILED: switch (fb_bpp) {