From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E92F3606A685 for ; Thu, 3 Dec 2026 09:18:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=kVg8lKGW Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 816F810E4CF; Thu, 3 Dec 2026 09:18:24 +0000 (UTC) Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id ADCB110E0FE; Thu, 3 Dec 2026 09:18:17 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 57A89437CA; Thu, 3 Dec 2026 09:18:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 081041F000C1; Thu, 3 Dec 2026 09:18:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796289497; bh=vg9HTKFHhGyZONpKYST2UFtqtwivOMlE+E2EdebmEdc=; h=From:Subject:Reply-To:To:In-Reply-To:References:Date; b=kVg8lKGWKIgnW6s5D0NAFXgeNZShJOfqC0kt5taNf9JfgQxuLLLBuQjV1NbCXwX6i Q4Xk2Yw8dlP6bH8bMj4AwlNNDJK+/+Hfw82rB88bCTiiiPPy6AXirjObRXnbOulrDY ha/hYMf/baMnTVNEJVcXLAEVpz2aAcqogmgFtx1cruEG2ZDZ/GIgmrB7cGKoXoFIxS ake4g5l5ifXpVp11edXnR7SB6LZmJQnLd+q4IBA5Z7qfmU2EoMvqG3ev9+vtuenhJx 4N9CwMI8onxvX6GxemxLsomARaeamu6lVwb7fBBket8DGeG+VXRwmR4BZQgxdVg7yW bGojgnL5YzPIg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2] drm/i915/display: Leave the PSR frame change to the joiner primary To: "Mika Kahola" , intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org In-Reply-To: <20261203084518.179927-1-mika.kahola@intel.com> References: <20261203084518.179927-1-mika.kahola@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Thu, 03 Dec 2026 09:18:15 +0000 X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "Intel-gfx" X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: 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 > 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=3D0x140= , head=3D0x0, tail=3D0x180) > > 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 [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 join= er") > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i= 915/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; > =20 > + /* 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 >=3D 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/i= 915/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; > =20 > + /* 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); > =20 [Severity: High] As reported by Ville Syrj=C3=A4l=C3=A4 on v1 [1], can the joiner primary DS= B 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 --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203084518.1799= 27-1-mika.kahola@intel.com?part=3D1