[igt-dev] [PATCH i-g-t 4/4] lib/igt_fb/tgl+: Prevent CCS FB AUX surface size overalignment
Imre Deak
imre.deak at intel.com
Tue Oct 26 21:26:20 UTC 2021
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 at intel.com>
---
lib/igt_fb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index ddb530c99..1ad64506f 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 {
--
2.27.0
More information about the igt-dev
mailing list