From: Adam Jackson Date: Thu, 4 Jun 2009 00:20:34 +0000 (+1000) Subject: drm: ignore EDID with really tiny modes. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fc43896630a421321a19d7970bac27ac94e9d162;p=linux-beck.git drm: ignore EDID with really tiny modes. Some EDIDs lie and report tiny modes that aren't possible. Ignore these modes. Signed-off-by: Adam Jackson Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index ca9c61656714..6f6b26479d82 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -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;