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

Maxime Ripard
2019-01-08T15:20:03Z

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

Signed-off-by: Maxime Ripard <maxime.ripard@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 00db2ee57cad..6ab4e3039166 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