From: Sam Tygier <samtygier@yahoo.co.uk>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH] DRM: ignore invalid EDID extensions
Date: Tue, 21 Sep 2010 23:02:27 +0100 [thread overview]
Message-ID: <4C992B73.5040605@yahoo.co.uk> (raw)
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@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
next reply other threads:[~2010-09-21 22:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 22:02 Sam Tygier [this message]
2010-09-22 20:59 ` [PATCH] DRM: ignore invalid EDID extensions Adam Jackson
2010-09-22 21:42 ` Sam Tygier
2010-09-22 21:55 ` Adam Jackson
2010-09-23 10:05 ` Sam Tygier
2010-10-01 11:15 ` Sam Tygier
-- strict thread matches above, loose matches on Subject: below --
2010-10-28 9:12 sam tygier
2010-10-28 13:41 ` Marius Gröger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C992B73.5040605@yahoo.co.uk \
--to=samtygier@yahoo.co.uk \
--cc=dri-devel@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.