diff mbox

drm/i915: Initialize panel_pipe to INVALID_PIPE

Message ID 20180523145718.22932-1-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä May 23, 2018, 2:57 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We can always figure out which pipe is affected by the panel power
sequencer lockout mechanism. So no need for the pipe A fallback
anymore. The only case we may have to worry about is an invalid
port select in the power sequencer, but INVALID_PIPE is just fine
in that case. We'll get the WARN about the bogus pps port select
anyway.

Cc: Jani Nikula <jani.nikula@intel.com>
Suggested-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jani Nikula May 23, 2018, 3:12 p.m. UTC | #1
On Wed, 23 May 2018, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> We can always figure out which pipe is affected by the panel power
> sequencer lockout mechanism. So no need for the pipe A fallback
> anymore. The only case we may have to worry about is an invalid
> port select in the power sequencer, but INVALID_PIPE is just fine
> in that case. We'll get the WARN about the bogus pps port select
> anyway.
>
> Cc: Jani Nikula <jani.nikula@intel.com>
> Suggested-by: Jani Nikula <jani.nikula@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

Reviewed-by: Jani Nikula <jani.nikula@intel.com>

Hmm, do the same for cpt_dp_port_selected() fail path? Or keep that as
pipe A to cause mismatch and error?


> ---
>  drivers/gpu/drm/i915/intel_display.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index 1afd70fdbd85..25285939f987 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -1202,7 +1202,7 @@ void assert_panel_unlocked(struct drm_i915_private *dev_priv, enum pipe pipe)
>  {
>  	i915_reg_t pp_reg;
>  	u32 val;
> -	enum pipe panel_pipe = PIPE_A;
> +	enum pipe panel_pipe = INVALID_PIPE;
>  	bool locked = true;
>  
>  	if (WARN_ON(HAS_DDI(dev_priv)))
Ville Syrjälä May 23, 2018, 3:21 p.m. UTC | #2
On Wed, May 23, 2018 at 06:12:44PM +0300, Jani Nikula wrote:
> On Wed, 23 May 2018, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > We can always figure out which pipe is affected by the panel power
> > sequencer lockout mechanism. So no need for the pipe A fallback
> > anymore. The only case we may have to worry about is an invalid
> > port select in the power sequencer, but INVALID_PIPE is just fine
> > in that case. We'll get the WARN about the bogus pps port select
> > anyway.
> >
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Suggested-by: Jani Nikula <jani.nikula@intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> 
> Hmm, do the same for cpt_dp_port_selected() fail path? Or keep that as
> pipe A to cause mismatch and error?

I think we can change it back to INVALID_PIPE too. I had some idea why
I'd have to make it a valid pipe even if the port is disabled, but I
guess that was just nonsense. Or at least I can't see why anything
would fail badly with INVALID_PIPE now.

> 
> 
> > ---
> >  drivers/gpu/drm/i915/intel_display.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index 1afd70fdbd85..25285939f987 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -1202,7 +1202,7 @@ void assert_panel_unlocked(struct drm_i915_private *dev_priv, enum pipe pipe)
> >  {
> >  	i915_reg_t pp_reg;
> >  	u32 val;
> > -	enum pipe panel_pipe = PIPE_A;
> > +	enum pipe panel_pipe = INVALID_PIPE;
> >  	bool locked = true;
> >  
> >  	if (WARN_ON(HAS_DDI(dev_priv)))
> 
> -- 
> Jani Nikula, Intel Open Source Graphics Center
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 1afd70fdbd85..25285939f987 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1202,7 +1202,7 @@  void assert_panel_unlocked(struct drm_i915_private *dev_priv, enum pipe pipe)
 {
 	i915_reg_t pp_reg;
 	u32 val;
-	enum pipe panel_pipe = PIPE_A;
+	enum pipe panel_pipe = INVALID_PIPE;
 	bool locked = true;
 
 	if (WARN_ON(HAS_DDI(dev_priv)))