summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorImre Deak <imre.deak@intel.com>2021-10-26 20:44:59 +0300
committerImre Deak <imre.deak@intel.com>2021-11-02 18:00:48 +0200
commitc712ecac599add7e877883a7c8e2857d3c19836f (patch)
tree7df42a9dbc58b2afcf7eec0b5155feb313e3af09
parentbd361e81d653093b05821127296a843accfa58d4 (diff)
lib/igt_fb/tgl+: Prevent CCS FB AUX surface size overalignment
So far the page alignment of the size of CCS AUX surfaces was ensured by aligning the height of the surface to 64, which multiplied by the 64 byte CCS tile width resulted in the multiple of a 4k value. This can overallocate the CCS surface up to ~1/4th of one main surface tile-row size. Avoid the overallocation by simply aligning the size to 4k. Signed-off-by: Imre Deak <imre.deak@intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
-rw-r--r--lib/igt_fb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 67e63d48..92a0170c 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -827,8 +827,8 @@ static uint64_t calc_plane_size(struct igt_fb *fb, int plane)
uint64_t size;
/* The AUX CCS surface must be page aligned */
- size = (uint64_t)fb->strides[plane] *
- ALIGN(fb->plane_height[plane], 64);
+ size = ALIGN((uint64_t)fb->strides[plane] *
+ fb->plane_height[plane], 4096);
return size;
} else {