From a53658ebbb9aedd85a3a73cf6d3911aed627ae29 Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Thu, 18 Apr 2019 19:13:56 +0300 Subject: lib/igt_fb: Fix the cairo shadow buffer stride MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We're currently overallocating the shadow buffer stride by a factor of 8. This didn't go down so well when I tried to use a 16kx16k float framebuffer. Cc: Maarten Lankhorst Fixes: b0033d9310c1 ("lib/color_encoding: Prepare support for HDR modes, v2.") Signed-off-by: Ville Syrjälä Reviewed-by: Chris Wilson --- lib/igt_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/igt_fb.c b/lib/igt_fb.c index b4d35482..f3609680 100644 --- a/lib/igt_fb.c +++ b/lib/igt_fb.c @@ -1911,7 +1911,7 @@ static void *igt_fb_create_cairo_shadow_buffer(int fd, drm_format, LOCAL_DRM_FORMAT_MOD_NONE, IGT_COLOR_YCBCR_BT709, IGT_COLOR_YCBCR_LIMITED_RANGE); - shadow->strides[0] = ALIGN(width * shadow->plane_bpp[0], 16); + shadow->strides[0] = ALIGN(width * (shadow->plane_bpp[0] / 8), 16); shadow->size = ALIGN(shadow->strides[0] * height, sysconf(_SC_PAGESIZE)); ptr = mmap(NULL, shadow->size, PROT_READ | PROT_WRITE, -- cgit v1.2.3