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>,
	"Kahola, Mika" <mika.kahola@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/i915/psr: Track all joined pipes for frontbuffer tracking
Date: Thu, 24 Sep 2026 13:02:29 +0000	[thread overview]
Message-ID: <346dd60f86bc532f6bff95040c6247b104ea46ba.camel@intel.com> (raw)
In-Reply-To: <20260923115941.746934-2-mika.kahola@intel.com>

On Wed, 2026-09-23 at 11:59 +0000, Mika Kahola wrote:
> psr.pipe is the joiner primary only, so frontbuffer bits coming from
> a
> secondary pipe get masked out and the update goes unnoticed. Add
> psr.pipe_mask covering every joined pipe and use that instead.
> 
> No functional change, joiner is still rejected in compute_config().
> 
> Assisted-by: Copilot:claude-opus-5
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>
> ---
>  .../drm/i915/display/intel_display_types.h    |  1 +
>  drivers/gpu/drm/i915/display/intel_psr.c      | 27 ++++++++++++++---
> --
>  2 files changed, 21 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h
> b/drivers/gpu/drm/i915/display/intel_display_types.h
> index 79f30660c2b6..2e6e3661675c 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -1798,6 +1798,7 @@ struct intel_psr {
>  	bool enabled;
>  	int pause_counter;
>  	enum pipe pipe;
> +	u8 pipe_mask;
>  	enum transcoder transcoder;
>  	bool active;
>  	struct work_struct work;
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index 872e253db178..76260ceb49cb 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -36,6 +36,7 @@
>  #include "intel_cursor_regs.h"
>  #include "intel_ddi.h"
>  #include "intel_de.h"
> +#include "intel_display.h"
>  #include "intel_display_irq.h"
>  #include "intel_display_regs.h"
>  #include "intel_display_rpm.h"
> @@ -1798,6 +1799,19 @@ static void psr2_dc3co_disable_work(struct
> work_struct *work)
>  	mutex_unlock(&intel_dp->psr.lock);
>  }
>  
> +/* Frontbuffer bits for every pipe driving this PSR/Panel Replay
> instance. */
> +static unsigned int psr_frontbuffer_mask(struct intel_dp *intel_dp)
> +{
> +	struct intel_display *display = to_intel_display(intel_dp);
> +	unsigned int mask = 0;
> +	enum pipe pipe;
> +
> +	for_each_pipe_masked(display, pipe, intel_dp->psr.pipe_mask)
> +		mask |= INTEL_FRONTBUFFER_ALL_MASK(pipe);
> +
> +	return mask;
> +}
> +
>  static void
>  psr2_dc3co_flush_locked(struct intel_dp *intel_dp, unsigned int
> frontbuffer_bits)
>  {
> @@ -1813,8 +1827,7 @@ psr2_dc3co_flush_locked(struct intel_dp
> *intel_dp, unsigned int frontbuffer_bits
>  	 * At every frontbuffer flush flip event modified delay of
> delayed work,
>  	 * when delayed work schedules that means display has been
> idle.
>  	 */
> -	if (!(frontbuffer_bits &
> -	    INTEL_FRONTBUFFER_ALL_MASK(intel_dp->psr.pipe)))
> +	if (!(frontbuffer_bits & psr_frontbuffer_mask(intel_dp)))
>  		return;
>  
>  	mod_delayed_work(display->wq.unordered, &intel_dp-
> >psr.dc3co_work,
> @@ -1845,7 +1858,7 @@ void intel_psr_set_non_psr_pipes(struct
> intel_dp *intel_dp,
>  	active_pipes = intel_calc_active_pipes(state, active_pipes);
>  
>  	crtc_state->active_non_psr_pipes = active_pipes &
> -		~BIT(to_intel_crtc(crtc_state->uapi.crtc)->pipe);
> +		~intel_crtc_joined_pipe_mask(crtc_state);

This change is not related to frontbuffer tracking.

BR,

Jouni Högander

>  }
>  
>  void intel_psr_compute_config(struct intel_dp *intel_dp,
> @@ -2175,6 +2188,7 @@ static void intel_psr_enable_locked(struct
> intel_dp *intel_dp,
>  	intel_dp->psr.panel_replay_enabled = crtc_state-
> >has_panel_replay;
>  	intel_dp->psr.busy_frontbuffer_bits = 0;
>  	intel_dp->psr.pipe = to_intel_crtc(crtc_state->uapi.crtc)-
> >pipe;
> +	intel_dp->psr.pipe_mask =
> intel_crtc_joined_pipe_mask(crtc_state);
>  	intel_dp->psr.transcoder = crtc_state->cpu_transcoder;
>  	/* DC5/DC6 requires at least 6 idle frames */
>  	val = usecs_to_jiffies(intel_get_frame_time_us(crtc_state) *
> 6);
> @@ -2394,6 +2408,7 @@ static void intel_psr_disable_locked(struct
> intel_dp *intel_dp)
>  	intel_dp->psr.psr2_sel_fetch_cff_enabled = false;
>  	intel_dp->psr.active_non_psr_pipes = 0;
>  	intel_dp->psr.pkg_c_latency_used = 0;
> +	intel_dp->psr.pipe_mask = 0;
>  	cancel_delayed_work(&intel_dp->psr.dc3co_work);
>  	intel_dp->psr.dc3co_allowed = false;
>  }
> @@ -3627,8 +3642,7 @@ void intel_psr_invalidate(struct intel_display
> *display,
>  			continue;
>  		}
>  
> -		pipe_frontbuffer_bits &=
> -			INTEL_FRONTBUFFER_ALL_MASK(intel_dp-
> >psr.pipe);
> +		pipe_frontbuffer_bits &=
> psr_frontbuffer_mask(intel_dp);
>  		intel_dp->psr.busy_frontbuffer_bits |=
> pipe_frontbuffer_bits;
>  
>  		if (pipe_frontbuffer_bits)
> @@ -3708,8 +3722,7 @@ void intel_psr_flush(struct intel_display
> *display,
>  			continue;
>  		}
>  
> -		pipe_frontbuffer_bits &=
> -			INTEL_FRONTBUFFER_ALL_MASK(intel_dp-
> >psr.pipe);
> +		pipe_frontbuffer_bits &=
> psr_frontbuffer_mask(intel_dp);
>  		intel_dp->psr.busy_frontbuffer_bits &=
> ~pipe_frontbuffer_bits;
>  
>  		/*


  reply	other threads:[~2026-09-24 13:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 11:59 [PATCH 0/5] drm/i915/psr: Panel Replay and PSR2 with the joiner Mika Kahola
2026-09-23 11:59 ` [PATCH] drm/i915/psr: Track all joined pipes for frontbuffer tracking Mika Kahola
2026-09-24 13:02   ` Hogander, Jouni [this message]
2026-09-25  7:17     ` Kahola, Mika
2026-09-23 11:59 ` [PATCH] drm/i915/psr: Take the selective fetch area from pipe_src Mika Kahola
2026-09-24  9:45   ` Hogander, Jouni
2026-09-25  7:00     ` Kahola, Mika
2026-09-23 11:59 ` [PATCH] drm/i915/psr: Merge the selective fetch area across joined pipes Mika Kahola
2026-10-07 10:25   ` Hogander, Jouni
2026-10-09  6:50     ` Kahola, Mika
2026-09-23 11:59 ` [PATCH] drm/i915/psr: Allow Panel Replay and PSR2 with joiner Mika Kahola
2026-09-25 11:06   ` Hogander, Jouni
2026-09-25 12:32     ` Kahola, Mika
2026-09-23 11:59 ` [PATCH] drm/i915/display: Allow forcing the joiner on eDP Mika Kahola
2026-09-25 11:08   ` Hogander, Jouni
2026-09-23 12:08 ` ✓ CI.KUnit: success for " Patchwork
2026-09-23 12:59 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-24  2:10 ` ✗ 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=346dd60f86bc532f6bff95040c6247b104ea46ba.camel@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=mika.kahola@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