drm/edid: respect connector force for drm_get_edid ddc probe
authorJani Nikula <jani.nikula@intel.com>
Fri, 17 Feb 2017 15:20:53 +0000 (17:20 +0200)
committerJani Nikula <jani.nikula@intel.com>
Tue, 21 Feb 2017 13:43:04 +0000 (15:43 +0200)
Skip DDC probe for forced connector status. Don't try to read the EDID
if the connector is forced off. Skipping probe for forced on connectors
will make more sense when drm_do_get_edid() will handle override and
firmware EDIDs.

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1487344854-18777-4-git-send-email-jani.nikula@intel.com
drivers/gpu/drm/drm_edid.c

index 4bb50e0e7110f7e3083721245afc5bbd81462ed2..e1743ab276dc05faa73217e6d74bde237c0ea51c 100644 (file)
@@ -1428,7 +1428,10 @@ struct edid *drm_get_edid(struct drm_connector *connector,
 {
        struct edid *edid;
 
-       if (!drm_probe_ddc(adapter))
+       if (connector->force == DRM_FORCE_OFF)
+               return NULL;
+
+       if (connector->force == DRM_FORCE_UNSPECIFIED && !drm_probe_ddc(adapter))
                return NULL;
 
        edid = drm_do_get_edid(connector, drm_do_probe_ddc_edid, adapter);