aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjala <syrjala@sci.fi>2008-03-04 14:28:49 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-03-04 16:35:13 -0800
commit7e533705bd973267c488f8c3a7c7246ecad3a414 (patch)
tree09afdadc6955aa10c226962f0d6607fb35c83124
parent19d06eff4e0d77fc1a15c92f845f1916e2d10dd0 (diff)
sm501fb: fix timing limits
Vertical sync height register can only hold 6 bits. Fix the hsync start test to use > instead of >=. Also add a few clarifying comments. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Acked-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/video/sm501fb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/video/sm501fb.c b/drivers/video/sm501fb.c
index f49287c88ab..742b5c656d6 100644
--- a/drivers/video/sm501fb.c
+++ b/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;