aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/offb.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-01-02 20:09:15 -0500
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-01-02 20:09:15 -0500
commitc055fe0797b7bd8f6f21a13598a55a16d5c13ae7 (patch)
tree8fbf4ad76badf0458c6fe012efd98513fbbb8c5e /drivers/video/offb.c
parenteba3d97db876fe6f8bad64ecd9dc20133e7708ed (diff)
offb: Fix bug in calculating requested vram size
We used to try to request 8 times more vram than needed, which would fail if the card has a too small BAR (observed with qemu & kvm). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> CC: stable@kernel.org
Diffstat (limited to 'drivers/video/offb.c')
-rw-r--r--drivers/video/offb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/offb.c b/drivers/video/offb.c
index cb163a5397be..915acaecdbe1 100644
--- a/drivers/video/offb.c
+++ b/drivers/video/offb.c
@@ -381,7 +381,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
381 int pitch, unsigned long address, 381 int pitch, unsigned long address,
382 int foreign_endian, struct device_node *dp) 382 int foreign_endian, struct device_node *dp)
383{ 383{
384 unsigned long res_size = pitch * height * (depth + 7) / 8; 384 unsigned long res_size = pitch * height;
385 struct offb_par *par = &default_par; 385 struct offb_par *par = &default_par;
386 unsigned long res_start = address; 386 unsigned long res_start = address;
387 struct fb_fix_screeninfo *fix; 387 struct fb_fix_screeninfo *fix;