diff options
author | Sandor Yu <R01008@freescale.com> | 2014-04-03 03:46:59 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:58:16 -0400 |
commit | 9c8d7d6c0469c9101c07b12b920b6e272afed0cc (patch) | |
tree | ae9b5eafd339b44be08305eafacfae973d097572 | |
parent | 7c5bbe10a8e9a736127c1f0414b4c2d7610a649c (diff) |
ENGR00306832 mxsfb: xres_virtual should not larger than xres
eLCDIF did not support stride buffer, check the xres_virtual
in function mxfb_check_var, return false
if the value larger than xres.
Signed-off-by: Sandor Yu <R01008@freescale.com>
-rw-r--r-- | drivers/video/mxsfb.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/video/mxsfb.c b/drivers/video/mxsfb.c index cc31ec702ac9..82eb82e28e91 100644 --- a/drivers/video/mxsfb.c +++ b/drivers/video/mxsfb.c | |||
@@ -392,6 +392,11 @@ static int mxsfb_check_var(struct fb_var_screeninfo *var, | |||
392 | if (var->yres < MIN_YRES) | 392 | if (var->yres < MIN_YRES) |
393 | var->yres = MIN_YRES; | 393 | var->yres = MIN_YRES; |
394 | 394 | ||
395 | if (var->xres_virtual > var->xres) { | ||
396 | dev_dbg(fb_info->device, "stride not supported\n"); | ||
397 | return -EINVAL; | ||
398 | } | ||
399 | |||
395 | if (var->xres_virtual < var->xres) | 400 | if (var->xres_virtual < var->xres) |
396 | var->xres_virtual = var->xres; | 401 | var->xres_virtual = var->xres; |
397 | if (var->yres_virtual < var->yres) | 402 | if (var->yres_virtual < var->yres) |