[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-ti33x-psp-3.2 / 3.2.1 / 0006-offb-Fix-bug-in-calculating-requested-vram-size.patch
1 From fa2fd2a2567605b97f702458ad603c502d680b8e Mon Sep 17 00:00:00 2001
2 From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
3 Date: Tue, 3 Jan 2012 12:09:15 +1100
4 Subject: [PATCH 06/49] offb: Fix bug in calculating requested vram size
6 commit c055fe0797b7bd8f6f21a13598a55a16d5c13ae7 upstream.
8 We used to try to request 8 times more vram than needed, which would
9 fail if the card has a too small BAR (observed with qemu & kvm).
11 Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 ---
14 drivers/video/offb.c | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
17 diff --git a/drivers/video/offb.c b/drivers/video/offb.c
18 index 24e1fc6..3251a02 100644
19 --- a/drivers/video/offb.c
20 +++ b/drivers/video/offb.c
21 @@ -377,7 +377,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
22 int pitch, unsigned long address,
23 int foreign_endian, struct device_node *dp)
24 {
25 - unsigned long res_size = pitch * height * (depth + 7) / 8;
26 + unsigned long res_size = pitch * height;
27 struct offb_par *par = &default_par;
28 unsigned long res_start = address;
29 struct fb_fix_screeninfo *fix;
30 --
31 1.7.9.4