aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_dp.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-11-29 09:59:34 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-12-06 08:37:00 -0500
commitff50afe9aceb6264a4fbe40459da75170fb9a2a2 (patch)
treeafc80556f0d6fa7b77502f6f0de0660108004e53 /drivers/gpu/drm/i915/intel_dp.c
parentab527efc2feadcab1cad0740be307cb4153b493f (diff)
drm/i915: WARN on !crtc in intel_dp_link_down
This could have happened with the old crtc helper based modeset code, but can't happen any longer with the new code. Hence put in a WARN and adjust the comment. If no one hits this, we can eventually remove it (like a few other such cases across our code). Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 89164c553b2d..84652ca3b161 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2098,15 +2098,10 @@ intel_dp_link_down(struct intel_dp *intel_dp)
2098 /* Changes to enable or select take place the vblank 2098 /* Changes to enable or select take place the vblank
2099 * after being written. 2099 * after being written.
2100 */ 2100 */
2101 if (crtc == NULL) { 2101 if (WARN_ON(crtc == NULL)) {
2102 /* We can arrive here never having been attached 2102 /* We should never try to disable a port without a crtc
2103 * to a CRTC, for instance, due to inheriting 2103 * attached. For paranoia keep the code around for a
2104 * random state from the BIOS. 2104 * bit. */
2105 *
2106 * If the pipe is not running, play safe and
2107 * wait for the clocks to stabilise before
2108 * continuing.
2109 */
2110 POSTING_READ(intel_dp->output_reg); 2105 POSTING_READ(intel_dp->output_reg);
2111 msleep(50); 2106 msleep(50);
2112 } else 2107 } else