@@ -1426,6 +1426,7 @@ intel_dp_link_down(struct intel_dp *intel_dp)
struct drm_device *dev = intel_dp->base.base.dev;
struct drm_i915_private *dev_priv = dev->dev_private;
uint32_t DP = intel_dp->DP;
+ struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.base.crtc);
if ((I915_READ(intel_dp->output_reg) & DP_PORT_EN) == 0)
return;
@@ -1453,9 +1454,9 @@ intel_dp_link_down(struct intel_dp *intel_dp)
if (is_edp(intel_dp))
DP |= DP_LINK_TRAIN_OFF;
- if (!HAS_PCH_CPT(dev) &&
+ /* CRTC may be NULL if this DP link has never been configured */
+ if (!HAS_PCH_CPT(dev) && intel_crtc &&
I915_READ(intel_dp->output_reg) & DP_PIPEB_SELECT) {
- struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.base.crtc);
/* Hardware workaround: leaving our transcoder select
* set to transcoder B while it's off will prevent the
* corresponding HDMI output on transcoder A.