public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Jan Maslak <jan.maslak@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: andrzej.hajda@intel.com, Jan Maslak <jan.maslak@intel.com>
Subject: [PATCH 1/1] tests/xe_eudebug_online: fix thread ID math in pagefault-one-of-many shader
Date: Wed, 28 Jan 2026 12:39:34 +0100	[thread overview]
Message-ID: <20260128113934.707513-2-jan.maslak@intel.com> (raw)
In-Reply-To: <20260128113934.707513-1-jan.maslak@intel.com>

Replace the incorrect use of r1.4 (wrong inline field) with explicit dim.x
passed as an argument, then computing tgid.y * dim.x + tgid.x via mul + add.

Signed-off-by: Jan Maslak <jan.maslak@intel.com>
---
 tests/intel/xe_eudebug_online.c                   | 5 +++--
 tests/intel/xe_eudebug_online.c.gen.iga64_codes.c | 7 ++++---
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
index 084bdeb77..9f736af58 100644
--- a/tests/intel/xe_eudebug_online.c
+++ b/tests/intel/xe_eudebug_online.c
@@ -267,12 +267,13 @@ static struct gpgpu_shader *get_shader(struct online_debug_data *data)
 	mov (1) r30.4<1>:ud 0x3f:ud
 	mov (1) r30.7<1>:ud 0x3:ud // 4 bytes
 	// calculate thread id: r20.0 = dim.x * tgid.y + tgid.x
-	mad (1) r20.0<1>:ud r0.1<0;0>:ud r0.6<0;0>:ud r1.4<0>:ud
+	mul (1) r20.0<1>:ud r0.6<0;1,0>:ud ARG(1):ud
+	add (1) r20.0<1>:ud r20.0<0;1,0>:ud r0.1<0;1,0>:ud
 	// page-fault only for arbitrary thread
 	cmp (1) (eq)f0.0 null<1>:ud r20.0<0;1,0>:ud ARG(0):ud
 (f0.0)	send.ugm (1) r31 r30 null 0x0 0x2128403 // load_block2d.ugm.d32t.a64.uc.uc
 #endif
-			)", data->pf_thread_number);
+			)", data->pf_thread_number, data->w_dim.x);
 
 		gpgpu_shader__label(shader, 0);
 		gpgpu_shader__write_dword(shader, SHADER_CANARY, 0);
diff --git a/tests/intel/xe_eudebug_online.c.gen.iga64_codes.c b/tests/intel/xe_eudebug_online.c.gen.iga64_codes.c
index 3bd5b0c5f..2fe6bb7d8 100644
--- a/tests/intel/xe_eudebug_online.c.gen.iga64_codes.c
+++ b/tests/intel/xe_eudebug_online.c.gen.iga64_codes.c
@@ -3,7 +3,7 @@
 
 #include "gpgpu_shader.h"
 
-#define MD5_SUM_IGA64_ASMS f0897ea23eff7ea77569eca6ddd16161
+#define MD5_SUM_IGA64_ASMS 7ab1b0da138a90599e4086c2c40269c9
 
 struct iga64_template const iga64_code_store_sr0_0[] = {
 	{ .gen_ver = 2000, .size = 40, .code = (const uint32_t []) {
@@ -24,13 +24,14 @@ struct iga64_template const iga64_code_store_sr0_0[] = {
 };
 
 struct iga64_template const iga64_code_pagefault_one_of_many[] = {
-	{ .gen_ver = 2000, .size = 44, .code = (const uint32_t []) {
+	{ .gen_ver = 2000, .size = 48, .code = (const uint32_t []) {
 		0x000c0061, 0x1e054330, 0x00000000, 0x00000000,
 		0x00000061, 0x1e054330, 0x00000123, 0x45678000,
 		0x00000061, 0x1e254220, 0x00000000, 0x0000003f,
 		0x00000061, 0x1e454220, 0x00000000, 0x0000003f,
 		0x00000061, 0x1e754220, 0x00000000, 0x00000003,
-		0x0000005b, 0x14040220, 0x02020014, 0x01440064,
+		0x00000041, 0x14058220, 0x02000064, 0xc0ded001,
+		0x00001940, 0x14050220, 0x02001404, 0x00000014,
 		0x00001970, 0x00018220, 0x12001404, 0xc0ded000,
 		0x04032031, 0x1f0c0000, 0xf8061e0c, 0x00a00000,
 		0x80000001, 0x00010000, 0x20000000, 0x00000000,
-- 
2.34.1


  reply	other threads:[~2026-01-28 11:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-28 11:39 [PATCH 0/1] tests/xe_eudebug_online: fix thread ID math in pagefault-one-of-many shader Jan Maslak
2026-01-28 11:39 ` Jan Maslak [this message]
2026-01-28 13:11 ` ✓ i915.CI.BAT: success for tests/xe_eudebug_online: fix thread ID math in pagefault-one-of-many shader (rev2) Patchwork
2026-01-28 13:44 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-28 19:16 ` ✗ i915.CI.Full: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2026-01-28 11:36 [PATCH 0/1] tests/xe_eudebug_online: fix thread ID math in pagefault-one-of-many shader Jan Maslak
2026-01-28 11:36 ` [PATCH 1/1] " Jan Maslak

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=20260128113934.707513-2-jan.maslak@intel.com \
    --to=jan.maslak@intel.com \
    --cc=andrzej.hajda@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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