aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-01-02 20:09:15 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-12 14:35:00 -0500
commit68530d7210025a1e395819b774fcffaf943dd8f3 (patch)
treec62e164e108dff0c5807228af221b80d63a5a389 /drivers/video
parent51a32a1a373e071aec24ffa765d198d591b3d6dd (diff)
offb: Fix bug in calculating requested vram size
commit c055fe0797b7bd8f6f21a13598a55a16d5c13ae7 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/video')
-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 24e1fc6b565..3251a0236d5 100644
--- a/drivers/video/offb.c
+++ b/drivers/video/offb.c
@@ -377,7 +377,7 @@ static void __init offb_init_fb(const char *name, const char *full_name,
377 int pitch, unsigned long address, 377 int pitch, unsigned long address,
378 int foreign_endian, struct device_node *dp) 378 int foreign_endian, struct device_node *dp)
379{ 379{
380 unsigned long res_size = pitch * height * (depth + 7) / 8; 380 unsigned long res_size = pitch * height;
381 struct offb_par *par = &default_par; 381 struct offb_par *par = &default_par;
382 unsigned long res_start = address; 382 unsigned long res_start = address;
383 struct fb_fix_screeninfo *fix; 383 struct fb_fix_screeninfo *fix;