[PATCH 5/7] drm/edid: Armor drm_dmt_modes_for_range for reduced blanking modes
Adam Jackson
ajax at redhat.com
Thu Apr 12 14:35:58 PDT 2012
Require that the monitor support rb for rb modes to be added.
Signed-off-by: Adam Jackson <ajax at redhat.com>
---
drivers/gpu/drm/drm_edid.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 83c51d6..0fc63ca 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -1016,10 +1016,6 @@ mode_in_range(const struct drm_display_mode *mode, struct edid *edid,
return true;
}
-/*
- * XXX If drm_dmt_modes ever regrows the CVT-R modes (and it will) this will
- * need to account for them.
- */
static int
drm_dmt_modes_for_range(struct drm_connector *connector, struct edid *edid,
struct detailed_timing *timing)
@@ -1030,6 +1026,10 @@ drm_dmt_modes_for_range(struct drm_connector *connector, struct edid *edid,
for (i = 0; i < drm_num_dmt_modes; i++) {
if (mode_in_range(drm_dmt_modes + i, edid, timing)) {
+ if (mode_is_rb(&drm_dmt_modes[i]) &&
+ !drm_monitor_supports_rb(edid))
+ continue;
+
newmode = drm_mode_duplicate(dev, &drm_dmt_modes[i]);
if (newmode) {
drm_mode_probed_add(connector, newmode);
--
1.7.7.6
More information about the dri-devel
mailing list