All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 4/7] drm: properly init/reset connector status
Date: Tue, 23 Oct 2012 20:23:35 +0200	[thread overview]
Message-ID: <1351016618-2752-5-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1351016618-2752-1-git-send-email-daniel.vetter@ffwll.ch>

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 --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,
 	INIT_LIST_HEAD(&connector->probed_modes);
 	INIT_LIST_HEAD(&connector->modes);
 	connector->edid_blob_ptr = NULL;
+	connector->status = connector_status_unknown;
 
 	list_add_tail(&connector->head, &dev->mode_config.connector_list);
 	dev->mode_config.num_connector++;
@@ -3656,9 +3657,12 @@ void drm_mode_config_reset(struct drm_device *dev)
 		if (encoder->funcs->reset)
 			encoder->funcs->reset(encoder);
 
-	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)
 			connector->funcs->reset(connector);
+	}
 }
 EXPORT_SYMBOL(drm_mode_config_reset);
 
-- 
1.7.11.7

  parent reply	other threads:[~2012-10-23 19:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-23 18:23 [PATCH 0/7] hpd rework, relaunched Daniel Vetter
2012-10-23 18:23 ` [PATCH 1/7] drm: extract drm_kms_helper_hotplug_event Daniel Vetter
2012-10-23 18:23 ` [PATCH 2/7] drm: handle HPD and polled connectors separately Daniel Vetter
2012-10-23 18:23 ` [PATCH 3/7] drm: run the hpd irq event code directly Daniel Vetter
2012-10-23 18:23 ` Daniel Vetter [this message]
2012-10-23 18:23 ` [PATCH 5/7] drm: don't start the poll engine in probe_single_connector Daniel Vetter
2012-10-23 18:23 ` [PATCH 6/7] drm: don't unnecessarily enable the polling work Daniel Vetter
2012-10-24 13:35   ` [PATCH] " Daniel Vetter
2012-10-23 18:23 ` [PATCH 7/7] drm: don't poll forced connectors Daniel Vetter
2012-10-23 20:41 ` [PATCH 0/7] hpd rework, relaunched Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1351016618-2752-5-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.