diff mbox series

drm/i915/panelreplay: Move out psr_init_dpcd() from init_connector()

Message ID 20240222180824.3634193-1-animesh.manna@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/panelreplay: Move out psr_init_dpcd() from init_connector() | expand

Commit Message

Manna, Animesh Feb. 22, 2024, 6:08 p.m. UTC
Move psr_init_dpcd() from init-connector to connector-detect
function.

Signed-off-by: Animesh Manna <animesh.manna@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c  | 3 +++
 drivers/gpu/drm/i915/display/intel_psr.c | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Jani Nikula Feb. 26, 2024, 5:47 p.m. UTC | #1
On Thu, 22 Feb 2024, Animesh Manna <animesh.manna@intel.com> wrote:
> Move psr_init_dpcd() from init-connector to connector-detect
> function.

Why?

The commit message *must* *always* answer the question why, unless the
reason is completely and utterly obvious (e.g. don't need to say why
typos need to be fixed).

BR,
Jani.

> Signed-off-by: Animesh Manna <animesh.manna@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp.c  | 3 +++
>  drivers/gpu/drm/i915/display/intel_psr.c | 3 ---
>  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 217196196e50..4553e1f5f1fc 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -5709,6 +5709,9 @@ intel_dp_detect(struct drm_connector *connector,
>  		goto out;
>  	}
>  
> +	if (!intel_dp_is_edp(intel_dp))
> +		intel_psr_init_dpcd(intel_dp);
> +
>  	intel_dp_detect_dsc_caps(intel_dp, intel_connector);
>  
>  	intel_dp_configure_mst(intel_dp);
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index 72cadad09db5..6927785fd6ff 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -2883,9 +2883,6 @@ void intel_psr_init(struct intel_dp *intel_dp)
>  	if (!(HAS_PSR(dev_priv) || HAS_DP20(dev_priv)))
>  		return;
>  
> -	if (!intel_dp_is_edp(intel_dp))
> -		intel_psr_init_dpcd(intel_dp);
> -
>  	/*
>  	 * HSW spec explicitly says PSR is tied to port A.
>  	 * BDW+ platforms have a instance of PSR registers per transcoder but
Manna, Animesh Feb. 27, 2024, 7:48 a.m. UTC | #2
> -----Original Message-----
> From: Jani Nikula <jani.nikula@linux.intel.com>
> Sent: Monday, February 26, 2024 11:17 PM
> To: Manna, Animesh <animesh.manna@intel.com>; intel-
> gfx@lists.freedesktop.org
> Cc: ville.syrjala@linux.intel.com; Hogander, Jouni
> <jouni.hogander@intel.com>; Murthy, Arun R <arun.r.murthy@intel.com>;
> Manna, Animesh <animesh.manna@intel.com>
> Subject: Re: [PATCH] drm/i915/panelreplay: Move out psr_init_dpcd() from
> init_connector()
> 
> On Thu, 22 Feb 2024, Animesh Manna <animesh.manna@intel.com> wrote:
> > Move psr_init_dpcd() from init-connector to connector-detect function.
> 
> Why?
> 
> The commit message *must* *always* answer the question why, unless the
> reason is completely and utterly obvious (e.g. don't need to say why typos
> need to be fixed).

Agree, will add. Thanks for review.

Regards,
Animesh

> 
> BR,
> Jani.
> 
> > Signed-off-by: Animesh Manna <animesh.manna@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_dp.c  | 3 +++
> > drivers/gpu/drm/i915/display/intel_psr.c | 3 ---
> >  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 217196196e50..4553e1f5f1fc 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -5709,6 +5709,9 @@ intel_dp_detect(struct drm_connector
> *connector,
> >  		goto out;
> >  	}
> >
> > +	if (!intel_dp_is_edp(intel_dp))
> > +		intel_psr_init_dpcd(intel_dp);
> > +
> >  	intel_dp_detect_dsc_caps(intel_dp, intel_connector);
> >
> >  	intel_dp_configure_mst(intel_dp);
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index 72cadad09db5..6927785fd6ff 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -2883,9 +2883,6 @@ void intel_psr_init(struct intel_dp *intel_dp)
> >  	if (!(HAS_PSR(dev_priv) || HAS_DP20(dev_priv)))
> >  		return;
> >
> > -	if (!intel_dp_is_edp(intel_dp))
> > -		intel_psr_init_dpcd(intel_dp);
> > -
> >  	/*
> >  	 * HSW spec explicitly says PSR is tied to port A.
> >  	 * BDW+ platforms have a instance of PSR registers per transcoder
> > but
> 
> --
> Jani Nikula, Intel
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 217196196e50..4553e1f5f1fc 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5709,6 +5709,9 @@  intel_dp_detect(struct drm_connector *connector,
 		goto out;
 	}
 
+	if (!intel_dp_is_edp(intel_dp))
+		intel_psr_init_dpcd(intel_dp);
+
 	intel_dp_detect_dsc_caps(intel_dp, intel_connector);
 
 	intel_dp_configure_mst(intel_dp);
diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index 72cadad09db5..6927785fd6ff 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -2883,9 +2883,6 @@  void intel_psr_init(struct intel_dp *intel_dp)
 	if (!(HAS_PSR(dev_priv) || HAS_DP20(dev_priv)))
 		return;
 
-	if (!intel_dp_is_edp(intel_dp))
-		intel_psr_init_dpcd(intel_dp);
-
 	/*
 	 * HSW spec explicitly says PSR is tied to port A.
 	 * BDW+ platforms have a instance of PSR registers per transcoder but