Skip to content

Commit

Permalink
offb: Fix bug in calculating requested vram size
Browse files Browse the repository at this point in the history
commit c055fe0 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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
ozbenh authored and gregkh committed Jan 12, 2012
1 parent dfedad6 commit 69236e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/offb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 69236e6

Please sign in to comment.