All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mika Kahola" <mika.kahola@intel.com>,
	intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915/display: Leave the PSR frame change to the joiner primary
Date: Thu, 03 Dec 2026 09:18:15 +0000	[thread overview]
Message-ID: <sashiko-outbox-247444@kernel.org> (raw)
In-Reply-To: <20261203084518.179927-1-mika.kahola@intel.com>

Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [High] drm/i915/display: skipping TRANS_PUSH on secondary drops
  DDB-only PSR push
- [High] drm/i915/display: unsynchronized DSB push between joined pipes
  with PSR
- [High] drm/i915/display: intel_vrr_send_push() skipped on
  secondary-only DDB update
- [Low] drm/i915/display: missing Fixes trailer for commit 82a273802e29
--

commit 9a4d54d3dc0c38c64e67817a1dbb6aad35148490
Author: Mika Kahola <mika.kahola@intel.com>

> drm/i915/display: Leave the PSR frame change to the joiner primary
>
> With PSR2 on joined pipes the secondary's DSB also sends the trans push
> and polls the PSR2 status of the primary's transcoder. The poll gets no
> response and the DSB times out:
>
>  [CRTC:354:pipe B] DSB 0 response timeout
>  [CRTC:354:pipe B] DSB 0 timed out waiting for idle (current head=0x140, head=0x0, tail=0x180)
>
> Both are per transcoder and the primary already does them. Skip them
> on the secondary. Do it in intel_vrr_send_push() and
> intel_psr_wait_for_idle_dsb() so that the color DSB and the MMIO commit
> are covered too. The color DSB of the secondary fails the same way:
>
>  [CRTC:354:pipe B] DSB 1 response timeout
>
> v2: Use intel_crtc_is_joiner_secondary() (Ville)
>     Check inside intel_vrr_send_push() and
>     intel_psr_wait_for_idle_dsb() (Sashiko)
>
> Signed-off-by: Mika Kahola <mika.kahola@intel.com>

[Severity: Low]
This fixes a regression introduced when PSR2 and Panel Replay were
enabled with joiner in commit 82a273802e29 ("drm/i915/psr: Allow Panel
Replay and PSR2 with joiner").  Should this include:

  Fixes: 82a273802e29 ("drm/i915/psr: Allow Panel Replay and PSR2 with joiner")

> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index bd16563603249..4cf91c6d1a8f7 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -3514,6 +3514,10 @@ void intel_psr_wait_for_idle_dsb(struct intel_dsb *dsb,
>  	if (!new_crtc_state->has_psr || new_crtc_state->has_panel_replay)
>  		return;
>  
> +	/* The joined pipes drive one transcoder, so wait once from the primary. */
> +	if (intel_crtc_is_joiner_secondary(new_crtc_state))
> +		return;
> +
>  	if (new_crtc_state->has_sel_update)
>  		_psr2_ready_for_pipe_update_locked(new_crtc_state, dsb);
>  	else

[Severity: High]
Can skipping the PSR idle wait here and TRANS_PUSH in
intel_vrr_send_push() drop a joiner secondary's DDB update when the
primary is not in the atomic state?

On DISPLAY_VER >= 20 with joined pipes A and B running PSR2 or Panel
Replay, adlp_allowed_dbufs keeps pipe A on DBUF_S1 | DBUF_S2 while pipe
B shares DBUF_S3 | DBUF_S4 with pipe C.  Enabling or disabling pipe C
causes skl_crtc_allocate_ddb() to add only pipe B after joiner expansion.

Because LNL_TRANS_PUSH_PSR_PR_EN is set, pipe B's plane writes alone do
not trigger a frame change.  Skipping the idle wait and TRANS_PUSH on
both MMIO and DSB commits can leave pipe B's shrunk DDB unlatched before
pipe C enables on DBUF_S3 | DBUF_S4, risking FIFO underruns or timeouts.

> diff --git a/drivers/gpu/drm/i915/display/intel_vrr.c b/drivers/gpu/drm/i915/display/intel_vrr.c
> index e59345bd1d337..dc207b7b7e9c5 100644
> --- a/drivers/gpu/drm/i915/display/intel_vrr.c
> +++ b/drivers/gpu/drm/i915/display/intel_vrr.c
> @@ -773,6 +773,10 @@ void intel_vrr_send_push(struct intel_dsb *dsb,
>  	if (!crtc_state->vrr.enable && !intel_psr_use_trans_push(crtc_state))
>  		return;
>  
> +	/* The joined pipes drive one transcoder, so push once from the primary. */
> +	if (intel_crtc_is_joiner_secondary(crtc_state))
> +		return;
> +
>  	if (dsb)
>  		intel_dsb_nonpost_start(dsb);
>  

[Severity: High]
As reported by Ville Syrjälä on v1 [1], can the joiner primary DSB emit
TRANS_PUSH before the joiner secondary DSB finishes writing its arming
registers?

skl_commit_modeset_enables() calls intel_update_crtc() for the secondary
and then immediately for the primary.  For INTEL_COMMIT_DSB,
intel_dsb_commit() starts each DSB asynchronously without waiting, so
both engines run concurrently:

Secondary DSB                         Primary DSB
intel_dsb_commit()
  write plane / color regs
  ...                                 intel_dsb_commit()
                                        write plane / color regs
                                        intel_vrr_send_push()  <-- pushes
  write remaining arming regs         ...

If the secondary has more plane or color register writes than the
primary (including chained color DSBs in intel_color_prepare_commit()),
the primary's TRANS_PUSH latches a torn frame and leaves the secondary's
later arming writes unpushed until a subsequent commit.

[Severity: High]
Can unconditionally returning here stall a joiner secondary's DDB vblank
wait in skl_commit_modeset_enables()?

When pipe B's DDB changes (such as when pipe C is enabled or disabled on
DBUF_S3 | DBUF_S4), skl_commit_modeset_enables() updates pipe B first
and immediately calls intel_crtc_wait_for_next_vblank() before advancing
to pipe A.

Even when pipe A is in the atomic state, pipe B waits for its new DDB to
latch before pipe A has emitted TRANS_PUSH.  When pipe A is absent from
state, TRANS_PUSH is never emitted at all, leaving pipe B's DDB shrink
unlatched before pipe C starts using overlapping DBuf blocks.

[1] https://lore.kernel.org/r/awm7WYkMeMlyjkgr@intel.com

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261203084518.179927-1-mika.kahola@intel.com?part=1

  parent reply	other threads:[~2026-12-03  9:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-12-03  8:45 [PATCH v2] drm/i915/display: Leave the PSR frame change to the joiner primary Mika Kahola
2026-12-03  8:52 ` ✗ CI.checkpatch: warning for drm/i915/display: Leave the PSR frame change to the joiner primary (rev2) Patchwork
2026-12-03  8:55 ` ✓ CI.KUnit: success " Patchwork
2026-12-03  9:18 ` sashiko-bot [this message]
2026-12-03  9:26 ` ✓ Xe.CI.BAT: " Patchwork
2026-12-03  9:48 ` ✗ Fi.CI.DOCS: warning " Patchwork
2026-12-03 10:12 ` ✓ i915.CI.BAT: success " Patchwork
2026-12-03 22:09 ` ✗ i915.CI.Full: failure " Patchwork
2026-12-04  6:11 ` ✓ Xe.CI.FULL: success " 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=sashiko-outbox-247444@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=mika.kahola@intel.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.