Skip to contentSkip to conversation

Fix vesafb with large memory

PATCH Geert Uytterhoeven 1 participant 1 message May 8, 2003 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 36 lines · Linux Kernel Mailing List

ChangeSet 1.1199, 2003/05/06 22:04:11-03:00, [email protected]

[PATCH] Fix vesafb with large memory

Hi

I've recently been having a problem with the vesafb refusing to boot on my system, after investigation the problem further I found that it had been mentioned on the 27 March 2003, in this thread

http://marc.theaimsgroup.com/?l=linux-kernel&m=104878364823195&w=2

In the thread Walt H, waltabbyh <at> comcast <dot> net, provides a fix. After just downloading 2.4.21-rc1 I noticed that this fix was not present. So heres a patch against 2.4.21-rc1 to fix this probelm.

Please CC me with any responses as I'm not on the list.

Cheers

Adam

# This patch includes the following deltas:
# ChangeSet 1.1198 -> 1.1199
# drivers/video/vesafb.c 1.7 -> 1.8
#

 vesafb.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -Nru a/drivers/video/vesafb.c b/drivers/video/vesafb.c

drivers/video/vesafb.c line 525

Quoted 7 lines
drivers/video/vesafb.c +1 -1
@@ -520,7 +520,7 @@
 	video_width         = screen_info.lfb_width;
 	video_height        = screen_info.lfb_height;
 	video_linelength    = screen_info.lfb_linelength;
-	video_size          = screen_info.lfb_size * 65536;
+	video_size          = screen_info.lfb_width *	screen_info.lfb_height * video_bpp;
 	video_visual = (video_bpp == 8) ?
 		FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;

video_size must be in bytes, hence it must be

    video_size = screen_info.lfb_width*screen_info.lfb_height*video_bpp/8;

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds