From: Russell King Date: Thu, 28 Apr 2005 09:46:15 +0000 (+0100) Subject: [PATCH] ARM: AMBA CLCD: X resolutions must be multiples of 16 X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=0f7ad450394560a6b6c72115e04bf7afd6230e70;p=deliverable%2Flinux.git [PATCH] ARM: AMBA CLCD: X resolutions must be multiples of 16 We ignore the bottom 4 bits of the X resolution, so we should round X resolutions up to the nearest multiple of 16. Signed-off-by: Russell King --- diff --git a/include/asm-arm/hardware/amba_clcd.h b/include/asm-arm/hardware/amba_clcd.h index d6ad33e52ea9..ce4cf5c1c05d 100644 --- a/include/asm-arm/hardware/amba_clcd.h +++ b/include/asm-arm/hardware/amba_clcd.h @@ -222,7 +222,7 @@ static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) static inline int clcdfb_check(struct clcd_fb *fb, struct fb_var_screeninfo *var) { - var->xres_virtual = var->xres = (var->xres + 7) & ~7; + var->xres_virtual = var->xres = (var->xres + 15) & ~15; var->yres_virtual = var->yres = (var->yres + 1) & ~1; #define CHECK(e,l,h) (var->e < l || var->e > h)