From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Hanson Wang <hanson.wang@ugreen.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
Jani Nikula <jani.nikula@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com>,
Uma Shankar <uma.shankar@intel.com>,
Animesh Manna <animesh.manna@intel.com>,
dri-devel@lists.freedesktop.org, stable@vger.kernel.org
Subject: Re: [PATCH v2] drm/i915/dsb: Realign GOSUB only for QW slots 6 and 7
Date: Fri, 13 Nov 2026 17:28:06 +0200 [thread overview]
Message-ID: <avcshtsLJ1_ugiaW@intel.com> (raw)
In-Reply-To: <20261106102315.1361645-1-hanson.wang@ugreen.com>
On Fri, Nov 06, 2026 at 06:23:15PM +0800, Hanson Wang wrote:
> intel_dsb_gosub_align() moves free_pos to the next cacheline
> unconditionally, but only clears the skipped bytes when at most two
> QW slots remain. Wa_16024917128 forbids GOSUB in slots 6 and 7 only.
> A larger gap is still executed. A Panther Lake DSB dump showed
> nonzero data in that gap, with the tail at 0x58 and GOSUB at 0x80.
>
> Advance free_pos only when the instruction would land in slot 6 or 7,
> and fill that gap with NOPs. Emit GOSUB in place for every other slot.
> intel_dsb_align_tail() still clears the rest of the cacheline.
>
> Update free_pos inside the existing gap check in intel_dsb_align_tail()
> as well, so the two helpers keep the same shape.
>
> Fixes: 2c41d62f6fb1 ("drm/i915/dsb: Implement intel_dsb_gosub()")
> Cc: stable@vger.kernel.org # v6.17+
> Signed-off-by: Hanson Wang <hanson.wang@ugreen.com>
Thanks. Pushed to drm-intel-next.
> ---
> v2:
> - Advance free_pos only for QW slots 6 and 7, and NOP-fill that gap
> (Ville)
> - Update free_pos inside the existing check in intel_dsb_align_tail()
> so the two helpers stay in the same shape
>
> Hardware: Intel Core Ultra 5 336H (Panther Lake), 6.18-based kernel
> Build: 6.18 backport; both xe and i915 intel_dsb.o
> Upstream: not built or booted
> Reboots: 7/100 DSB idle timeouts before either fix
> v1 (always align): 0/200
> v2 (this patch): 0/200
>
> drivers/gpu/drm/i915/display/intel_dsb.c | 16 ++++++++++------
> 1 file changed, 10 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dsb.c b/drivers/gpu/drm/i915/display/intel_dsb.c
> index d9a270362a82..07d864039e82 100644
> --- a/drivers/gpu/drm/i915/display/intel_dsb.c
> +++ b/drivers/gpu/drm/i915/display/intel_dsb.c
> @@ -589,10 +589,10 @@ static void intel_dsb_align_tail(struct intel_dsb *dsb)
> tail = dsb->free_pos * 4;
> aligned_tail = ALIGN(tail, CACHELINE_BYTES);
>
> - if (aligned_tail > tail)
> + if (aligned_tail > tail) {
> dsb_buffer_fill(dsb, dsb->free_pos, 0, aligned_tail - tail);
> -
> - dsb->free_pos = aligned_tail / 4;
> + dsb->free_pos = aligned_tail / 4;
> + }
> }
>
> static void intel_dsb_gosub_align(struct intel_dsb *dsb)
> @@ -607,11 +607,15 @@ static void intel_dsb_gosub_align(struct intel_dsb *dsb)
> /*
> * Wa_16024917128
> * "Ensure GOSUB is not placed in cacheline QW slot 6 or 7 (numbered 0-7)"
> + *
> + * Move to the next cacheline only for those two slots. The skipped
> + * bytes stay in the programmed range, so fill them with NOPs. Any
> + * other slot can take the GOSUB directly.
> */
> - if (aligned_tail - tail <= 2 * 8)
> + if (aligned_tail - tail <= 2 * 8) {
> dsb_buffer_fill(dsb, dsb->free_pos, 0, aligned_tail - tail);
> -
> - dsb->free_pos = aligned_tail / 4;
> + dsb->free_pos = aligned_tail / 4;
> + }
> }
>
> void intel_dsb_gosub(struct intel_dsb *dsb,
> --
> 2.34.1
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2026-11-13 15:28 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-05 13:46 [PATCH] drm/i915/dsb: Fill all padding before GOSUB Hanson Wang
2026-11-05 14:07 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
2026-11-05 14:12 ` [PATCH] " sashiko-bot
2026-11-05 14:58 ` Ville Syrjälä
2026-11-05 16:12 ` ✗ LGCI.VerificationFailed: failure for " Patchwork
2026-11-06 10:23 ` [PATCH v2] drm/i915/dsb: Realign GOSUB only for QW slots 6 and 7 Hanson Wang
2026-11-13 15:28 ` Ville Syrjälä [this message]
2026-11-09 15:30 ` ✗ LGCI.VerificationFailed: failure for drm/i915/dsb: Fill all padding before GOSUB (rev2) Patchwork
2026-11-09 16:35 ` ✓ CI.KUnit: success for drm/i915/dsb: Fill all padding before GOSUB (rev3) Patchwork
2026-11-09 17:05 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-09 17:41 ` ✗ LGCI.VerificationFailed: failure for drm/i915/dsb: Fill all padding before GOSUB (rev2) Patchwork
2026-11-10 2:48 ` ✓ i915.CI.BAT: success for drm/i915/dsb: Fill all padding before GOSUB (rev3) Patchwork
2026-11-10 5:29 ` ✓ i915.CI.Full: " Patchwork
2026-11-12 19:39 ` ✓ CI.KUnit: success for drm/i915/dsb: Fill all padding before GOSUB (rev4) Patchwork
2026-11-12 20:23 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-13 9:52 ` ✓ Xe.CI.FULL: " 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=avcshtsLJ1_ugiaW@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=animesh.manna@intel.com \
--cc=chaitanya.kumar.borah@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hanson.wang@ugreen.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=rodrigo.vivi@intel.com \
--cc=stable@vger.kernel.org \
--cc=uma.shankar@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 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.