提交 7e533705 编写于 作者: V Ville Syrjala 提交者: Linus Torvalds

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: NVille Syrjala <syrjala@sci.fi>
Acked-by: NBen Dooks <ben-linux@fluff.org>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 19d06eff
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册