summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/igt_fb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index a02b36211..92899aa8b 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -483,6 +483,13 @@ static uint64_t calc_plane_size(struct igt_fb *fb, int plane)
igt_get_fb_tile_size(fb->fd, fb->tiling, fb->plane_bpp[plane],
&tile_width, &tile_height);
+ /* Special case where the "tile height" represents a
+ * height-based stride, such as with VC4 SAND tiling modes.
+ */
+
+ if (tile_height > fb->plane_height[plane])
+ return fb->strides[plane] * tile_height;
+
return (uint64_t) fb->strides[plane] *
ALIGN(fb->plane_height[plane], tile_height);
}