summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2009-06-04 10:20:34 +1000
committerDave Airlie <airlied@redhat.com>2009-06-04 10:20:34 +1000
commitfc43896630a421321a19d7970bac27ac94e9d162 (patch)
tree26128411aeb6fb307ce899b3efec3779196b247d /drivers/gpu
parent6c51d1cfa0a370b48a157163340190cf5fd2346b (diff)
downloadop-kernel-dev-fc43896630a421321a19d7970bac27ac94e9d162.zip
op-kernel-dev-fc43896630a421321a19d7970bac27ac94e9d162.tar.gz
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 <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_edid.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index ca9c616..6f6b264 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;
OpenPOWER on IntegriCloud