Skip to content

Commit

Permalink
drm: work around EDIDs with bad htotal/vtotal values
Browse files Browse the repository at this point in the history
We did this on the userspace side, but we need a similar fix for the
kernel.

Fixes LP #460664.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Jesse Barnes authored and Dave Airlie committed Nov 24, 2009
1 parent 0ebf171 commit 7064fef
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,12 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
return NULL;
}

/* Some EDIDs have bogus h/vtotal values */
if (mode->hsync_end > mode->htotal)
mode->htotal = mode->hsync_end + 1;
if (mode->vsync_end > mode->vtotal)
mode->vtotal = mode->vsync_end + 1;

drm_mode_set_name(mode);

if (pt->misc & DRM_EDID_PT_INTERLACED)
Expand Down

0 comments on commit 7064fef

Please sign in to comment.