diff options
Diffstat (limited to 'drivers/video/intelfb')
-rw-r--r-- | drivers/video/intelfb/intelfbhw.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/video/intelfb/intelfbhw.c b/drivers/video/intelfb/intelfbhw.c index 270f6552603c..a02ee24f3668 100644 --- a/drivers/video/intelfb/intelfbhw.c +++ b/drivers/video/intelfb/intelfbhw.c | |||
@@ -317,6 +317,14 @@ int intelfbhw_validate_mode(struct intelfb_info *dinfo, | |||
317 | var->yres, VACTIVE_MASK + 1); | 317 | var->yres, VACTIVE_MASK + 1); |
318 | return 1; | 318 | return 1; |
319 | } | 319 | } |
320 | if (var->xres < 4) { | ||
321 | WRN_MSG("X resolution too small (%d vs 4).\n", var->xres); | ||
322 | return 1; | ||
323 | } | ||
324 | if (var->yres < 4) { | ||
325 | WRN_MSG("Y resolution too small (%d vs 4).\n", var->yres); | ||
326 | return 1; | ||
327 | } | ||
320 | 328 | ||
321 | /* Check for doublescan modes. */ | 329 | /* Check for doublescan modes. */ |
322 | if (var->vmode & FB_VMODE_DOUBLE) { | 330 | if (var->vmode & FB_VMODE_DOUBLE) { |
@@ -324,6 +332,11 @@ int intelfbhw_validate_mode(struct intelfb_info *dinfo, | |||
324 | return 1; | 332 | return 1; |
325 | } | 333 | } |
326 | 334 | ||
335 | if ((var->vmode & FB_VMODE_INTERLACED) && (var->yres & 1)) { | ||
336 | WRN_MSG("Odd number of lines in interlaced mode\n"); | ||
337 | return 1; | ||
338 | } | ||
339 | |||
327 | /* Check if clock is OK. */ | 340 | /* Check if clock is OK. */ |
328 | tmp = 1000000000 / var->pixclock; | 341 | tmp = 1000000000 / var->pixclock; |
329 | if (tmp < MIN_CLOCK) { | 342 | if (tmp < MIN_CLOCK) { |
@@ -1127,6 +1140,8 @@ int intelfbhw_mode_to_hw(struct intelfb_info *dinfo, | |||
1127 | hblank_end); | 1140 | hblank_end); |
1128 | 1141 | ||
1129 | vactive = var->yres; | 1142 | vactive = var->yres; |
1143 | if (var->vmode & FB_VMODE_INTERLACED) | ||
1144 | vactive--; /* the chip adds 2 halflines automatically */ | ||
1130 | vsync_start = vactive + var->lower_margin; | 1145 | vsync_start = vactive + var->lower_margin; |
1131 | vsync_end = vsync_start + var->vsync_len; | 1146 | vsync_end = vsync_start + var->vsync_len; |
1132 | vtotal = vsync_end + var->upper_margin; | 1147 | vtotal = vsync_end + var->upper_margin; |