intel-xe.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: "Jouni Högander" <jouni.hogander@intel.com>
Cc: <intel-gfx@lists.freedesktop.org>, <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v4 2/3] drm/i915/psr: Ignore enable_psr parameter on Panel Replay
Date: Tue, 15 Jul 2025 15:09:58 -0400	[thread overview]
Message-ID: <aHanhngqbCol22yH@intel.com> (raw)
In-Reply-To: <20250715105509.4146806-3-jouni.hogander@intel.com>

On Tue, Jul 15, 2025 at 01:55:08PM +0300, Jouni Högander wrote:
> Currently we are disabling Panel Replay if enable_psr != -1. Lets ignore
> enable_psr completely on Panel Replay.
> 
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>

> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 27 ++++++------------------
>  1 file changed, 7 insertions(+), 20 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index a2b5688f0c82..ee1f9a240283 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -233,16 +233,12 @@ bool intel_psr_needs_aux_io_power(struct intel_encoder *encoder,
>  
>  static bool psr_global_enabled(struct intel_dp *intel_dp)
>  {
> -	struct intel_display *display = to_intel_display(intel_dp);
>  	struct intel_connector *connector = intel_dp->attached_connector;
>  
>  	switch (intel_dp->psr.debug & I915_PSR_DEBUG_MODE_MASK) {
>  	case I915_PSR_DEBUG_DEFAULT:
> -		if (display->params.enable_psr == -1)
> -			return intel_dp_is_edp(intel_dp) ?
> -				connector->panel.vbt.psr.enable :
> -				true;
> -		return display->params.enable_psr;
> +		return intel_dp_is_edp(intel_dp) ?
> +			connector->panel.vbt.psr.enable : true;
>  	case I915_PSR_DEBUG_DISABLE:
>  		return false;
>  	default:
> @@ -250,29 +246,20 @@ static bool psr_global_enabled(struct intel_dp *intel_dp)
>  	}
>  }
>  
> -static bool psr2_global_enabled(struct intel_dp *intel_dp)
> +static bool sel_update_global_enabled(struct intel_dp *intel_dp)
>  {
> -	struct intel_display *display = to_intel_display(intel_dp);
> -
>  	switch (intel_dp->psr.debug & I915_PSR_DEBUG_MODE_MASK) {
>  	case I915_PSR_DEBUG_DISABLE:
>  	case I915_PSR_DEBUG_FORCE_PSR1:
>  		return false;
>  	default:
> -		if (display->params.enable_psr == 1)
> -			return false;
>  		return true;
>  	}
>  }
>  
>  static bool panel_replay_global_enabled(struct intel_dp *intel_dp)
>  {
> -	struct intel_display *display = to_intel_display(intel_dp);
> -
> -	if ((display->params.enable_psr != -1) ||
> -	    (intel_dp->psr.debug & I915_PSR_DEBUG_PANEL_REPLAY_DISABLE))
> -		return false;
> -	return true;
> +	return !(intel_dp->psr.debug & I915_PSR_DEBUG_PANEL_REPLAY_DISABLE);
>  }
>  
>  static u32 psr_irq_psr_error_bit_get(struct intel_dp *intel_dp)
> @@ -1412,7 +1399,7 @@ static bool intel_psr2_config_valid(struct intel_dp *intel_dp,
>  	int crtc_vdisplay = crtc_state->hw.adjusted_mode.crtc_vdisplay;
>  	int psr_max_h = 0, psr_max_v = 0, max_bpp = 0;
>  
> -	if (!intel_dp->psr.sink_psr2_support)
> +	if (!intel_dp->psr.sink_psr2_support || display->params.enable_psr == 1)
>  		return false;
>  
>  	/* JSL and EHL only supports eDP 1.3 */
> @@ -1517,7 +1504,7 @@ static bool intel_sel_update_config_valid(struct intel_dp *intel_dp,
>  		goto unsupported;
>  	}
>  
> -	if (!psr2_global_enabled(intel_dp)) {
> +	if (!sel_update_global_enabled(intel_dp)) {
>  		drm_dbg_kms(display->drm,
>  			    "Selective update disabled by flag\n");
>  		goto unsupported;
> @@ -1565,7 +1552,7 @@ static bool _psr_compute_config(struct intel_dp *intel_dp,
>  	const struct drm_display_mode *adjusted_mode = &crtc_state->hw.adjusted_mode;
>  	int entry_setup_frames;
>  
> -	if (!CAN_PSR(intel_dp))
> +	if (!CAN_PSR(intel_dp) || !display->params.enable_psr)
>  		return false;
>  
>  	/*
> -- 
> 2.43.0
> 

  reply	other threads:[~2025-07-15 19:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-15 10:55 [PATCH v4 0/3] Enable_psr kernel parameter changes Jouni Högander
2025-07-15 10:55 ` [PATCH v4 1/3] drm/i915/psr: Do not disable Early Transport when enable_psr is set Jouni Högander
2025-07-15 19:09   ` Rodrigo Vivi
2025-07-21  8:02     ` Hogander, Jouni
2025-07-15 10:55 ` [PATCH v4 2/3] drm/i915/psr: Ignore enable_psr parameter on Panel Replay Jouni Högander
2025-07-15 19:09   ` Rodrigo Vivi [this message]
2025-07-15 10:55 ` [PATCH v4 3/3] drm/i915/psr: Add enable_panel_replay module parameter Jouni Högander
2025-07-15 19:10   ` Rodrigo Vivi
2025-07-15 13:42 ` ✗ CI.checkpatch: warning for Enable_psr kernel parameter changes (rev4) Patchwork
2025-07-15 13:43 ` ✓ CI.KUnit: success " Patchwork
2025-07-15 14:34 ` ✓ Xe.CI.BAT: " Patchwork
2025-07-15 19:48 ` ✗ Xe.CI.Full: failure " Patchwork
2025-07-21  7:49   ` Hogander, Jouni

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=aHanhngqbCol22yH@intel.com \
    --to=rodrigo.vivi@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jouni.hogander@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;
as well as URLs for NNTP newsgroup(s).