diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-06 06:20:45 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-07 17:46:11 -0500 |
commit | 1b39d6f37622f1da70aa2cfd38bfff9a52c13e05 (patch) | |
tree | a2402c55a1cd5db952a45bfa06f598100f56e299 /drivers/gpu | |
parent | 7a1948768c2998f5bddb2327696cbe3161f468ed (diff) |
drm/i915/dp: Only apply the workaround if the select is still active
As we may try to power down the link at various times, it is not
necessarily still coupled with an encoder and so we must be careful not
to depend upon an operation that is only valid when the link is still
attached to a pipe.
Fixes regression in 5bddd17.
Reported-and-tested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org [after applying 5bddd17]
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 1d8d068bc473..df648cb4c296 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1374,9 +1374,11 @@ intel_dp_link_down(struct intel_dp *intel_dp) | |||
1374 | { | 1374 | { |
1375 | struct drm_device *dev = intel_dp->base.base.dev; | 1375 | struct drm_device *dev = intel_dp->base.base.dev; |
1376 | struct drm_i915_private *dev_priv = dev->dev_private; | 1376 | struct drm_i915_private *dev_priv = dev->dev_private; |
1377 | struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.base.crtc); | ||
1378 | uint32_t DP = intel_dp->DP; | 1377 | uint32_t DP = intel_dp->DP; |
1379 | 1378 | ||
1379 | if ((I915_READ(intel_dp->output_reg) & DP_PORT_EN) == 0) | ||
1380 | return; | ||
1381 | |||
1380 | DRM_DEBUG_KMS("\n"); | 1382 | DRM_DEBUG_KMS("\n"); |
1381 | 1383 | ||
1382 | if (is_edp(intel_dp)) { | 1384 | if (is_edp(intel_dp)) { |
@@ -1400,7 +1402,9 @@ intel_dp_link_down(struct intel_dp *intel_dp) | |||
1400 | if (is_edp(intel_dp)) | 1402 | if (is_edp(intel_dp)) |
1401 | DP |= DP_LINK_TRAIN_OFF; | 1403 | DP |= DP_LINK_TRAIN_OFF; |
1402 | 1404 | ||
1403 | if (!HAS_PCH_CPT(dev) && (DP & DP_PIPEB_SELECT)) { | 1405 | if (!HAS_PCH_CPT(dev) && |
1406 | I915_READ(intel_dp->output_reg) & DP_PIPEB_SELECT) { | ||
1407 | struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.base.crtc); | ||
1404 | /* Hardware workaround: leaving our transcoder select | 1408 | /* Hardware workaround: leaving our transcoder select |
1405 | * set to transcoder B while it's off will prevent the | 1409 | * set to transcoder B while it's off will prevent the |
1406 | * corresponding HDMI output on transcoder A. | 1410 | * corresponding HDMI output on transcoder A. |