linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2.4.21-rc6-ac1] vesafb fixes...
@ 2003-06-01 16:30 Thomas Backlund
  2003-06-02 13:40 ` Thomas Backlund
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Backlund @ 2003-06-01 16:30 UTC (permalink / raw)
  To: LKML; +Cc: Alan Cox

[-- Attachment #1: Type: text/plain, Size: 954 bytes --]

Here are 2 patches...

The "vesafb.txt.diff" removes duplicate text in the documentation...

The "vesafb.c.diff" changes the following:
 - it adds "* 2" to the video_size calculation to remap enough memory
   to do double buffering

 - to make sure that our double buffering calculation does not remap
   more memory than old cards actually have it uses the "old" code:

if video_size > (screen_info.lfb_size * 65536)
		video_size = screen_info.lfb_size * 65536;

 - and last but not least it changes my override to work both ways,
   so that the user can specify less or more memory to be remapped


I earlier got a comment that this double buffering thing is not needed,
but IMHO there will always be cards out there that are to new, so they
dont have driver support (yet), or they are too "weird" so the only thing
the user has to rely on is the vesafb driver, and I like the idea to get
atleast this support "out of the box"...

Best Regards

Thomas 

[-- Attachment #2: vesafb.c.diff --]
[-- Type: text/x-diff, Size: 1111 bytes --]

diff -Naru ac1/drivers/video/vesafb.c tmb1/drivers/video/vesafb.c
--- ac1/drivers/video/vesafb.c	2003-06-01 18:29:51.000000000 +0300
+++ tmb1/drivers/video/vesafb.c	2003-06-01 18:50:18.000000000 +0300
@@ -525,12 +525,18 @@
 	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 / 8;
+
+	/* remap memory according to videomode, multiply by 2 to get space for doublebuffering */
+	video_size          = screen_info.lfb_width *	screen_info.lfb_height * video_bpp / 8 * 2;
+
+	/* 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;
 	
 	/* FIXME: Should we clip against declared size for banked devices ? */
 	
 	/* sets video_size according to vram boot option */
-	if (vram && vram * 1024 * 1024 > video_size)
+	if (vram && vram * 1024 * 1024 != video_size)
 		video_size = vram * 1024 * 1024;
 		
 	video_visual = (video_bpp == 8) ?

[-- Attachment #3: vesafb.txt.diff --]
[-- Type: text/x-diff, Size: 750 bytes --]

diff -Naru ac1/Documentation/fb/vesafb.txt tmb1/Documentation/fb/vesafb.txt
--- ac1/Documentation/fb/vesafb.txt	2003-06-01 18:29:40.000000000 +0300
+++ tmb1/Documentation/fb/vesafb.txt	2003-06-01 18:33:23.000000000 +0300
@@ -139,12 +139,6 @@
 redraw	scroll by redrawing the affected part of the screen, this
 	is the safe (and slow) default.
 
-vram:n  remap 'n' MiB of video RAM. If 0 or not specified, remap memory
-        according to video mode. (2.5.66 patch/idea by Antonino Daplas
-	reversed to give override possibility (allocate more fb memory
-	than the kernel would) to 2.4 by tmb@iki.fi)
-
-
 vgapal	Use the standard vga registers for palette changes.
 	This is the default.
 pmipal	Use the protected mode interface for palette changes.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH 2.4.21-rc6-ac1] vesafb fixes...
  2003-06-01 16:30 [PATCH 2.4.21-rc6-ac1] vesafb fixes Thomas Backlund
@ 2003-06-02 13:40 ` Thomas Backlund
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Backlund @ 2003-06-02 13:40 UTC (permalink / raw)
  To: linux-kernel


AARGH...
I forgot to rediff...,
but since it seems to break the bootsplash,
the vesafb.c.diff needs more work...

but the vesafb.txt.diff should be applied...

"Thomas Backlund" <tmb@iki.fi> wrote in message
news:200306011930.02086.tmb@iki.fi...
> Here are 2 patches...
>
> The "vesafb.txt.diff" removes duplicate text in the documentation...
>
> The "vesafb.c.diff" changes the following:
>  - it adds "* 2" to the video_size calculation to remap enough memory
>    to do double buffering
>
>  - to make sure that our double buffering calculation does not remap
>    more memory than old cards actually have it uses the "old" code:
>
> if video_size > (screen_info.lfb_size * 65536)
> video_size = screen_info.lfb_size * 65536;
>

Stupid typos... :-(

I am using:
if (video_size > (screen_info.lfb_size * 65536))
        video_size = screen_info.lfb_size * 65536;


>  - and last but not least it changes my override to work both ways,
>    so that the user can specify less or more memory to be remapped
>
>
> I earlier got a comment that this double buffering thing is not needed,
> but IMHO there will always be cards out there that are to new, so they
> dont have driver support (yet), or they are too "weird" so the only thing
> the user has to rely on is the vesafb driver, and I like the idea to get
> atleast this support "out of the box"...
>

 Best Regards

 Thomas




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-06-02 13:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-01 16:30 [PATCH 2.4.21-rc6-ac1] vesafb fixes Thomas Backlund
2003-06-02 13:40 ` Thomas Backlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).