[lkml]   [2003]   [Jun]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] 2.4.21-rc8 vesafb memory remapping...
I noticed that the vesafb still remaps memory according to a calculation 
done in bits, even if should be done in bytes...
This will remap more memory than old cards actually have...

An example:
My laptop has 8192 KB of videoram
I use it with videomode 1024x768x16

With current vesafb that will translate to 12288 KB remapping

So here is my suggestion,
either grab the complete "fix" from rc7-ac1 (wich calculates in bytes),
or If you dont like that, my second suggestion is to use the
old vesafb code to take care of old cards like this:

----- cut -----
#diff -u rc8/drivers/video/vesafb.c rc8/drivers/video/
--- rc8/drivers/video/vesafb.c 2003-06-12 23:13:29.000000000 +0300
+++ rc8/drivers/video/ 2003-06-12 23:18:03.000000000 +0300
@@ -521,6 +521,11 @@
video_height = screen_info.lfb_height;
video_linelength = screen_info.lfb_linelength;
video_size = screen_info.lfb_width *
screen_info.lfb_height * video_bpp;
+ /* check that we don't remap more memory than old cards have */
+ if (video_size > screen_info.lfb_size * 65536)
+ video_size = screen_info.lfb_size * 65536;
video_visual = (video_bpp == 8) ?

----- cut -----
Like this we would keep both old and new systems happy AFAIK...


Thomas Backlund

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:36    [W:0.030 / U:26.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site