Skip to content

Commit

Permalink
[PATCH] mbxfb: Fix framebuffer size smaller than requested
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Antonino Daplas <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Raphael Assenat authored and Linus Torvalds committed Oct 3, 2006
1 parent 8bc2184 commit 5c60b11
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/video/mbx/mbxfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5c60b11

Please sign in to comment.