mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Acked-by: Ben Dooks <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
19d06eff4e
commit
7e533705bd
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue