Messages in this thread Patch in this message |  | | Date | Mon, 21 Aug 2000 08:37:26 -0400 | From | Bryan Mayland <> | Subject | [PATCH] VESA FrameBuffer memory size |
| |
I've had problems with my Dell Inspiron laptop w/ VESA framebuffers in ywrap mode. After some poking around I've discovered that the VESA implementation on my laptop underreports its memory size by 64k. I couldn't find any reason for this in the VESA spec, so there was no way to directly fix the problem. What I did do however is add a mem= parameter to the vesafb command line. I mentioned this back in the 2.3.1 days but still haven't seen this code make its way into the tree. Below is the patch against a 2.4.0-test6 kernel. Any chance of me getting this in, its getting to be a real PITA to have to patch every release.
Bry
diff -uNr linux/Documentation/fb/vesafb.txt linux-2.4.0-test6/Documentation/fb/vesafb.txt --- linux/Documentation/fb/vesafb.txt Fri Jul 28 15:50:51 2000 +++ linux-2.4.0-test6/Documentation/fb/vesafb.txt Fri Aug 18 17:13:27 2000 @@ -146,6 +146,12 @@
mtrr setup memory type range registers for the vesafb framebuffer.
+mem Override the amount of memory reported by the VESA BIOS + INT 10h (AX=4f00h). Some VBE implementations misreport the + amount of video memory, causing a "black hole" when using ywrap + every time the end of the memory is reached. If you enter a + value here larger than you actually have, you will more than + likely lock your system so be careful! Syntax is mem=XXX[kKmM]
Have fun!
@@ -156,3 +162,4 @@
Minor (mostly typo) changes by Nico Schmoigl <schmoigl@rumms.uni-mannheim.de> +mem option added by Bryan Mayland <bmayland@leonindev.com> --- linux/drivers/video/vesafb.c Wed Jul 26 14:08:41 2000 +++ linux-2.4.0-test6/drivers/video/vesafb.c Fri Aug 18 17:16:03 2000 @@ -452,7 +452,8 @@ { char *this_opt;
- fb_info.fontname[0] = '\0'; + fb_info.fontname[0] = '\0'; + video_size = 0;
if (!options || !*options) return 0; @@ -476,6 +477,13 @@ mtrr=1; else if (!strncmp(this_opt, "font:", 5)) strcpy(fb_info.fontname, this_opt+5); + else if (!strncmp(this_opt, "mem=", 4)) { + video_size = simple_strtoul(this_opt + 4, &this_opt, 0); + if (*this_opt == 'K' || *this_opt == 'k') + video_size <<= 10; + else if (*this_opt=='M' || *this_opt=='m') + video_size <<= 20; + } } return 0; } @@ -515,7 +523,9 @@ 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 may have been overriden by a command line option */ + if (!video_size) + video_size = screen_info.lfb_size * 65536; video_visual = (video_bpp == 8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
|  |