diff options
author | Raphael Assenat <raph@8d.com> | 2006-10-03 04:15:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:04:12 -0400 |
commit | 5c60b118d62c14ad7586ed6a6e537c3294c90227 (patch) | |
tree | c4933389441e820d40683aa72c82e8750948c83c /drivers/video | |
parent | 8bc218410d6c2b22a7581fac6f3dc2ac1f8fc99f (diff) |
[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 <raph@8d.com>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/mbx/mbxfb.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/video/mbx/mbxfb.c b/drivers/video/mbx/mbxfb.c index cfc6bf3615b5..a32d1af79e07 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) | |||
255 | 255 | ||
256 | /* setup resolution */ | 256 | /* setup resolution */ |
257 | gsctrl &= ~(FMsk(GSCTRL_GSWIDTH) | FMsk(GSCTRL_GSHEIGHT)); | 257 | gsctrl &= ~(FMsk(GSCTRL_GSWIDTH) | FMsk(GSCTRL_GSHEIGHT)); |
258 | gsctrl |= Gsctrl_Width(info->var.xres - 1) | | 258 | gsctrl |= Gsctrl_Width(info->var.xres) | |
259 | Gsctrl_Height(info->var.yres - 1); | 259 | Gsctrl_Height(info->var.yres); |
260 | writel(gsctrl, GSCTRL); | 260 | writel(gsctrl, GSCTRL); |
261 | udelay(1000); | 261 | udelay(1000); |
262 | 262 | ||
@@ -413,8 +413,8 @@ static void __devinit setup_graphics(struct fb_info *fbi) | |||
413 | { | 413 | { |
414 | unsigned long gsctrl; | 414 | unsigned long gsctrl; |
415 | 415 | ||
416 | gsctrl = GSCTRL_GAMMA_EN | Gsctrl_Width(fbi->var.xres - 1) | | 416 | gsctrl = GSCTRL_GAMMA_EN | Gsctrl_Width(fbi->var.xres) | |
417 | Gsctrl_Height(fbi->var.yres - 1); | 417 | Gsctrl_Height(fbi->var.yres); |
418 | switch (fbi->var.bits_per_pixel) { | 418 | switch (fbi->var.bits_per_pixel) { |
419 | case 16: | 419 | case 16: |
420 | if (fbi->var.green.length == 5) | 420 | if (fbi->var.green.length == 5) |