From: Xin Wang <x.wang@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: alex.zuo@intel.com, shuicheng.lin@intel.com,
stuart.summers@intel.com, kamil.konieczny@intel.com,
matthew.d.roper@intel.com, ravi.kumar.vodapalli@intel.com,
zbigniew.kempczynski@intel.com, Xin Wang <x.wang@intel.com>,
Matthew Auld <matthew.auld@intel.com>
Subject: [PATCH v9 4/5] tests/xe_pat: use debugfs reserved flags
Date: Wed, 31 Dec 2025 05:55:24 +0000 [thread overview]
Message-ID: <20251231055525.51524-5-x.wang@intel.com> (raw)
In-Reply-To: <20251231055525.51524-1-x.wang@intel.com>
Stop hard-coding a reserved PAT index range for Xe2+. Instead,
parse the PAT software configuration via xe_get_pat_sw_config()
and use entries[].rsvd to decide which indices should be rejected
by the kernel.
This keeps the test aligned with kernel PAT layouts across
platforms and future changes.
CC: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: Xin Wang <x.wang@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
---
tests/intel/xe_pat.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tests/intel/xe_pat.c b/tests/intel/xe_pat.c
index f003f0046..bcc86cd70 100644
--- a/tests/intel/xe_pat.c
+++ b/tests/intel/xe_pat.c
@@ -180,8 +180,8 @@ static void pat_sanity(int fd)
*/
static void pat_index_all(int fd)
{
- uint16_t dev_id = intel_get_drm_devid(fd);
size_t size = xe_get_default_alignment(fd);
+ struct intel_pat_cache pat_sw_config = {};
uint32_t vm, bo;
uint8_t pat_index;
@@ -210,10 +210,12 @@ static void pat_index_all(int fd)
igt_assert(intel_get_max_pat_index(fd));
+ xe_fetch_pat_sw_config_or_skip(fd, &pat_sw_config);
+
for (pat_index = 0; pat_index <= intel_get_max_pat_index(fd);
pat_index++) {
- if (intel_get_device_info(dev_id)->graphics_ver >= 20 &&
- pat_index >= 16 && pat_index <= 19) { /* hw reserved */
+
+ if (pat_sw_config.entries[pat_index].rsvd) {
igt_assert_eq(__xe_vm_bind(fd, vm, 0, bo, 0, 0x40000,
size, DRM_XE_VM_BIND_OP_MAP, 0, NULL, 0, 0,
pat_index, 0),
--
2.43.0
next prev parent reply other threads:[~2025-12-31 5:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-31 5:55 [PATCH v9 0/5] tests/intel/xe_pat: add helper funtion to read PAT table Xin Wang
2025-12-31 5:55 ` [PATCH v9 1/5] lib/intel_pat: add pat_sw_config debugfs parser Xin Wang
2025-12-31 16:56 ` Matt Roper
2025-12-31 5:55 ` [PATCH v9 2/5] include/linux_scaffold: add FIELD_GET() bitfield helper Xin Wang
2025-12-31 17:00 ` Matt Roper
2025-12-31 5:55 ` [PATCH v9 3/5] tests/xe_pat: add pat-sanity subtest for debugfs vs getters Xin Wang
2025-12-31 17:11 ` Matt Roper
2025-12-31 5:55 ` Xin Wang [this message]
2025-12-31 5:55 ` [PATCH v9 5/5] intel-ci: add xe_pat pat-sanity Xin Wang
2025-12-31 17:13 ` Matt Roper
2025-12-31 6:47 ` ✓ Xe.CI.BAT: success for tests/intel/xe_pat: add helper funtion to read PAT table Patchwork
2025-12-31 7:07 ` ✓ i915.CI.BAT: " Patchwork
2025-12-31 7:49 ` ✗ Xe.CI.Full: failure " Patchwork
2025-12-31 9:15 ` ✗ i915.CI.Full: " Patchwork
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=20251231055525.51524-5-x.wang@intel.com \
--to=x.wang@intel.com \
--cc=alex.zuo@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@intel.com \
--cc=matthew.auld@intel.com \
--cc=matthew.d.roper@intel.com \
--cc=ravi.kumar.vodapalli@intel.com \
--cc=shuicheng.lin@intel.com \
--cc=stuart.summers@intel.com \
--cc=zbigniew.kempczynski@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