aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandor Yu <R01008@freescale.com>2014-04-03 03:46:59 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:58:16 -0400
commit9c8d7d6c0469c9101c07b12b920b6e272afed0cc (patch)
treeae9b5eafd339b44be08305eafacfae973d097572
parent7c5bbe10a8e9a736127c1f0414b4c2d7610a649c (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.c5
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)