Skip to content

Commit

Permalink
drm: ignore EDID with really tiny modes.
Browse files Browse the repository at this point in the history
Some EDIDs lie and report tiny modes that aren't possible. Ignore
these modes.

Signed-off-by: Adam Jackson <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
  • Loading branch information
nwnk authored and airlied committed Jun 4, 2009
1 parent 6c51d1c commit fc43896
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/drm_edid.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,11 @@ static struct drm_display_mode *drm_mode_detailed(struct drm_device *dev,
struct drm_display_mode *mode;
struct detailed_pixel_timing *pt = &timing->data.pixel_data;

/* ignore tiny modes */
if (((pt->hactive_hi << 8) | pt->hactive_lo) < 64 ||
((pt->vactive_hi << 8) | pt->hactive_lo) < 64)
return NULL;

if (pt->stereo) {
printk(KERN_WARNING "stereo mode not supported\n");
return NULL;
Expand Down

0 comments on commit fc43896

Please sign in to comment.