linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lyude <cpaul@redhat.com>
To: Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	David Airlie <airlied@linux.ie>,
	intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	linux-kernel@vger.kernel.org
Cc: Benjamin Tissoires <btissoir@redhat.com>, Lyude <cpaul@redhat.com>
Subject: [PATCH] drm/i915: intel_hpd_init(): Don't check connectors for an encoder
Date: Tue,  5 Jan 2016 14:53:08 -0500	[thread overview]
Message-ID: <1452023588-3857-1-git-send-email-cpaul@redhat.com> (raw)

There's no reason to check for an active encoder when setting up hpd,
especially since a disconnected connector isn't going to have an encoder
in the first place. This fixes reprobing display connectors on resume.

Signed-off-by: Lyude <cpaul@redhat.com>
---
After some talking with danvet on IRC, I learned that calling
drm_helper_hpd_irq_event() does actually trigger a full reprobe of each
connector's status. It turns out this is the actual reason reprobing on resume
hasn't been working (this was observed on a T440s):

	- We call hpd_init()
	- We check each connector for a couple of things before marking
	  connector->polled with DRM_CONNECTOR_POLL_HPD, one of which is an
	  active encoder. Of course, a disconnected port won't have an active
	  encoder, so we don't add the flag to any of the connector's.
	- We call drm_helper_hpd_irq_event()
	- drm_helper_irq_event() checks each connector for the
	  DRM_CONNECTOR_POLL_HPD flag. The only one that has it is eDP-1, so we
	  skip reprobing each connector except that one.

 drivers/gpu/drm/i915/intel_hotplug.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_hotplug.c b/drivers/gpu/drm/i915/intel_hotplug.c
index b177857..18797bc 100644
--- a/drivers/gpu/drm/i915/intel_hotplug.c
+++ b/drivers/gpu/drm/i915/intel_hotplug.c
@@ -468,7 +468,7 @@ void intel_hpd_init(struct drm_i915_private *dev_priv)
 	list_for_each_entry(connector, &mode_config->connector_list, head) {
 		struct intel_connector *intel_connector = to_intel_connector(connector);
 		connector->polled = intel_connector->polled;
-		if (connector->encoder && !connector->polled && I915_HAS_HOTPLUG(dev) && intel_connector->encoder->hpd_pin > HPD_NONE)
+		if (!connector->polled && I915_HAS_HOTPLUG(dev) && intel_connector->encoder->hpd_pin > HPD_NONE)
 			connector->polled = DRM_CONNECTOR_POLL_HPD;
 		if (intel_connector->mst_port)
 			connector->polled = DRM_CONNECTOR_POLL_HPD;
-- 
2.5.0


             reply	other threads:[~2016-01-05 19:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-05 19:53 Lyude [this message]
2016-01-05 20:05 ` [Intel-gfx] [PATCH] drm/i915: intel_hpd_init(): Don't check connectors for an encoder Daniel Vetter
2016-01-05 20:09   ` Daniel Vetter
2016-01-05 21:15     ` [PATCH v2] drm/i915: intel_hpd_init(): Fix suspend/resume reprobing Lyude
2016-01-06  7:27       ` [Intel-gfx] " Daniel Vetter
2016-01-07 15:43         ` [PATCH v3] " Lyude
2016-01-07 16:10           ` [Intel-gfx] " Daniel Vetter

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=1452023588-3857-1-git-send-email-cpaul@redhat.com \
    --to=cpaul@redhat.com \
    --cc=airlied@linux.ie \
    --cc=btissoir@redhat.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).