diff mbox series

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

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

Commit Message

Manna, Animesh Feb. 29, 2024, 4:37 a.m. UTC
Move psr_init_dpcd() from init-connector to connector-detect
function. The dpcd probe for checking panel replay capability
for external dp connector is causing delay during boot which can
be optimized by moving dpcd probe to connector specific detect().

v1: Initial version.
v2: Add details in commit description. [Jani]

Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10284
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. 29, 2024, 10:58 a.m. UTC | #1
On Thu, 29 Feb 2024, Animesh Manna <animesh.manna@intel.com> wrote:
> Move psr_init_dpcd() from init-connector to connector-detect
> function. The dpcd probe for checking panel replay capability
> for external dp connector is causing delay during boot which can
> be optimized by moving dpcd probe to connector specific detect().
>
> v1: Initial version.
> v2: Add details in commit description. [Jani]
>
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10284

Fixes: cceeaa312d39 ("drm/i915/panelreplay: Enable panel replay dpcd initialization for DP")
Reviewed-by: Jani Nikula <jani.nikula@intel.com>

> 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 6ece2c563c7a..b485ec320085 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,
>  	if (ret == 1)
>  		intel_connector->base.epoch_counter++;
>  
> +	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 March 1, 2024, 9:49 a.m. UTC | #2
> -----Original Message-----
> From: Nikula, Jani <jani.nikula@intel.com>
> Sent: Thursday, February 29, 2024 4:28 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 v2] drm/i915/panelreplay: Move out psr_init_dpcd()
> from init_connector()
> 
> On Thu, 29 Feb 2024, Animesh Manna <animesh.manna@intel.com> wrote:
> > Move psr_init_dpcd() from init-connector to connector-detect function.
> > The dpcd probe for checking panel replay capability for external dp
> > connector is causing delay during boot which can be optimized by
> > moving dpcd probe to connector specific detect().
> >
> > v1: Initial version.
> > v2: Add details in commit description. [Jani]
> >
> > Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10284
> 
> Fixes: cceeaa312d39 ("drm/i915/panelreplay: Enable panel replay dpcd
> initialization for DP")
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>

Thanks for review. Pushed the change in din.

Regards,
Animesh
> 
> > 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 6ece2c563c7a..b485ec320085 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,
> >  	if (ret == 1)
> >  		intel_connector->base.epoch_counter++;
> >
> > +	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
Ville Syrjala March 5, 2024, 1:16 p.m. UTC | #3
On Thu, Feb 29, 2024 at 10:07:16AM +0530, Animesh Manna wrote:
> Move psr_init_dpcd() from init-connector to connector-detect
> function. The dpcd probe for checking panel replay capability
> for external dp connector is causing delay during boot which can
> be optimized by moving dpcd probe to connector specific detect().
> 
> v1: Initial version.
> v2: Add details in commit description. [Jani]
> 
> Suggested-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/10284
> 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 6ece2c563c7a..b485ec320085 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,
>  	if (ret == 1)
>  		intel_connector->base.epoch_counter++;
>  
> +	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);

What is the story with panel replay vs. mst?

> 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
> -- 
> 2.29.0
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 6ece2c563c7a..b485ec320085 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,
 	if (ret == 1)
 		intel_connector->base.epoch_counter++;
 
+	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