From f6ff125517fb264a69d57e19ad9084d93e55e6ca Mon Sep 17 00:00:00 2001 From: Ville Syrjala Date: Tue, 4 Mar 2008 14:28:49 -0800 Subject: [PATCH] --- yaml --- r: 86800 b: refs/heads/master c: 7e533705bd973267c488f8c3a7c7246ecad3a414 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/video/sm501fb.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index 9ccdce44735a..4d51cec5a248 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 19d06eff4e0d77fc1a15c92f845f1916e2d10dd0 +refs/heads/master: 7e533705bd973267c488f8c3a7c7246ecad3a414 diff --git a/trunk/drivers/video/sm501fb.c b/trunk/drivers/video/sm501fb.c index f49287c88abe..742b5c656d66 100644 --- a/trunk/drivers/video/sm501fb.c +++ b/trunk/drivers/video/sm501fb.c @@ -237,12 +237,14 @@ static int sm501fb_check_var(struct fb_var_screeninfo *var, /* check we can fit these values into the registers */ - if (var->hsync_len > 255 || var->vsync_len > 255) + if (var->hsync_len > 255 || var->vsync_len > 63) return -EINVAL; - if ((var->xres + var->right_margin) >= 4096) + /* hdisplay end and hsync start */ + if ((var->xres + var->right_margin) > 4096) return -EINVAL; + /* vdisplay end and vsync start */ if ((var->yres + var->lower_margin) > 2048) return -EINVAL;