From 99439138578fdf443afb08857d5914b4cee87a61 Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Wed, 1 Dec 2010 20:37:24 +0100 Subject: [PATCH] drm: fix edid base block 0 version on the fly. edid v2.X where X != 0 is invalid . Confirm with the checksum that 1.X was the intended version. --- drivers/gpu/drm/drm_edid.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c index a245d17..8fd9fb3 100644 --- a/drivers/gpu/drm/drm_edid.c +++ b/drivers/gpu/drm/drm_edid.c @@ -160,8 +160,18 @@ drm_edid_block_valid(u8 *raw_edid) DRM_ERROR("EDID checksum is invalid, remainder is %d\n", csum); /* allow CEA to slide through, switches mangle this */ - if (raw_edid[0] != 0x02) - goto bad; + if (raw_edid[0] != 0x02) { + if (raw_edid[0] != 0x00) + goto bad; + + // Fix edid version 2.X where X != 0 which are in fact 1.X when the checksum confirm. + if (edid->version != 2 || edid->revision == 0 || csum != 1) + goto bad; + + + DRM_DEBUG("Fixing EDID base block 0 invalid version, your hardware may be failing\n"); + edid->version = 1; + } } /* per-block-type checks */ -- 1.7.2.3