Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/intel/xe_exec_system_allocator: Skip unsupported PAT madvise indices
@ 2026-10-26  5:20 nishit.sharma
  2026-10-26  6:02 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: nishit.sharma @ 2026-10-26  5:20 UTC (permalink / raw)
  To: igt-dev, arvind.yadav; +Cc: kamil.konieczny

From: Nishit Sharma <nishit.sharma@intel.com>

Skip PAT-index madvise subtests when the selected 2-way coherent index is
rejected by the workaround, avoiding an assertion failure on
affected platforms.

Signed-off-by: Nishit Sharma <nishit.sharma@intel.com>
---
 tests/intel/xe_exec_system_allocator.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/tests/intel/xe_exec_system_allocator.c b/tests/intel/xe_exec_system_allocator.c
index 45ec62813..2519b9e62 100644
--- a/tests/intel/xe_exec_system_allocator.c
+++ b/tests/intel/xe_exec_system_allocator.c
@@ -1216,6 +1216,22 @@ xe_vm_madvixe_pat_attr(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 		      DRM_XE_MEM_RANGE_ATTR_PAT, pat_index, 0, 0);
 }
 
+static bool pat_idx_unsupported_by_wa(int fd, uint8_t pat_idx)
+{
+	struct intel_pat_cache pat = {};
+	int32_t n;
+
+	if (intel_graphics_ver(intel_get_drm_devid(fd)) < IP_VER(35, 0) ||
+	    xe_has_vram(fd))
+		return false;
+
+	n = xe_get_pat_sw_config(fd, &pat, 0);
+	if (n <= pat_idx)
+		return false;
+
+	return (pat.entries[pat_idx].pat & 0x3) == 3;
+}
+
 static void
 xe_vm_madvise_atomic_attr(int fd, uint32_t vm, uint64_t addr, uint64_t range,
 			  int mem_attr)
@@ -2887,6 +2903,9 @@ int igt_main()
 			if (IS_PONTEVECCHIO(dev_id) &&
 			    strstr(s->name, "madvise-pat-idx-uc-comp-"))
 				igt_skip("Skipping compression-related PAT index on PVC\n");
+
+			igt_skip_on_f(pat_idx_unsupported_by_wa(fd, s->fn(fd)),
+				      "2-way coherent PAT index not allowed\n");
 			xe_for_each_engine(fd, hwe)
 				test_exec(fd, hwe, 1, 1, SZ_4M, 0, 0, NULL, NULL, s->flags, s->fn);
 		}
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-28 12:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-26  5:20 [PATCH] tests/intel/xe_exec_system_allocator: Skip unsupported PAT madvise indices nishit.sharma
2026-10-26  6:02 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-10-26  6:16 ` ✓ i915.CI.BAT: " Patchwork
2026-10-26  7:20 ` ✓ Xe.CI.FULL: " Patchwork
2026-10-26 11:12 ` ✗ i915.CI.Full: failure " Patchwork
2026-10-28 12:25 ` [PATCH] " Kamil Konieczny
2026-10-28 12:40   ` Gustavo Sousa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox