[PATCH] DRM: ignore invalid EDID extensions

Sam Tygier samtygier at yahoo.co.uk
Tue Sep 21 15:02:27 PDT 2010


Currently an invalid EDID extension will cause the whole EDID to be considered invalid. Instead just drop the extension, and return the valid base block. The base block is modified to not claim to have extensions, and update the checksum.

For my EIZO S2242W the base block is fine, but the extension block is all zeros. Without this patch I get no X and no VTs.

Signed-off-by: Sam Tygier <samtygier at yahoo.co.uk>
---
  drivers/gpu/drm/drm_edid.c |    9 +++++++++
  1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index f87bf10..5ade343 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -285,6 +285,15 @@ carp:
  	dev_warn(connector->dev->dev, "%s: EDID block %d invalid.\n",
  		 drm_get_connector_name(connector), j);
  
+	/* Invalid extension, so set block[0x7e] to zero, and return
+	 * the base block */
+	block[EDID_LENGTH-1] += block[0x7e];
+	block[0x7e] = 0;
+	new = krealloc(block, EDID_LENGTH, GFP_KERNEL);
+	if (!new)
+		goto out;
+	block = new;
+	return block;
  out:
  	kfree(block);
  	return NULL;
-- 
1.7.1


More information about the dri-devel mailing list