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

Message ID 20191213195217.15168-3-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 skylake_scaler_disable() just like we already do for
for its ancestor ironlake_pfit_disable().

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 | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

José Roberto de Souza 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 skylake_scaler_disable() just like we already do for
> for its ancestor ironlake_pfit_disable().
> 

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 | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> b/drivers/gpu/drm/i915/display/intel_display.c
> index 4adcd751384e..30f277aa228f 100644
> --- a/drivers/gpu/drm/i915/display/intel_display.c
> +++ b/drivers/gpu/drm/i915/display/intel_display.c
> @@ -5769,8 +5769,9 @@ static int skl_update_scaler_plane(struct
> intel_crtc_state *crtc_state,
>  	return 0;
>  }
>  
> -static void skylake_scaler_disable(struct intel_crtc *crtc)
> +static void skylake_scaler_disable(const struct intel_crtc_state
> *old_crtc_state)
>  {
> +	struct intel_crtc *crtc = to_intel_crtc(old_crtc_state-
> >uapi.crtc);
>  	int i;
>  
>  	for (i = 0; i < crtc->num_scalers; i++)
> @@ -6762,7 +6763,7 @@ static void haswell_crtc_disable(struct
> intel_atomic_state *state,
>  	intel_dsc_disable(old_crtc_state);
>  
>  	if (INTEL_GEN(dev_priv) >= 9)
> -		skylake_scaler_disable(crtc);
> +		skylake_scaler_disable(old_crtc_state);
>  	else
>  		ironlake_pfit_disable(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 4adcd751384e..30f277aa228f 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -5769,8 +5769,9 @@  static int skl_update_scaler_plane(struct intel_crtc_state *crtc_state,
 	return 0;
 }
 
-static void skylake_scaler_disable(struct intel_crtc *crtc)
+static void skylake_scaler_disable(const struct intel_crtc_state *old_crtc_state)
 {
+	struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->uapi.crtc);
 	int i;
 
 	for (i = 0; i < crtc->num_scalers; i++)
@@ -6762,7 +6763,7 @@  static void haswell_crtc_disable(struct intel_atomic_state *state,
 	intel_dsc_disable(old_crtc_state);
 
 	if (INTEL_GEN(dev_priv) >= 9)
-		skylake_scaler_disable(crtc);
+		skylake_scaler_disable(old_crtc_state);
 	else
 		ironlake_pfit_disable(old_crtc_state);