]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/i915: WARN if power sequencer is not connected to the LVDS port on pre-ilk
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 18 May 2018 15:29:31 +0000 (18:29 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 23 May 2018 14:23:07 +0000 (17:23 +0300)
We don't support using the power sequencer with other ports besides LVDS
on pre-ilk platforms. WARN if someone has mistakenly connected the power
sequencer to the wrong port.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180518152931.13104-7-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_display.c

index 3a0709a6e4a0b3910d6d3ffc6a42c5d41dd148c1..aab1c6c58edf612c8f9f5386a34213fa3f334210 100644 (file)
@@ -1236,7 +1236,12 @@ void assert_panel_unlocked(struct drm_i915_private *dev_priv, enum pipe pipe)
                pp_reg = PP_CONTROL(pipe);
                panel_pipe = pipe;
        } else {
+               u32 port_sel;
+
                pp_reg = PP_CONTROL(0);
+               port_sel = I915_READ(PP_ON_DELAYS(0)) & PANEL_PORT_SELECT_MASK;
+
+               WARN_ON(port_sel != PANEL_PORT_SELECT_LVDS);
                intel_lvds_port_enabled(dev_priv, LVDS, &panel_pipe);
        }