Skip to contentSkip to conversation

drm: edid revision 0 is valid

PATCH In review Kyle McMartin 4 participants 4 messages Feb 25, 2009 – Mar 11, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm: edid revision 0 is valid

From: Kyle McMartin <[email protected]>

edid->revision == 0 should be valid (at least, so the error message indicates. :) and wikipedia seems to indicate that EDID 1.0 existed.

We can dump the entire check, since edid->revision is a u8, so it can't ever be less than 0.

Marko reports in RH bz#476735 that his monitor claims to be EDID 1.0, and therefore hits the check and is stuck at 800x600 because of it.

---

drivers/gpu/drm/drm_edid.c +1 -1
index 5a4d324..ec14dd8 100644
@@ -125,7 +125,7 @@ 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 <= 0 || edid->revision > 3) {
+	if (edid->revision > 3) {
 		DRM_ERROR("EDID has minor version %d, which is not between 0-3\n", edid->revision);
 		goto bad;
 	}
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · Kyle McMartin

From: Kyle McMartin <[email protected]>

edid->revision == 0 should be valid (at least, so the error message indicates. :) and wikipedia seems to indicate that EDID 1.0 existed.

We can dump the entire check, since edid->revision is a u8, so it can't ever be less than 0.

Quoted 6 lines

Marko reports in RH bz#476735 that his monitor claims to be EDID 1.0, and therefore hits the check and is stuck at 800x600 because of it.

Heh, yeah this makes the code correct *and* match the message. Thanks.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center
#2 lore raw
In reply to Kyle McMartin

drivers/gpu/drm/drm_edid.c static bool edid_is_valid(struct edid *edid) · line 130

Quoted 4 lines · Kyle McMartin
drivers/gpu/drm/drm_edid.c +1 -1
-	if (edid->revision <= 0 || edid->revision > 3) {
+	if (edid->revision > 3) {
 		DRM_ERROR("EDID has minor version %d, which is not between 0-3\n", edid->revision);
 		goto bad;

Ahem. EDID version 1.4 exists too, in fact it's the current version. EDID 1.5+ doesn't exist, but it should be backward compatible when it does.

I'm doing a lot of work on another EDID parser, including full DMT and CEA-861 mode tables, monitor hotplug, all quirks from Xorg and the kernel, EDID 1.4 support w/ CVT calculation, etc. right now for an embedded Linux video project. Would there be any interest incorporating parts of that work?

-- Jamie

#3 lore raw
Quoted 9 lines · Jamie Lokier

drivers/gpu/drm/drm_edid.c static bool edid_is_valid(struct edid *edid) · line 130

Quoted 4 lines · Kyle McMartin
drivers/gpu/drm/drm_edid.c +1 -1
-	if (edid->revision <= 0 || edid->revision > 3) {
+	if (edid->revision > 3) {
 		DRM_ERROR("EDID has minor version %d, which is not between 0-3\n", edid->revision);
 		goto bad;

Ahem. EDID version 1.4 exists too, in fact it's the current version. EDID 1.5+ doesn't exist, but it should be backward compatible when it does.

Quoted 5 lines

I'm doing a lot of work on another EDID parser, including full DMT and CEA-861 mode tables, monitor hotplug, all quirks from Xorg and the kernel, EDID 1.4 support w/ CVT calculation, etc. right now for an embedded Linux video project. Would there be any interest incorporating parts of that work?

There's work going on for CEA-861 and syncing KMS against UMS. But certainly we love fixes when we don't even have to write them ourselves.

Signature · 2 lines
Eric Anholt
[email protected]                         [email protected]