From: "K V P, Satyanarayana" <satyanarayana.k.v.p@intel.com>
To: <tilak.tirumalesh.tangudu@intel.com>,
<piotr.piorkowski@intel.com>, <jesus.narvaez@intel.com>,
<daniele.ceraolospurio@intel.com>, <stuart.summers@intel.com>,
<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH 3/4] drm/xe: Use MI_SEMAPHORE_WAIT_64 for fake watchdog where supported
Date: Fri, 20 Nov 2026 17:48:36 +0530 [thread overview]
Message-ID: <8a0a4589-37af-4397-9be6-ceb8805fbb49@intel.com> (raw)
In-Reply-To: <20261120120231.748267-4-tilak.tirumalesh.tangudu@intel.com>
[-- Attachment #1: Type: text/plain, Size: 2315 bytes --]
On 20-Nov-26 5:32 PM, tilak.tirumalesh.tangudu@intel.com wrote:
> From: Tangudu Tilak Tirumalesh<tilak.tirumalesh.tangudu@intel.com>
>
> Use the MI_SEMAPHORE_WAIT_64 instruction in emit_fake_watchdog() on
> platforms whose GT supports it, per gt->info.has_sem64. Platforms
> without support keep using the existing 32-bit MI_SEMAPHORE_WAIT path.
>
> v2: Drop the WA comment, document the zero upper SDD dword (Satya)
>
> Assisted-by: LLM
> Signed-off-by: Tangudu Tilak Tirumalesh<tilak.tirumalesh.tangudu@intel.com>
> ---
> drivers/gpu/drm/xe/xe_ring_ops.c | 23 ++++++++++++++++++-----
> 1 file changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_ring_ops.c b/drivers/gpu/drm/xe/xe_ring_ops.c
> index ad63181938e3..e64f61f1f9a7 100644
> --- a/drivers/gpu/drm/xe/xe_ring_ops.c
> +++ b/drivers/gpu/drm/xe/xe_ring_ops.c
> @@ -316,11 +316,24 @@ static int emit_fake_watchdog(struct xe_lrc *lrc, u32 *dw, int i)
> dw[i++] = PR_CTR_CTRL(0).addr;
> dw[i++] = CTR_LOGIC_OP(START);
>
> - dw[i++] = MI_SEMAPHORE_WAIT | MI_SEMW_GGTT | MI_SEMW_POLL | MI_SEMW_COMPARE(SAD_EQ_SDD);
> - dw[i++] = 0xdead; /* this should never be seen */
> - dw[i++] = lower_32_bits(xe_lrc_ggtt_addr(lrc));
> - dw[i++] = upper_32_bits(xe_lrc_ggtt_addr(lrc));
> - dw[i++] = 0; /* unused token */
> + if (lrc->gt->info.has_sem64) {
> + dw[i++] = MI_SEMAPHORE_WAIT_64 | MI_SEMW_GGTT | MI_SEMW64_32BIT_COMPARE |
> + MI_SEMW64_INHIBIT_CTX_SWITCH | MI_SEMW64_INTERRUPT |
> + MI_SEMW_COMPARE(SAD_EQ_SDD);
> + dw[i++] = 0xdead; /* this should never be seen */
> + dw[i++] = 0; /* upper SDD dword, ignored with 32b compare */
> + dw[i++] = lower_32_bits(xe_lrc_ggtt_addr(lrc));
> + dw[i++] = upper_32_bits(xe_lrc_ggtt_addr(lrc));
> + dw[i++] = 0; /* token, must be 0 */
> + dw[i++] = 0;
> + } else {
> + dw[i++] = MI_SEMAPHORE_WAIT | MI_SEMW_GGTT
> + | MI_SEMW_POLL | MI_SEMW_COMPARE(SAD_EQ_SDD);
> + dw[i++] = 0xdead; /* this should never be seen */
> + dw[i++] = lower_32_bits(xe_lrc_ggtt_addr(lrc));
> + dw[i++] = upper_32_bits(xe_lrc_ggtt_addr(lrc));
> + dw[i++] = 0; /* unused token */
> + }
>
> dw[i++] = MI_LOAD_REGISTER_IMM | MI_LRI_NUM_REGS(1) | MI_LRI_LRM_CS_MMIO;
> dw[i++] = PR_CTR_CTRL(0).addr;
LGTM.
Reviewed-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
[-- Attachment #2: Type: text/html, Size: 3229 bytes --]
next prev parent reply other threads:[~2026-11-20 12:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-20 12:02 [PATCH 0/4] drm/xe: Use MI_SEMAPHORE_WAIT_64 (Wa_16029281913) tilak.tirumalesh.tangudu
2026-11-20 12:02 ` [PATCH 1/4] drm/xe: Add has_sem64 bit to graphics/media IP descriptors tilak.tirumalesh.tangudu
2026-11-20 12:23 ` sashiko-bot
2026-11-20 12:45 ` Tangudu, Tilak Tirumalesh
2026-11-20 12:02 ` [PATCH 2/4] drm/xe: Add MI_SEMAPHORE_WAIT_64 instruction definition tilak.tirumalesh.tangudu
2026-11-20 12:02 ` [PATCH 3/4] drm/xe: Use MI_SEMAPHORE_WAIT_64 for fake watchdog where supported tilak.tirumalesh.tangudu
2026-11-20 12:18 ` K V P, Satyanarayana [this message]
2026-11-20 12:02 ` [PATCH 4/4] drm/xe: Use MI_SEMAPHORE_WAIT_64 in ULLS postamble " tilak.tirumalesh.tangudu
2026-11-20 12:17 ` ✗ CI.checkpatch: warning for drm/xe: Use MI_SEMAPHORE_WAIT_64 (Wa_16029281913) (rev4) Patchwork
2026-11-20 12:19 ` ✓ CI.KUnit: success " Patchwork
2026-11-20 12:54 ` ✓ Xe.CI.BAT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2026-11-13 15:57 [PATCH 0/4] drm/xe: Use MI_SEMAPHORE_WAIT_64 (Wa_16029281913) tilak.tirumalesh.tangudu
2026-11-13 15:57 ` [PATCH 3/4] drm/xe: Use MI_SEMAPHORE_WAIT_64 for fake watchdog where supported tilak.tirumalesh.tangudu
2026-11-20 7:50 ` K V P, Satyanarayana
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=8a0a4589-37af-4397-9be6-ceb8805fbb49@intel.com \
--to=satyanarayana.k.v.p@intel.com \
--cc=daniele.ceraolospurio@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=jesus.narvaez@intel.com \
--cc=piotr.piorkowski@intel.com \
--cc=stuart.summers@intel.com \
--cc=tilak.tirumalesh.tangudu@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