From: Raphael Assenat Date: Tue, 3 Oct 2006 08:15:05 +0000 (-0700) Subject: [PATCH] mbxfb: Fix framebuffer size smaller than requested X-Git-Tag: v2.6.19-rc1~291 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=5c60b118d62c14ad7586ed6a6e537c3294c90227;p=linux-2.6-omap-h63xx.git [PATCH] 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. Signed-off-by: Raphael Assenat Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/mbx/mbxfb.c b/drivers/video/mbx/mbxfb.c index cfc6bf3615b..a32d1af79e0 100644 --- a/drivers/video/mbx/mbxfb.c +++ b/drivers/video/mbx/mbxfb.c @@ -255,8 +255,8 @@ static int mbxfb_set_par(struct fb_info *info) /* 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 @@ static void __devinit setup_graphics(struct fb_info *fbi) { 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)