diff mbox

[4/7] drm: properly init/reset connector status

Message ID 1351016618-2752-5-git-send-email-daniel.vetter@ffwll.ch (mailing list archive)
State Accepted
Headers show

Commit Message

Daniel Vetter Oct. 23, 2012, 6:23 p.m. UTC
This can help drivers to make somewhat intelligent decisions in their
->detect callback: If the connector is hpd capable and in the unknown
state, the driver needs to force a full detect cycle. Otherwise it
could just (if it chooses so) to update the connector state from it's
hpd handler directly, and always return that in the ->detect callback.

Atm only drm/i915 calls drm_mode_config_reset at resume time, so other
drivers would need to add that call first before using this facility.

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
 drivers/gpu/drm/drm_crtc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox


diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index ef1b221..05c4e7b 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -555,6 +555,7 @@  int drm_connector_init(struct drm_device *dev,
 	connector->edid_blob_ptr = NULL;
+	connector->status = connector_status_unknown;
 	list_add_tail(&connector->head, &dev->mode_config.connector_list);
@@ -3656,9 +3657,12 @@  void drm_mode_config_reset(struct drm_device *dev)
 		if (encoder->funcs->reset)
-	list_for_each_entry(connector, &dev->mode_config.connector_list, head)
+	list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
+		connector->status = connector_status_unknown;
 		if (connector->funcs->reset)
+	}