[igt-dev] [PATCH i-g-t 3/3] lib/igt_fb: Remove redundant VC4 SAND plane size alignment

Imre Deak imre.deak at intel.com
Thu Apr 29 19:26:28 UTC 2021


Special casing the tile_height > plane_height by rounding up the
plane_height to tile_height is redundant, since in that case the
following return statement will do exactly the same. Remove the special
casing.

The only exception would be if plane_height was 0, but the commit adding the
special case doesn't mention this as a possiblity and I presume that as an
framebuffer configuration.

Cc: Paul Kocialkowski <paul.kocialkowski at bootlin.com>
Cc: Lyude Paul <lyude at redhat.com>
Cc: Maxime Ripard <maxime.ripard at bootlin.com>
Signed-off-by: Imre Deak <imre.deak at intel.com>
---
 lib/igt_fb.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 209bfacf0..f8f02766e 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -801,13 +801,6 @@ static uint64_t calc_plane_size(struct igt_fb *fb, int plane)
 		if (is_gen12_ccs_modifier(fb->modifier))
 			tile_height *= 4;
 
-		/* 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);
 	}
-- 
2.27.0



More information about the igt-dev mailing list