From: Greg Hackmann Date: Wed, 29 Aug 2012 16:58:45 +0000 (-0700) Subject: gralloc: make sure rgb buffers have at least 1 line of padding X-Git-Tag: cm-10.1-M1~202 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3bad845cb63c86caa14fb2c43af4a1187834fec4;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos5.git gralloc: make sure rgb buffers have at least 1 line of padding The display controller may read up to 1 line past the end of the image Change-Id: Ibb6ed15d1c02d07fe955922249c71b7ce9bce0fc Signed-off-by: Greg Hackmann --- diff --git a/gralloc/gralloc.cpp b/gralloc/gralloc.cpp index 708f080..1c0180b 100644 --- a/gralloc/gralloc.cpp +++ b/gralloc/gralloc.cpp @@ -155,7 +155,7 @@ static int gralloc_alloc_rgb(int ionfd, int w, int h, int format, int usage, return -EINVAL; } bpr = ALIGN(w*bpp, 16); - vstride = ALIGN(h, 16); + vstride = ALIGN(h+1, 16); size = bpr * vstride; *stride = bpr / bpp; size = ALIGN(size, PAGE_SIZE);