Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc438966 authored by Adam Jackson's avatar Adam Jackson Committed by Dave Airlie
Browse files

drm: ignore EDID with really tiny modes.



Some EDIDs lie and report tiny modes that aren't possible. Ignore
these modes.

Signed-off-by: default avatarAdam Jackson <ajax@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 6c51d1cf
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;