From: Thomas Backlund <tmb@iki.fi>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: "linux-kernel" <linux-kernel@vger.kernel.org>
Subject: [PATCH] 2.4.21-rc8 vesafb memory remapping...
Date: Thu, 12 Jun 2003 23:43:49 +0300 [thread overview]
Message-ID: <200306122343.49563.tmb@iki.fi> (raw)
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/vesafb.c.new
--- rc8/drivers/video/vesafb.c 2003-06-12 23:13:29.000000000 +0300
+++ rc8/drivers/video/vesafb.c.new 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) ?
FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
----- cut -----
Like this we would keep both old and new systems happy AFAIK...
--
Regards
Thomas Backlund
http://www.iki.fi/tmb/
tmb@iki.fi
next reply other threads:[~2003-06-12 20:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-12 20:43 Thomas Backlund [this message]
2003-06-27 11:51 ` Geert Uytterhoeven
2003-06-27 11:54 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200306122343.49563.tmb@iki.fi \
--to=tmb@iki.fi \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®