Commit 60328917 authored by Fabio Estevam's avatar Fabio Estevam Committed by Paul Mundt

video: imxfb: Fix the maximum value for yres

MX27 and MX25 have 10 bits in the YMAX field of LCDC Size Register.

Fix the maximum value for yres.
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent acd0acb6
...@@ -53,11 +53,8 @@ ...@@ -53,11 +53,8 @@
#define LCDC_SIZE 0x04 #define LCDC_SIZE 0x04
#define SIZE_XMAX(x) ((((x) >> 4) & 0x3f) << 20) #define SIZE_XMAX(x) ((((x) >> 4) & 0x3f) << 20)
#ifdef CONFIG_ARCH_MX1 #define YMAX_MASK (cpu_is_mx1() ? 0x1ff : 0x3ff)
#define SIZE_YMAX(y) ((y) & 0x1ff) #define SIZE_YMAX(y) ((y) & YMAX_MASK)
#else
#define SIZE_YMAX(y) ((y) & 0x3ff)
#endif
#define LCDC_VPW 0x08 #define LCDC_VPW 0x08
#define VPW_VPW(x) ((x) & 0x3ff) #define VPW_VPW(x) ((x) & 0x3ff)
...@@ -623,7 +620,7 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf ...@@ -623,7 +620,7 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
if (var->right_margin > 255) if (var->right_margin > 255)
printk(KERN_ERR "%s: invalid right_margin %d\n", printk(KERN_ERR "%s: invalid right_margin %d\n",
info->fix.id, var->right_margin); info->fix.id, var->right_margin);
if (var->yres < 1 || var->yres > 511) if (var->yres < 1 || var->yres > YMAX_MASK)
printk(KERN_ERR "%s: invalid yres %d\n", printk(KERN_ERR "%s: invalid yres %d\n",
info->fix.id, var->yres); info->fix.id, var->yres);
if (var->vsync_len > 100) if (var->vsync_len > 100)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment