All of lore.kernel.org
 help / color / mirror / Atom feed
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 13:20:30 +0530	[thread overview]
Message-ID: <f530bf9a-7427-4b97-a30c-8924c4e448e8@intel.com> (raw)
In-Reply-To: <20261113155734.4164230-4-tilak.tirumalesh.tangudu@intel.com>


On 13-Nov-26 9:27 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 (Wa_16029281913).
> Platforms without support keep using the existing 32-bit
> MI_SEMAPHORE_WAIT path.
>
> Assisted-by: LLM
> Signed-off-by: Tangudu Tilak Tirumalesh <tilak.tirumalesh.tangudu@intel.com>
> ---
>   drivers/gpu/drm/xe/xe_ring_ops.c | 24 +++++++++++++++++++-----
>   1 file changed, 19 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..fbff2973a204 100644
> --- a/drivers/gpu/drm/xe/xe_ring_ops.c
> +++ b/drivers/gpu/drm/xe/xe_ring_ops.c
> @@ -316,11 +316,25 @@ 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 */
> +	/* Wa_16029281913: legacy semaphore has an issue on some Xe3p platforms, prefer sem64 */

No need to mention this WA. As per below condition, if has_sem64 is 
enabled, sem64 will be used.

If we need to use this only for this WA, we may need to derive this in 
some different way.

> +	if (lrc->gt->info.has_sem64) {
> +		dw[i++] = MI_SEMAPHORE_WAIT_64 | MI_SEMW_GGTT | MI_SEMW64_32B_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;
Mention why is it zero here.
> +		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;

  reply	other threads:[~2026-11-20  7:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 1/4] drm/xe: Add has_sem64 bit to graphics/media IP descriptors tilak.tirumalesh.tangudu
2026-11-13 16:20   ` sashiko-bot
2026-11-13 15:57 ` [PATCH 2/4] drm/xe: Add MI_SEMAPHORE_WAIT_64 instruction definition tilak.tirumalesh.tangudu
2026-11-20  7:48   ` K V P, Satyanarayana
2026-11-20 11:32     ` Tangudu, Tilak Tirumalesh
2026-11-20 11:40       ` Tangudu, Tilak Tirumalesh
2026-11-20 12:36     ` Tangudu, Tilak Tirumalesh
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 [this message]
2026-11-13 15:57 ` [PATCH 4/4] drm/xe: Use MI_SEMAPHORE_WAIT_64 in ULLS postamble " tilak.tirumalesh.tangudu
2026-11-13 16:34 ` ✗ CI.checkpatch: warning for drm/xe: Use MI_SEMAPHORE_WAIT_64 (Wa_16029281913) (rev3) Patchwork
2026-11-13 16:36 ` ✓ CI.KUnit: success " Patchwork
2026-11-13 17:09 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-14  3:12 ` ✓ Xe.CI.FULL: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
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 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

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=f530bf9a-7427-4b97-a30c-8924c4e448e8@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 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.