[igt-dev] [PATCH i-g-t v3 02/14] igt: fb: Reduce tile size alignment for non intel platforms

Maxime Ripard maxime.ripard at bootlin.com
Tue Jan 22 13:42:45 UTC 2019


Aligning the width on 64 pixels only make sense on intel platforms, make
sure to add a check against this.

Reviewed-by: Paul Kocialkowski <paul.kocialkowski at bootlin.com>
Signed-off-by: Maxime Ripard <maxime.ripard at bootlin.com>
---
 lib/igt_fb.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index e23908e28c07..1a5c338ea532 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -204,7 +204,11 @@ void igt_get_fb_tile_size(int fd, uint64_t tiling, int fb_bpp,
 {
 	switch (tiling) {
 	case LOCAL_DRM_FORMAT_MOD_NONE:
-		*width_ret = 64;
+		if (is_i915_device(fd))
+			*width_ret = 64;
+		else
+			*width_ret = 1;
+
 		*height_ret = 1;
 		break;
 	case LOCAL_I915_FORMAT_MOD_X_TILED:
-- 
2.20.1



More information about the igt-dev mailing list