aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-01-03 12:09:15 +1100
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-12 11:40:01 -0800
commit0a3a07f15b5324eaeda9cd95e86e62fd44ad19b0 (patch)
tree43eb954f22ff60eaadcf6d92a9a07715ee110911 /drivers
parentaef3cb6ca5ff47d3f36aa95ca73d370642b099aa (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')
-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 f1e900343ff4..dbc8274281e8 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,
int pitch, unsigned long address,
int foreign_endian, struct device_node *dp)
{
- unsigned long res_size = pitch * height * (depth + 7) / 8;
+ unsigned long res_size = pitch * height;
struct offb_par *par = &default_par;
unsigned long res_start = address;
struct fb_fix_screeninfo *fix;