From 3c511f4f49da2245f416719d4b5363e26da6a8cd Mon Sep 17 00:00:00 2001 From: hjc Date: Wed, 7 May 2014 14:33:10 +0800 Subject: [PATCH] rk fb: fb mem alloc 32 align for special resolution --- drivers/video/rockchip/rk_fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/rockchip/rk_fb.c b/drivers/video/rockchip/rk_fb.c index 9aff1558fa03..106c48c22fd1 100755 --- a/drivers/video/rockchip/rk_fb.c +++ b/drivers/video/rockchip/rk_fb.c @@ -2687,7 +2687,7 @@ static int rk_fb_alloc_buffer(struct fb_info *fbi, int fb_id) win = dev_drv->win[win_id]; if (!strcmp(fbi->fix.id, "fb0")) { - fb_mem_size = 3 * (fbi->var.xres * fbi->var.yres) << 2; + fb_mem_size = 3 * (((fbi->var.xres + 31)&(~31))* fbi->var.yres) << 2; fb_mem_size = ALIGN(fb_mem_size, SZ_1M); #if defined(CONFIG_ION_ROCKCHIP) handle = ion_alloc(rk_fb->ion_client, (size_t)fb_mem_size, 0, ION_HEAP(ION_CMA_HEAP_ID), 0); -- 2.34.1