projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
486ff38
)
atmel_lcdfb: disallow setting larger resolution than the framebuffer memory can handle
author
Stanislaw Gruszka
<
[email protected]
>
Thu, 16 Oct 2008 05:03:43 +0000
(22:03 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 16 Oct 2008 18:21:44 +0000
(11:21 -0700)
Signed-off-by: Stanislaw Gruszka <
[email protected]
>
Acked-by: Nicolas Ferre <
[email protected]
>
Cc: Krzysztof Helt <
[email protected]
>
Cc: Haavard Skinnemoen <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/video/atmel_lcdfb.c
patch
|
blob
|
history
diff --git
a/drivers/video/atmel_lcdfb.c
b/drivers/video/atmel_lcdfb.c
index d38fd5217422f8de3e3b97ecbd5cbd65056a0977..f8d0a57a07cbe3852d4128b0b6d46c8eddefebd5 100644
(file)
--- a/
drivers/video/atmel_lcdfb.c
+++ b/
drivers/video/atmel_lcdfb.c
@@
-372,6
+372,13
@@
static int atmel_lcdfb_check_var(struct fb_var_screeninfo *var,
var->transp.offset = var->transp.length = 0;
var->xoffset = var->yoffset = 0;
+ if (info->fix.smem_len) {
+ unsigned int smem_len = (var->xres_virtual * var->yres_virtual
+ * ((var->bits_per_pixel + 7) / 8));
+ if (smem_len > info->fix.smem_len)
+ return -EINVAL;
+ }
+
/* Saturate vertical and horizontal timings at maximum values */
var->vsync_len = min_t(u32, var->vsync_len,
(ATMEL_LCDC_VPW >> ATMEL_LCDC_VPW_OFFSET) + 1);