Skip to contentSkip to conversation

mbxfb: Fix framebuffer size smaller than requested

PATCH In review Raphael Assenat 1 participant 1 message Aug 14, 2006 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 mbxfb: Fix framebuffer size smaller than requested

This patch fixes a bug where we obtain a smaller resolution than requested. (eg: in 640x480, only 639x479 usable pixels).

This was due to 1 being substracted from the xres and yres vars two times: first in mbxfb.c and then in the macros from reg_bits.h.

This patch removes the minus ones from the mbxfb.c file. Tested and works.

This patch fixes a bug where we obtain a smaller resolution than requested. (eg: in 640x480, only 639x479 usable pixels).

This was due to 1 being substracted from the xres and yres vars two times: first in mbxfb.c and then in the macros from reg_bits.h.

This patch removes the minus ones from the mbxfb.c file. Tested and works.

linux-2.6.18-rc2-8d/drivers/video/mbx/mbxfb.c renamed from mbxfb.c-disppll-workaound +4 -4
@@ -255,8 +255,8 @@
 
 	/* setup resolution */
 	gsctrl &= ~(FMsk(GSCTRL_GSWIDTH) | FMsk(GSCTRL_GSHEIGHT));
-	gsctrl |= Gsctrl_Width(info->var.xres - 1) |
-		Gsctrl_Height(info->var.yres - 1);
+	gsctrl |= Gsctrl_Width(info->var.xres) |
+		Gsctrl_Height(info->var.yres);
 	writel(gsctrl, GSCTRL);
 	udelay(1000);
 
@@ -413,8 +413,8 @@
 {
 	unsigned long gsctrl;
 
-	gsctrl = GSCTRL_GAMMA_EN | Gsctrl_Width(fbi->var.xres - 1) |
-		Gsctrl_Height(fbi->var.yres - 1);
+	gsctrl = GSCTRL_GAMMA_EN | Gsctrl_Width(fbi->var.xres) |
+		Gsctrl_Height(fbi->var.yres);
 	switch (fbi->var.bits_per_pixel) {
 	case 16:
 		if (fbi->var.green.length == 5)

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel