Thread (2 messages) 2 messages, 2 authors, 2003-02-12

[PATCH] Fix for wasted memory in rivafb?

STALE8635d

From: Fredrik Noring <hidden>
Date: 2003-01-26 23:19:59

This patch fixes a problem with wasted memory in the rivafb driver.
For some reason, only half the memory is currently allowed when 
maximizing the virtual screen. The 2.5.x tree has the same problem.

Is this a reserve for something? I have not found any use for it 
inside the driver.

My app needs all the precious video memory it can get. :)

	Fredrik
--- linux-2.4.21-pre2/drivers/video/riva/fbdev.c.orig	2003-01-27 00:06:19.000000000 +0100
+++ linux-2.4.21-pre2/drivers/video/riva/fbdev.c	2003-01-26 21:28:04.000000000 +0100
@@ -1063,7 +1063,7 @@
 		       "using maximum available virtual resolution\n");
 		for (i = 0; modes[i].xres != -1; i++) {
 			if (modes[i].xres * nom / den * modes[i].yres <
-			    rinfo->ram_amount / 2)
+			    rinfo->ram_amount)
 				break;
 		}
 		if (modes[i].xres == -1) {
@@ -1080,13 +1080,13 @@
 		       v->xres_virtual, v->yres_virtual);
 	} else if (v->xres_virtual == -1) {
 		v->xres_virtual = (rinfo->ram_amount * den /
-			(nom * v->yres_virtual * 2)) & ~15;
+			(nom * v->yres_virtual)) & ~15;
 		printk(KERN_WARNING PFX
 		       "setting virtual X resolution to %d\n", v->xres_virtual);
 	} else if (v->yres_virtual == -1) {
 		v->xres_virtual = (v->xres_virtual + 15) & ~15;
 		v->yres_virtual = rinfo->ram_amount * den /
-			(nom * v->xres_virtual * 2);
+			(nom * v->xres_virtual);
 		printk(KERN_WARNING PFX
 		       "setting virtual Y resolution to %d\n", v->yres_virtual);
 	} else {



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help