aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2017-02-08 12:52:54 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-03-14 22:02:51 -0400
commit686ea5862eb61e070881c221271f6563cb74a7f0 (patch)
tree1620722c6a207a98a3b04f677bc2ddb2e90fcaaa /drivers/gpu/drm
parent967e17bcc96da9ab48fd621a6859d1ca55e82df9 (diff)
drm/i915: Avoid spurious WARNs about the wrong pipe in the PPS code
commit aa9323dd49b23932a09023012f050556de64f118 upstream. Until recently vlv_steal_power_sequencer() wasn't being called for normal DP ports, and hence it could assert that it should only be called for pipe A and B (since pipe C doesn't support eDP). However that changed when we started to consider normal DP ports as well when choosing a PPS. So we will now get spurious warnings when vlv_steal_power_sequencer() does get called for pipe C. Avoid this by moving the WARN down into vlv_detach_power_sequencer() where this assertion should still hold. Cc: Imre Deak <imre.deak@intel.com> Fixes: 9f2bdb006a7e ("drm/i915: Prevent PPS stealing from a normal DP port on VLV/CHV") References: https://bugs.freedesktop.org/show_bug.cgi?id=95287 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170208175254.10958-1-ville.syrjala@linux.intel.com Reviewed-by: Imre Deak <imre.deak@intel.com> (cherry picked from commit d158694f452252d0fef335a775aeb3eb74fe7af0) Signed-off-by: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 055525013d2f..7b06280b23aa 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2832,6 +2832,9 @@ static void vlv_detach_power_sequencer(struct intel_dp *intel_dp)
2832 enum pipe pipe = intel_dp->pps_pipe; 2832 enum pipe pipe = intel_dp->pps_pipe;
2833 i915_reg_t pp_on_reg = PP_ON_DELAYS(pipe); 2833 i915_reg_t pp_on_reg = PP_ON_DELAYS(pipe);
2834 2834
2835 if (WARN_ON(pipe != PIPE_A && pipe != PIPE_B))
2836 return;
2837
2835 edp_panel_vdd_off_sync(intel_dp); 2838 edp_panel_vdd_off_sync(intel_dp);
2836 2839
2837 /* 2840 /*
@@ -2859,9 +2862,6 @@ static void vlv_steal_power_sequencer(struct drm_device *dev,
2859 2862
2860 lockdep_assert_held(&dev_priv->pps_mutex); 2863 lockdep_assert_held(&dev_priv->pps_mutex);
2861 2864
2862 if (WARN_ON(pipe != PIPE_A && pipe != PIPE_B))
2863 return;
2864
2865 for_each_intel_encoder(dev, encoder) { 2865 for_each_intel_encoder(dev, encoder) {
2866 struct intel_dp *intel_dp; 2866 struct intel_dp *intel_dp;
2867 enum port port; 2867 enum port port;