[PATCH] drm/edid: Do dmt_modes_for_range less aggressively

Adam Jackson ajax at redhat.com
Tue Jun 19 11:55:44 PDT 2012


Only fill it in for pre-1.1 monitors - when GTF hadn't yet been defined
- or for EDID 1.4's explicit "just a range, not a timing formula" case.

Bugzilla: https://bugs.freedesktop.org/51146
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 drivers/gpu/drm/drm_edid.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index eb92fe2..062dd06 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1138,12 +1138,12 @@ do_inferred_modes(struct detailed_timing *timing, void *c)
 	if (data->type != EDID_DETAIL_MONITOR_RANGE)
 		return;
 
-	closure->modes += drm_dmt_modes_for_range(closure->connector,
-						  closure->edid,
-						  timing);
-	
-	if (!version_greater(closure->edid, 1, 1))
+	if (!version_greater(closure->edid, 1, 1)) {
+		closure->modes += drm_dmt_modes_for_range(closure->connector,
+							  closure->edid,
+							  timing);
 		return; /* GTF not defined yet */
+	}
 
 	switch (range->flags) {
 	case 0x02: /* secondary gtf, XXX could do more */
@@ -1161,6 +1161,10 @@ do_inferred_modes(struct detailed_timing *timing, void *c)
 							  timing);
 		break;
 	case 0x01: /* just the ranges, no formula */
+		closure->modes += drm_dmt_modes_for_range(closure->connector,
+							  closure->edid,
+							  timing);
+		break;
 	default:
 		break;
 	}
-- 
1.7.7.6



More information about the dri-devel mailing list