drm/i915: WARN on !crtc in intel_dp_link_down
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 29 Nov 2012 14:59:34 +0000 (15:59 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 6 Dec 2012 13:37:00 +0000 (14:37 +0100)
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>
drivers/gpu/drm/i915/intel_dp.c

index 89164c553b2d0621f441f2419206a06034ef8516..84652ca3b161a2a1da301e2a71ab485cf95c6504 100644 (file)
@@ -2098,15 +2098,10 @@ intel_dp_link_down(struct intel_dp *intel_dp)
                /* Changes to enable or select take place the vblank
                 * after being written.
                 */
-               if (crtc == NULL) {
-                       /* We can arrive here never having been attached
-                        * to a CRTC, for instance, due to inheriting
-                        * random state from the BIOS.
-                        *
-                        * If the pipe is not running, play safe and
-                        * wait for the clocks to stabilise before
-                        * continuing.
-                        */
+               if (WARN_ON(crtc == NULL)) {
+                       /* We should never try to disable a port without a crtc
+                        * attached. For paranoia keep the code around for a
+                        * bit. */
                        POSTING_READ(intel_dp->output_reg);
                        msleep(50);
                } else