[4/5] drm/i915: Pass old crtc state to intel_crtc_vblank_off()
diff mbox series

Message ID 20191213195217.15168-4-ville.syrjala@linux.intel.com
State New
Headers show
Series
  • [1/5] drm/i915: Call hsw_fdi_link_train() directly()
Related show

Commit Message

Ville Syrjälä Dec. 13, 2019, 7:52 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

To make life easier in the future let's pass the old crtc state
to intel_crtc_vblank_off() just like we already do for its
counterpart intel_crtc_vblank_on().

Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Souza, Jose Dec. 16, 2019, 10:01 p.m. UTC | #1
On Fri, 2019-12-13 at 21:52 +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> To make life easier in the future let's pass the old crtc state
> to intel_crtc_vblank_off() just like we already do for its
> counterpart intel_crtc_vblank_on().

Okay this helps the last patch
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> 
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Cc: Manasi Navare <manasi.d.navare@intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_display.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index 30f277aa228f..df69e4cd4707 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -1825,8 +1825,10 @@ static void intel_crtc_vblank_on(const struct
> intel_crtc_state *crtc_state)
>  	drm_crtc_vblank_on(&crtc->base);
>  }
>  
> -static void intel_crtc_vblank_off(struct intel_crtc *crtc)
> +static void intel_crtc_vblank_off(const struct intel_crtc_state
> *crtc_state)
>  {
> +	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> +
>  	drm_crtc_vblank_off(&crtc->base);
>  	assert_vblank_disabled(&crtc->base);
>  }
> @@ -6699,7 +6701,7 @@ static void ironlake_crtc_disable(struct
> intel_atomic_state *state,
>  
>  	intel_encoders_disable(state, crtc);
>  
> -	intel_crtc_vblank_off(crtc);
> +	intel_crtc_vblank_off(old_crtc_state);
>  
>  	intel_disable_pipe(old_crtc_state);
>  
> @@ -6748,7 +6750,7 @@ static void haswell_crtc_disable(struct
> intel_atomic_state *state,
>  
>  	intel_encoders_disable(state, crtc);
>  
> -	intel_crtc_vblank_off(crtc);
> +	intel_crtc_vblank_off(old_crtc_state);
>  
>  	/* XXX: Do the pipe assertions at the right place for BXT DSI.
> */
>  	if (!transcoder_is_dsi(cpu_transcoder))
> @@ -7113,7 +7115,7 @@ static void i9xx_crtc_disable(struct
> intel_atomic_state *state,
>  
>  	intel_encoders_disable(state, crtc);
>  
> -	intel_crtc_vblank_off(crtc);
> +	intel_crtc_vblank_off(old_crtc_state);
>  
>  	intel_disable_pipe(old_crtc_state);
>

Patch
diff mbox series

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 30f277aa228f..df69e4cd4707 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -1825,8 +1825,10 @@  static void intel_crtc_vblank_on(const struct intel_crtc_state *crtc_state)
 	drm_crtc_vblank_on(&crtc->base);
 }
 
-static void intel_crtc_vblank_off(struct intel_crtc *crtc)
+static void intel_crtc_vblank_off(const struct intel_crtc_state *crtc_state)
 {
+	struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+
 	drm_crtc_vblank_off(&crtc->base);
 	assert_vblank_disabled(&crtc->base);
 }
@@ -6699,7 +6701,7 @@  static void ironlake_crtc_disable(struct intel_atomic_state *state,
 
 	intel_encoders_disable(state, crtc);
 
-	intel_crtc_vblank_off(crtc);
+	intel_crtc_vblank_off(old_crtc_state);
 
 	intel_disable_pipe(old_crtc_state);
 
@@ -6748,7 +6750,7 @@  static void haswell_crtc_disable(struct intel_atomic_state *state,
 
 	intel_encoders_disable(state, crtc);
 
-	intel_crtc_vblank_off(crtc);
+	intel_crtc_vblank_off(old_crtc_state);
 
 	/* XXX: Do the pipe assertions at the right place for BXT DSI. */
 	if (!transcoder_is_dsi(cpu_transcoder))
@@ -7113,7 +7115,7 @@  static void i9xx_crtc_disable(struct intel_atomic_state *state,
 
 	intel_encoders_disable(state, crtc);
 
-	intel_crtc_vblank_off(crtc);
+	intel_crtc_vblank_off(old_crtc_state);
 
 	intel_disable_pipe(old_crtc_state);