drm/i915: Pass cpu_transcoder to assert_pipe_disabled() always
diff mbox series

Message ID 20200108145616.7349-1-ville.syrjala@linux.intel.com
State New
Headers show
Series
  • drm/i915: Pass cpu_transcoder to assert_pipe_disabled() always
Related show

Commit Message

Ville Syrjälä Jan. 8, 2020, 2:56 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

I missed a few assert_pipe_disabled() cases when changing it to
take enum transcoder instead of enum pipe, making sparse unhappy.
Convert the leftovers.

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
 drivers/gpu/drm/i915/display/intel_tv.c | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Chris Wilson Jan. 8, 2020, 3:48 p.m. UTC | #1
Quoting Ville Syrjala (2020-01-08 14:56:16)
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> I missed a few assert_pipe_disabled() cases when changing it to
> take enum transcoder instead of enum pipe, making sparse unhappy.
> Convert the leftovers.
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c | 4 ++--
>  drivers/gpu/drm/i915/display/intel_tv.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 991f343579ef..7c76d437906b 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -3085,7 +3085,7 @@ static void ilk_edp_pll_on(struct intel_dp *intel_dp,
>         struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
>         struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
>  
> -       assert_pipe_disabled(dev_priv, crtc->pipe);
> +       assert_pipe_disabled(dev_priv, pipe_config->cpu_transcoder);
>         assert_dp_port_disabled(intel_dp);
>         assert_edp_pll_disabled(dev_priv);
>  
> @@ -3125,7 +3125,7 @@ static void ilk_edp_pll_off(struct intel_dp *intel_dp,
>         struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->uapi.crtc);
>         struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
>  
> -       assert_pipe_disabled(dev_priv, crtc->pipe);
> +       assert_pipe_disabled(dev_priv, old_crtc_state->cpu_transcoder);
>         assert_dp_port_disabled(intel_dp);
>         assert_edp_pll_enabled(dev_priv);
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_tv.c b/drivers/gpu/drm/i915/display/intel_tv.c
> index 50703536436c..4f3f902e4a9a 100644
> --- a/drivers/gpu/drm/i915/display/intel_tv.c
> +++ b/drivers/gpu/drm/i915/display/intel_tv.c
> @@ -1527,7 +1527,7 @@ static void intel_tv_pre_enable(struct intel_encoder *encoder,
>                            ((video_levels->black << TV_BLACK_LEVEL_SHIFT) |
>                             (video_levels->blank << TV_BLANK_LEVEL_SHIFT)));
>  
> -       assert_pipe_disabled(dev_priv, intel_crtc->pipe);
> +       assert_pipe_disabled(dev_priv, pipe_config->cpu_transcoder);

Only this one is not clear from context alone...
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 991f343579ef..7c76d437906b 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -3085,7 +3085,7 @@  static void ilk_edp_pll_on(struct intel_dp *intel_dp,
 	struct intel_crtc *crtc = to_intel_crtc(pipe_config->uapi.crtc);
 	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
 
-	assert_pipe_disabled(dev_priv, crtc->pipe);
+	assert_pipe_disabled(dev_priv, pipe_config->cpu_transcoder);
 	assert_dp_port_disabled(intel_dp);
 	assert_edp_pll_disabled(dev_priv);
 
@@ -3125,7 +3125,7 @@  static void ilk_edp_pll_off(struct intel_dp *intel_dp,
 	struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->uapi.crtc);
 	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
 
-	assert_pipe_disabled(dev_priv, crtc->pipe);
+	assert_pipe_disabled(dev_priv, old_crtc_state->cpu_transcoder);
 	assert_dp_port_disabled(intel_dp);
 	assert_edp_pll_enabled(dev_priv);
 
diff --git a/drivers/gpu/drm/i915/display/intel_tv.c b/drivers/gpu/drm/i915/display/intel_tv.c
index 50703536436c..4f3f902e4a9a 100644
--- a/drivers/gpu/drm/i915/display/intel_tv.c
+++ b/drivers/gpu/drm/i915/display/intel_tv.c
@@ -1527,7 +1527,7 @@  static void intel_tv_pre_enable(struct intel_encoder *encoder,
 			   ((video_levels->black << TV_BLACK_LEVEL_SHIFT) |
 			    (video_levels->blank << TV_BLANK_LEVEL_SHIFT)));
 
-	assert_pipe_disabled(dev_priv, intel_crtc->pipe);
+	assert_pipe_disabled(dev_priv, pipe_config->cpu_transcoder);
 
 	/* Filter ctl must be set before TV_WIN_SIZE */
 	tv_filter_ctl = TV_AUTO_SCALE;