diff options
Diffstat (limited to 'drivers/gpu/drm/drm_edid.c')
-rw-r--r-- | drivers/gpu/drm/drm_edid.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index cea665d86dd3..b54ba63d506e 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c | |||
@@ -662,6 +662,12 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev, | |||
662 | return NULL; | 662 | return NULL; |
663 | } | 663 | } |
664 | 664 | ||
665 | /* Some EDIDs have bogus h/vtotal values */ | ||
666 | if (mode->hsync_end > mode->htotal) | ||
667 | mode->htotal = mode->hsync_end + 1; | ||
668 | if (mode->vsync_end > mode->vtotal) | ||
669 | mode->vtotal = mode->vsync_end + 1; | ||
670 | |||
665 | drm_mode_set_name(mode); | 671 | drm_mode_set_name(mode); |
666 | 672 | ||
667 | if (pt->misc & DRM_EDID_PT_INTERLACED) | 673 | if (pt->misc & DRM_EDID_PT_INTERLACED) |