diff options
-rw-r--r-- | drivers/video/amba-clcd.c | 8 | ||||
-rw-r--r-- | include/asm-arm/hardware/amba_clcd.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/drivers/video/amba-clcd.c b/drivers/video/amba-clcd.c index 075d3961a119..3e386fd4c5c6 100644 --- a/drivers/video/amba-clcd.c +++ b/drivers/video/amba-clcd.c | |||
@@ -146,7 +146,7 @@ clcdfb_set_bitfields(struct clcd_fb *fb, struct fb_var_screeninfo *var) | |||
146 | var->blue.offset = 10; | 146 | var->blue.offset = 10; |
147 | } | 147 | } |
148 | break; | 148 | break; |
149 | case 24: | 149 | case 32: |
150 | if (fb->panel->cntl & CNTL_LCDTFT) { | 150 | if (fb->panel->cntl & CNTL_LCDTFT) { |
151 | var->red.length = 8; | 151 | var->red.length = 8; |
152 | var->green.length = 8; | 152 | var->green.length = 8; |
@@ -178,6 +178,12 @@ static int clcdfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) | |||
178 | 178 | ||
179 | if (fb->board->check) | 179 | if (fb->board->check) |
180 | ret = fb->board->check(fb, var); | 180 | ret = fb->board->check(fb, var); |
181 | |||
182 | if (ret == 0 && | ||
183 | var->xres_virtual * var->bits_per_pixel / 8 * | ||
184 | var->yres_virtual > fb->fb.fix.smem_len) | ||
185 | ret = -EINVAL; | ||
186 | |||
181 | if (ret == 0) | 187 | if (ret == 0) |
182 | ret = clcdfb_set_bitfields(fb, var); | 188 | ret = clcdfb_set_bitfields(fb, var); |
183 | 189 | ||
diff --git a/include/asm-arm/hardware/amba_clcd.h b/include/asm-arm/hardware/amba_clcd.h index 476b6398ae1e..d6ad33e52ea9 100644 --- a/include/asm-arm/hardware/amba_clcd.h +++ b/include/asm-arm/hardware/amba_clcd.h | |||
@@ -211,7 +211,7 @@ static inline void clcdfb_decode(struct clcd_fb *fb, struct clcd_regs *regs) | |||
211 | case 16: | 211 | case 16: |
212 | val |= CNTL_LCDBPP16; | 212 | val |= CNTL_LCDBPP16; |
213 | break; | 213 | break; |
214 | case 24: | 214 | case 32: |
215 | val |= CNTL_LCDBPP24; | 215 | val |= CNTL_LCDBPP24; |
216 | break; | 216 | break; |
217 | } | 217 | } |