From be6f3fadaf2c45972f7a9830baa6fd35f4d755a6 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Fri, 27 Nov 2015 12:13:41 -0200 Subject: lib/igt_fb: make the automatic buffer sizes/strides smaller The big motivation behind this patch is that the current power-of-two granularity from igt_fb is way too big. There was more than one occasion where I had to work around this problem on kms_frontbuffer_tracking, and during my last workaround I was requested to just make igt_fb use more minimal buffers. I also need to export the size computation function so I won't need to reimplement it inside kms_frontbuffer_tracking. v2: - Fix the Yf sizes (Ville). - Don't change the Gen 2/3 behavior for both tiled and non-tiled. v3: - Edit the commit message, clarify that v1 was wrongly treating gen 2/3 non-tiled as tiled (Chris). Requested-by: Daniel Vetter Acked-by: Daniel Vetter Signed-off-by: Paulo Zanoni --- lib/igt_fb.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/igt_fb.h') diff --git a/lib/igt_fb.h b/lib/igt_fb.h index 5cc8644d..064027cb 100644 --- a/lib/igt_fb.h +++ b/lib/igt_fb.h @@ -69,6 +69,8 @@ enum igt_text_align { align_hcenter = 0x08, }; +void igt_calc_fb_size(int fd, int width, int height, int bpp, uint64_t tiling, + unsigned *size_ret, unsigned *stride_ret); unsigned int igt_create_fb_with_bo_size(int fd, int width, int height, uint32_t format, uint64_t tiling, -- cgit v1.2.3