* [PATCH] drm/i915: Avoid spurious WARNs about the wrong pipe in the PPS code
@ 2017-02-08 17:52 ville.syrjala
2017-02-09 10:29 ` Imre Deak
0 siblings, 1 reply; 3+ messages in thread
From: ville.syrjala @ 2017-02-08 17:52 UTC (permalink / raw)
To: intel-gfx; +Cc: Imre Deak, stable
From: Ville Syrjälä <ville.syrjala@linux.intel.com>
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>
Cc: stable@vger.kernel.org
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>
---
drivers/gpu/drm/i915/intel_dp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 0f14e97e519b..2395046e19ce 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2905,6 +2905,9 @@ static void vlv_detach_power_sequencer(struct intel_dp *intel_dp)
WARN_ON(intel_dp->active_pipe != INVALID_PIPE);
+ if (WARN_ON(pipe != PIPE_A && pipe != PIPE_B))
+ return;
+
edp_panel_vdd_off_sync(intel_dp);
/*
@@ -2932,9 +2935,6 @@ static void vlv_steal_power_sequencer(struct drm_device *dev,
lockdep_assert_held(&dev_priv->pps_mutex);
- if (WARN_ON(pipe != PIPE_A && pipe != PIPE_B))
- return;
-
for_each_intel_encoder(dev, encoder) {
struct intel_dp *intel_dp;
enum port port;
--
2.10.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Avoid spurious WARNs about the wrong pipe in the PPS code
2017-02-08 17:52 [PATCH] drm/i915: Avoid spurious WARNs about the wrong pipe in the PPS code ville.syrjala
@ 2017-02-09 10:29 ` Imre Deak
2017-02-10 16:52 ` Ville Syrjälä
0 siblings, 1 reply; 3+ messages in thread
From: Imre Deak @ 2017-02-09 10:29 UTC (permalink / raw)
To: ville.syrjala; +Cc: intel-gfx, stable
On Wed, Feb 08, 2017 at 07:52:54PM +0200, ville.syrjala@linux.intel.com wrote:
> From: Ville Syrj�l� <ville.syrjala@linux.intel.com>
>
> 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>
> Cc: stable@vger.kernel.org
> 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>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 0f14e97e519b..2395046e19ce 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2905,6 +2905,9 @@ static void vlv_detach_power_sequencer(struct intel_dp *intel_dp)
>
> WARN_ON(intel_dp->active_pipe != INVALID_PIPE);
>
> + if (WARN_ON(pipe != PIPE_A && pipe != PIPE_B))
> + return;
> +
Yep, missed this:
Reviewed-by: Imre Deak <imre.deak@intel.com>
So the above is called only for eDP, checking for that too would make
things clearer imo.
> edp_panel_vdd_off_sync(intel_dp);
>
> /*
> @@ -2932,9 +2935,6 @@ static void vlv_steal_power_sequencer(struct drm_device *dev,
>
> lockdep_assert_held(&dev_priv->pps_mutex);
>
> - if (WARN_ON(pipe != PIPE_A && pipe != PIPE_B))
> - return;
> -
> for_each_intel_encoder(dev, encoder) {
> struct intel_dp *intel_dp;
> enum port port;
> --
> 2.10.2
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: Avoid spurious WARNs about the wrong pipe in the PPS code
2017-02-09 10:29 ` Imre Deak
@ 2017-02-10 16:52 ` Ville Syrjälä
0 siblings, 0 replies; 3+ messages in thread
From: Ville Syrjälä @ 2017-02-10 16:52 UTC (permalink / raw)
To: Imre Deak; +Cc: intel-gfx, stable
On Thu, Feb 09, 2017 at 12:29:04PM +0200, Imre Deak wrote:
> On Wed, Feb 08, 2017 at 07:52:54PM +0200, ville.syrjala@linux.intel.com wrote:
> > From: Ville Syrj�l� <ville.syrjala@linux.intel.com>
> >
> > 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>
> > Cc: stable@vger.kernel.org
> > 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>
> > ---
> > drivers/gpu/drm/i915/intel_dp.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> > index 0f14e97e519b..2395046e19ce 100644
> > --- a/drivers/gpu/drm/i915/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/intel_dp.c
> > @@ -2905,6 +2905,9 @@ static void vlv_detach_power_sequencer(struct intel_dp *intel_dp)
> >
> > WARN_ON(intel_dp->active_pipe != INVALID_PIPE);
> >
> > + if (WARN_ON(pipe != PIPE_A && pipe != PIPE_B))
> > + return;
> > +
>
> Yep, missed this:
> Reviewed-by: Imre Deak <imre.deak@intel.com>
>
> So the above is called only for eDP, checking for that too would make
> things clearer imo.
We should have some is_edp() warns in the even lower level stuff,
I think. Not sure if we should have moved the pipe check even lower as
well. Oh well, at least this should shut up the spurious warns.
Pushed to dinq, thanks for the review.
>
> > edp_panel_vdd_off_sync(intel_dp);
> >
> > /*
> > @@ -2932,9 +2935,6 @@ static void vlv_steal_power_sequencer(struct drm_device *dev,
> >
> > lockdep_assert_held(&dev_priv->pps_mutex);
> >
> > - if (WARN_ON(pipe != PIPE_A && pipe != PIPE_B))
> > - return;
> > -
> > for_each_intel_encoder(dev, encoder) {
> > struct intel_dp *intel_dp;
> > enum port port;
> > --
> > 2.10.2
> >
--
Ville Syrj�l�
Intel OTC
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-10 16:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-08 17:52 [PATCH] drm/i915: Avoid spurious WARNs about the wrong pipe in the PPS code ville.syrjala
2017-02-09 10:29 ` Imre Deak
2017-02-10 16:52 ` Ville Syrjälä
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).