diff mbox series

[2/3] drm/i915/display: Remove a redundant function argument from intel_psr_enable_source()

Message ID 20210303164201.31301-2-gwan-gyeong.mun@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/3] drm/i915/display: Move dc3co_exitline variable to struct intel_psr | expand

Commit Message

Gwan-gyeong Mun March 3, 2021, 4:42 p.m. UTC
It removes intel_crtc_state from function argument of
intel_psr_enable_source() in order to use intel_psr_enable_source()
without intel_crtc_state on other psr internal functions.
And we can get cpu_trancoder from intel_psr, therefore we don't need to
pass intel_crtc_state to this function.

Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Souza, Jose March 3, 2021, 5:51 p.m. UTC | #1
On Wed, 2021-03-03 at 18:42 +0200, Gwan-gyeong Mun wrote:
> It removes intel_crtc_state from function argument of
> intel_psr_enable_source() in order to use intel_psr_enable_source()
> without intel_crtc_state on other psr internal functions.
> And we can get cpu_trancoder from intel_psr, therefore we don't need to
> pass intel_crtc_state to this function.

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> 
> Cc: José Roberto de Souza <jose.souza@intel.com>
> Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index 976826653143..ea8f9598e6a3 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -896,11 +896,10 @@ static void intel_psr_activate(struct intel_dp *intel_dp)
>  	intel_dp->psr.active = true;
>  }
>  
> 
> 
> 
> -static void intel_psr_enable_source(struct intel_dp *intel_dp,
> -				    const struct intel_crtc_state *crtc_state)
> +static void intel_psr_enable_source(struct intel_dp *intel_dp)
>  {
>  	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> -	enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
> +	enum transcoder cpu_transcoder = intel_dp->psr.transcoder;
>  	u32 mask;
>  
> 
> 
> 
>  	/* Only HSW and BDW have PSR AUX registers that need to be setup. SKL+
> @@ -1007,7 +1006,7 @@ static void intel_psr_enable_locked(struct intel_dp *intel_dp,
>  				     &intel_dp->psr.vsc);
>  	intel_write_dp_vsc_sdp(encoder, crtc_state, &intel_dp->psr.vsc);
>  	intel_psr_enable_sink(intel_dp);
> -	intel_psr_enable_source(intel_dp, crtc_state);
> +	intel_psr_enable_source(intel_dp);
>  	intel_dp->psr.enabled = true;
>  
> 
> 
> 
>  	intel_psr_activate(intel_dp);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 976826653143..ea8f9598e6a3 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -896,11 +896,10 @@  static void intel_psr_activate(struct intel_dp *intel_dp)
 	intel_dp->psr.active = true;
 }
 
-static void intel_psr_enable_source(struct intel_dp *intel_dp,
-				    const struct intel_crtc_state *crtc_state)
+static void intel_psr_enable_source(struct intel_dp *intel_dp)
 {
 	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
-	enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
+	enum transcoder cpu_transcoder = intel_dp->psr.transcoder;
 	u32 mask;
 
 	/* Only HSW and BDW have PSR AUX registers that need to be setup. SKL+
@@ -1007,7 +1006,7 @@  static void intel_psr_enable_locked(struct intel_dp *intel_dp,
 				     &intel_dp->psr.vsc);
 	intel_write_dp_vsc_sdp(encoder, crtc_state, &intel_dp->psr.vsc);
 	intel_psr_enable_sink(intel_dp);
-	intel_psr_enable_source(intel_dp, crtc_state);
+	intel_psr_enable_source(intel_dp);
 	intel_dp->psr.enabled = true;
 
 	intel_psr_activate(intel_dp);