From: Damien Lespiau <damien.lespiau@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: Don't try to set the DP sink power state on disconnected monitors
Date: Thu, 12 Dec 2013 15:34:24 +0000 [thread overview]
Message-ID: <1386862464-29363-1-git-send-email-damien.lespiau@intel.com> (raw)
While looking at some debug traces, I noticed that we were always trying
to set the sink power, even when we previously identified that the
connector was in the disconnected state.
In that case, we don't a big chance for the write to succeed, so don't
try.
[drm:drm_helper_probe_single_connector_modes], [CONNECTOR:30:DP-3]
[drm:intel_dp_detect], [CONNECTOR:30:DP-3]
[drm:drm_helper_probe_single_connector_modes], [CONNECTOR:30:DP-3] disconnected
[drm:intel_dp_aux_ch], dp_aux_ch timeout status 0x7015003f
[drm:intel_dp_sink_dpms], failed to write sink power state
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 9b40113..006bca5 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1361,18 +1361,21 @@ static void ironlake_edp_pll_off(struct intel_dp *intel_dp)
/* If the sink supports it, try to set the power state appropriately */
void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode)
{
+ struct intel_connector *intel_connector = intel_dp->attached_connector;
+ struct drm_connector *connector = &intel_connector->base;
int ret, i;
/* Should have a valid DPCD by this point */
if (intel_dp->dpcd[DP_DPCD_REV] < 0x11)
return;
- if (mode != DRM_MODE_DPMS_ON) {
+ if (mode != DRM_MODE_DPMS_ON &&
+ connector->status != connector_status_disconnected) {
ret = intel_dp_aux_native_write_1(intel_dp, DP_SET_POWER,
DP_SET_POWER_D3);
if (ret != 1)
DRM_DEBUG_DRIVER("failed to write sink power state\n");
- } else {
+ } else if (mode == DRM_MODE_DPMS_ON) {
/*
* When turning on, we need to retry for 1ms to give the sink
* time to wake up.
--
1.8.3.1
next reply other threads:[~2013-12-12 15:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-12 15:34 Damien Lespiau [this message]
2013-12-12 16:50 ` [PATCH] drm/i915: Don't try to set the DP sink power state on disconnected monitors 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=1386862464-29363-1-git-send-email-damien.lespiau@intel.com \
--to=damien.lespiau@intel.com \
--cc=intel-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox