Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t 0/2] Derive write-through availability from the PAT config
@ 2026-09-04  8:56 Sujaritha Sundaresan
  2026-09-04  8:56 ` [PATCH i-g-t 1/2] lib/intel_pat: add intel_pat_has_wt() Sujaritha Sundaresan
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Sujaritha Sundaresan @ 2026-09-04  8:56 UTC (permalink / raw)
  To: igt-dev; +Cc: zbigniew.kempczynski, andrzej.hajda, Sujaritha Sundaresan

Not every platform has a write-through entry in its PAT table. Where
there is none the KMD reports the UC index for XE_CACHE_WT, so a test
which asks for write-through quietly gets uncached instead, re-running
coverage it already has under a misleading name. Spotting that currently
means enumerating IP versions in the test, which needs revisiting for
every new platform.

Patch 1 adds intel_pat_has_wt(), which answers the question from the PAT
config itself: a WT index which aliases UC means there is no distinct
write-through entry. Patch 2 uses it to skip the write-through checks in
xe_pat where there is nothing to exercise, so they report an honest skip
rather than a pass.

Following the library guidance in CONTRIBUTING.md, the helper is a plain
query: no igt_require()/igt_skip() in the library, the tests decide what
to do with the answer.

intel_get_pat_idx_wt() itself is deliberately left alone here. Having it
return XE_PAT_IDX_INVALID rather than the UC index is the stricter fix
and probably the right end state, but it changes behaviour for the
callers in kms_ccs and xe_exec_system_allocator as well, so it seems
better as a follow-up once the helper is in tree.

No functional change intended for platforms which do have a write-through
PAT index.

Sujaritha Sundaresan (2):
  lib/intel_pat: add intel_pat_has_wt()
  tests/intel/xe_pat: skip the write-through checks without a WT index

 lib/intel_pat.c      | 22 ++++++++++++++++++++++
 lib/intel_pat.h      |  2 ++
 tests/intel/xe_pat.c | 38 ++++++++++++++++++++++----------------
 3 files changed, 46 insertions(+), 16 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2026-09-08  6:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-04  8:56 [PATCH i-g-t 0/2] Derive write-through availability from the PAT config Sujaritha Sundaresan
2026-09-04  8:56 ` [PATCH i-g-t 1/2] lib/intel_pat: add intel_pat_has_wt() Sujaritha Sundaresan
2026-09-08  6:09   ` Hajda, Andrzej
2026-09-08  6:21     ` Sundaresan, Sujaritha
2026-09-04  8:56 ` [PATCH i-g-t 2/2] tests/intel/xe_pat: skip the write-through checks without a WT index Sujaritha Sundaresan
2026-09-08  6:18   ` Hajda, Andrzej
2026-09-04  9:33 ` ✓ Xe.CI.BAT: success for Derive write-through availability from the PAT config Patchwork
2026-09-04  9:43 ` ✗ i915.CI.BAT: failure " Patchwork
2026-09-04 20:10 ` ✗ Xe.CI.FULL: " Patchwork

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