diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index cb8578b7e443..a4d80314e7f8 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1470,7 +1470,8 @@ intel_dp_link_down(struct intel_dp *intel_dp) | |||
1470 | 1470 | ||
1471 | if (!HAS_PCH_CPT(dev) && | 1471 | if (!HAS_PCH_CPT(dev) && |
1472 | I915_READ(intel_dp->output_reg) & DP_PIPEB_SELECT) { | 1472 | I915_READ(intel_dp->output_reg) & DP_PIPEB_SELECT) { |
1473 | struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.base.crtc); | 1473 | struct drm_crtc *crtc = intel_dp->base.base.crtc; |
1474 | |||
1474 | /* Hardware workaround: leaving our transcoder select | 1475 | /* Hardware workaround: leaving our transcoder select |
1475 | * set to transcoder B while it's off will prevent the | 1476 | * set to transcoder B while it's off will prevent the |
1476 | * corresponding HDMI output on transcoder A. | 1477 | * corresponding HDMI output on transcoder A. |
@@ -1485,7 +1486,19 @@ intel_dp_link_down(struct intel_dp *intel_dp) | |||
1485 | /* Changes to enable or select take place the vblank | 1486 | /* Changes to enable or select take place the vblank |
1486 | * after being written. | 1487 | * after being written. |
1487 | */ | 1488 | */ |
1488 | intel_wait_for_vblank(dev, intel_crtc->pipe); | 1489 | if (crtc == NULL) { |
1490 | /* We can arrive here never having been attached | ||
1491 | * to a CRTC, for instance, due to inheriting | ||
1492 | * random state from the BIOS. | ||
1493 | * | ||
1494 | * If the pipe is not running, play safe and | ||
1495 | * wait for the clocks to stabilise before | ||
1496 | * continuing. | ||
1497 | */ | ||
1498 | POSTING_READ(intel_dp->output_reg); | ||
1499 | msleep(50); | ||
1500 | } else | ||
1501 | intel_wait_for_vblank(dev, to_intel_crtc(crtc)->pipe); | ||
1489 | } | 1502 | } |
1490 | 1503 | ||
1491 | I915_WRITE(intel_dp->output_reg, DP & ~DP_PORT_EN); | 1504 | I915_WRITE(intel_dp->output_reg, DP & ~DP_PORT_EN); |