Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Manna,  Animesh" <animesh.manna@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "Nikula, Jani" <jani.nikula@intel.com>, "B, Jeevan" <jeevan.b@intel.com>
Subject: Re: [PATCH v10 11/11] drm/i915/display: Disintegrate sink alpm enable from psr with lobf
Date: Wed, 23 Apr 2025 10:39:30 +0000	[thread overview]
Message-ID: <178171dfb01a6a00459967709905068aa13dc97b.camel@intel.com> (raw)
In-Reply-To: <20250423092334.2294483-12-animesh.manna@intel.com>

On Wed, 2025-04-23 at 14:53 +0530, Animesh Manna wrote:
> Make a generic alpm enable function for sink which can be used for
> PSR2/PR/Lobf.
> 
> Signed-off-by: Animesh Manna <animesh.manna@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_alpm.c | 25
> ++++++++++++++++++++++-
>  drivers/gpu/drm/i915/display/intel_psr.c  | 23 ---------------------
>  2 files changed, 24 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
> b/drivers/gpu/drm/i915/display/intel_alpm.c
> index c4b6da2e6ccf..d1f3852e51b5 100644
> --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> @@ -426,6 +426,27 @@ void intel_alpm_pre_plane_update(struct
> intel_atomic_state *state,
>  	}
>  }
>  
> +static void intel_alpm_enable_sink(struct intel_dp *intel_dp,
> +				   const struct intel_crtc_state
> *crtc_state)
> +{
> +	u8 val;
> +
> +	/*
> +	 * eDP Panel Replay uses always ALPM
> +	 * PSR2 uses ALPM but PSR1 doesn't
> +	 */

I think you can drop this or add it into intel_psr_needs_alpm. These
details are not interesting here anymore as you added that
intel_psr_needs_alpm.

Consider what you do with this comment. Anyways from my point of view:

Reviewed-by: Jouni Högander <jouni.hogander@intel.com>

> +	if (!intel_psr_needs_alpm(intel_dp, crtc_state) &&
> !crtc_state->has_lobf)
> +		return;
> +
> +	val = DP_ALPM_ENABLE | DP_ALPM_LOCK_ERROR_IRQ_HPD_ENABLE;
> +
> +	if (crtc_state->has_panel_replay || (crtc_state->has_lobf &&
> +					    
> intel_alpm_aux_less_wake_supported(intel_dp)))
> +		val |= DP_ALPM_MODE_AUX_LESS;
> +
> +	drm_dp_dpcd_writeb(&intel_dp->aux, DP_RECEIVER_ALPM_CONFIG,
> val);
> +}
> +
>  void intel_alpm_post_plane_update(struct intel_atomic_state *state,
>  				  struct intel_crtc *crtc)
>  {
> @@ -449,8 +470,10 @@ void intel_alpm_post_plane_update(struct
> intel_atomic_state *state,
>  
>  		intel_dp = enc_to_intel_dp(encoder);
>  
> -		if (intel_dp_is_edp(intel_dp))
> +		if (intel_dp_is_edp(intel_dp)) {
> +			intel_alpm_enable_sink(intel_dp,
> crtc_state);
>  			intel_alpm_configure(intel_dp, crtc_state);
> +		}
>  	}
>  }
>  
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index 1c5ec3f0b066..b034cb2e0975 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -794,32 +794,9 @@ static void _psr_enable_sink(struct intel_dp
> *intel_dp,
>  	drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, val);
>  }
>  
> -static void intel_psr_enable_sink_alpm(struct intel_dp *intel_dp,
> -				       const struct intel_crtc_state
> *crtc_state)
> -{
> -	u8 val;
> -
> -	/*
> -	 * eDP Panel Replay uses always ALPM
> -	 * PSR2 uses ALPM but PSR1 doesn't
> -	 */
> -	if (!intel_dp_is_edp(intel_dp) || (!crtc_state-
> >has_panel_replay &&
> -					   !crtc_state-
> >has_sel_update))
> -		return;
> -
> -	val = DP_ALPM_ENABLE | DP_ALPM_LOCK_ERROR_IRQ_HPD_ENABLE;
> -
> -	if (crtc_state->has_panel_replay)
> -		val |= DP_ALPM_MODE_AUX_LESS;
> -
> -	drm_dp_dpcd_writeb(&intel_dp->aux, DP_RECEIVER_ALPM_CONFIG,
> val);
> -}
> -
>  static void intel_psr_enable_sink(struct intel_dp *intel_dp,
>  				  const struct intel_crtc_state
> *crtc_state)
>  {
> -	intel_psr_enable_sink_alpm(intel_dp, crtc_state);
> -
>  	crtc_state->has_panel_replay ?
>  		_panel_replay_enable_sink(intel_dp, crtc_state) :
>  		_psr_enable_sink(intel_dp, crtc_state);


  reply	other threads:[~2025-04-23 10:39 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23  9:23 [PATCH v10 00/11] LOBF enablement fix Animesh Manna
2025-04-23  9:23 ` [PATCH v10 01/11] drm/i915/alpm: use variable from intel_crtc_state instead of intel_psr Animesh Manna
2025-04-23  9:23 ` [PATCH v10 02/11] drm/i915/lobf: Add lobf enablement in post plane update Animesh Manna
2025-04-23  9:23 ` [PATCH v10 03/11] drm/i915/lobf: Add debug print for LOBF Animesh Manna
2025-04-23  9:23 ` [PATCH v10 04/11] drm/i915/lobf: Disintegrate alpm_disable from psr_disable Animesh Manna
2025-04-23  9:23 ` [PATCH v10 05/11] drm/i915/lobf: Add fixed refresh rate check in compute_config() Animesh Manna
2025-04-23  9:23 ` [PATCH v10 06/11] drm/i915/lobf: Update lobf if any change in dependent parameters Animesh Manna
2025-04-23 10:31   ` Hogander, Jouni
2025-04-23  9:23 ` [PATCH v10 07/11] drm/i915/lobf: Add debug interface for lobf Animesh Manna
2025-04-23  9:23 ` [PATCH v10 08/11] drm/i915/lobf: Add mutex for alpm update Animesh Manna
2025-04-23  9:23 ` [PATCH v10 09/11] drm/i915/lobf: Check for sink error and disable LOBF Animesh Manna
2025-04-23  9:23 ` [PATCH v10 10/11] drm/i915/alpm: Add intel_psr_need_alpm() to simplify alpm check Animesh Manna
2025-04-23 10:35   ` Hogander, Jouni
2025-04-23  9:23 ` [PATCH v10 11/11] drm/i915/display: Disintegrate sink alpm enable from psr with lobf Animesh Manna
2025-04-23 10:39   ` Hogander, Jouni [this message]
2025-04-23  9:52 ` ✓ CI.Patch_applied: success for LOBF enablement fix (rev9) Patchwork
2025-04-23  9:53 ` ✗ CI.checkpatch: warning " Patchwork
2025-04-23  9:54 ` ✓ CI.KUnit: success " Patchwork
2025-04-23 10:02 ` ✓ CI.Build: " Patchwork
2025-04-23 10:04 ` ✗ CI.Hooks: failure " Patchwork
2025-04-23 10:05 ` ✗ CI.checksparse: warning " Patchwork
2025-04-23 16:11 ` ✓ CI.Patch_applied: success " Patchwork
2025-04-23 16:12 ` ✗ CI.checkpatch: warning " Patchwork
2025-04-23 16:13 ` ✓ CI.KUnit: success " Patchwork
2025-04-23 16:33 ` ✓ CI.Build: " Patchwork
2025-04-23 16:35 ` ✗ CI.Hooks: failure " Patchwork
2025-04-23 16:37 ` ✗ CI.checksparse: warning " Patchwork
2025-04-24  0:48 ` ✗ Xe.CI.Full: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178171dfb01a6a00459967709905068aa13dc97b.camel@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=animesh.manna@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=jeevan.b@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox