Skip to contentSkip to conversation

Fix vesafb with large memory, this time properly

PATCH In review Adam Mercer 2 participants 2 messages May 15, 2003 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix vesafb with large memory, this time properly

Marcelo

Thanks for apply my previous patch, but Geert Uytterhoeven noticed the following problem with it

Quoted 3 lines

video_size must be in bytes, hence it must be

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

The attached patch, against 2.4.21-rc2, fixes this

Cheers

Adam

drivers/video/vesafb.c +1 -1
diff -urN linux-2.4.21-rc2/drivers/video/vesafb.c linux-2.4.21-rc2-patched/drivers/video/vesafb.c
@@ -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_width *	screen_info.lfb_height * video_bpp;
+	video_size          = screen_info.lfb_width *	screen_info.lfb_height * video_bpp / 8;
 	video_visual = (video_bpp == 8) ?
 		FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
 
#1 lore raw
Quoted 8 lines

Thanks for apply my previous patch, but Geert Uytterhoeven noticed the following problem with it

Quoted 3 lines

video_size must be in bytes, hence it must be

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

The attached patch, against 2.4.21-rc2, fixes this

Thanks for fixing this.

Fred