Merge branch 'drm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[safe/jmp/linux-2.6] / drivers / gpu / drm / drm_edid.c
index 2c4a340..6f6b264 100644 (file)
@@ -125,10 +125,8 @@ static bool edid_is_valid(struct edid *edid)
                DRM_ERROR("EDID has major version %d, instead of 1\n", edid->version);
                goto bad;
        }
-       if (edid->revision > 3) {
-               DRM_ERROR("EDID has minor version %d, which is not between 0-3\n", edid->revision);
-               goto bad;
-       }
+       if (edid->revision > 4)
+               DRM_DEBUG("EDID minor > 4, assuming backward compatibility\n");
 
        for (i = 0; i < EDID_LENGTH; i++)
                csum += raw_edid[i];
@@ -291,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;