In drm_mode_getconnector we send the connector status back to
userspace.  However, we only return the last detected status, rather
than performing status detection again, which can lead to trouble if
the configuration changes after module load and initial probing is
done.  Since drm_mode_getconnector currently has full probe semantics,
make it return a current status at all times so that config changes are
properly picked up.

Signed-off-by: Jesse Barnes <jbar...@virtuousgeek.org>

diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 94a7688..403e00d 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1283,10 +1283,14 @@ int drm_mode_getconnector(struct drm_device *dev, void 
*data,
        out_resp->connector_id = connector->base.id;
        out_resp->connector_type = connector->connector_type;
        out_resp->connector_type_id = connector->connector_type_id;
+
+       /* These values should have been fetched by fill_modes from the EDID */
        out_resp->mm_width = connector->display_info.width_mm;
        out_resp->mm_height = connector->display_info.height_mm;
        out_resp->subpixel = connector->display_info.subpixel_order;
-       out_resp->connection = connector->status;
+
+       /* Go see if it's there */
+       out_resp->connection = connector->funcs->detect(connector);
        if (connector->encoder)
                out_resp->encoder_id = connector->encoder->base.id;
        else

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to