From: Andrzej Hajda <andrzej.hajda@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: "Kamil Konieczny" <kamil.konieczny@linux.intel.com>,
"Priyanka Dandamudi" <priyanka.dandamudi@intel.com>,
"Gwan-gyeong Mun" <gwan-gyeong.mun@intel.com>,
"Piotr Piórkowski" <piotr.piorkowski@intel.com>,
"Christoph Manszewski" <christoph.manszewski@intel.com>,
"Andrzej Hajda" <andrzej.hajda@intel.com>
Subject: [PATCH v6 0/7] lib/xe/xe_query: implement few query helpers
Date: Tue, 25 Nov 2025 10:37:20 +0100 [thread overview]
Message-ID: <20251125-xe_query_helpers-v6-0-97686fac1b77@intel.com> (raw)
This patchset adds following helpers to xe_query library:
- xe_query_device - encapsulates common code around DRM_IOCTL_XE_DEVICE_QUERY,
- xe_for_each_topology_mask - iterator for blob returned by DRM_XE_DEVICE_QUERY_GT_TOPOLOGY
Beside adding helpers patchset also shows their usefullness.
Cleaner code and diffstat of 85 insertions vs 282 deletions hopefuly
proves usability of these helpers.
Signed-off-by: Andrzej Hajda <andrzej.hajda@intel.com>
---
Changes in v6:
- unsquashed last three patches back, to simplify maintenance
- added r-b tags
- Link to v5: https://lore.kernel.org/r/20251121-xe_query_helpers-v5-0-d69c1c160e96@intel.com
Changes in v5:
- dropped patch adding xe_hwconfig_get_u32 - similar helper was just merged
- rebased - to solve recent conflicts
- Link to v4: https://lore.kernel.org/r/20251120-xe_query_helpers-v4-0-2ed6dc04dd94@intel.com
Changes in v4:
- removed can_fail arg from xe_query_device and add xe_query_device_may_fail,
- squashed last three patches into one,
- added tags,
- Link to v3: https://lore.kernel.org/r/20251117-xe_query_helpers-v3-0-25d984ae58cb@intel.com
Changes in v3:
- added sanity check for len > 0 in xe_hwconfig_get_u32 (Priyanka),
- in xe_query_device treat returned query.size == 0 as unsupported query,
- with above change allow query for HWCONFIG to fail - case of old platforms (ADL-S),
- added R-B tag for patch 2,
- Link to v2: https://lore.kernel.org/r/20251107-xe_query_helpers-v2-0-ec66ba6af1c1@intel.com
Changes in v2:
- add xe_query_device arg to allow fail without assert,
because EU_STALL and OA_UNITS are not implemented on old platforms,
- also return NULL if data size is 0 - case of hwconfig on old platforms,
- split first patch to implementation and conversion,
- Link to v1: https://lore.kernel.org/r/20251106-xe_query_helpers-v1-0-d761a944c237@intel.com
---
Andrzej Hajda (7):
tests/intel/xe_eudebug_online: use helper to get hwconfig value
lib/xe/xe_query: introduce helpers for device query
lib/xe/xe_query: use recently introduced helper to query device
lib/xe/xe_query: introduce iterator for GT topology masks
lib/xe/xe_oa: use xe_query helpers for query GT topology
tests/intel/xe_query: use xe_query helpers for query GT topology
tests/intel/xe_eudebug_online: use xe_query helpers for query GT topology
lib/xe/xe_oa.c | 37 ++------
lib/xe/xe_query.c | 203 +++++++---------------------------------
lib/xe/xe_query.h | 26 +++++
tests/intel/xe_eudebug_online.c | 41 +-------
tests/intel/xe_query.c | 69 ++++----------
5 files changed, 93 insertions(+), 283 deletions(-)
---
base-commit: 730ee3dfb26f8d7891fc240b0132a08c5bc7b949
change-id: 20251106-xe_query_helpers-9a49432d828d
Best regards,
--
Andrzej Hajda <andrzej.hajda@intel.com>
next reply other threads:[~2025-11-25 9:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 9:37 Andrzej Hajda [this message]
2025-11-25 9:37 ` [PATCH v6 1/7] tests/intel/xe_eudebug_online: use helper to get hwconfig value Andrzej Hajda
2025-11-25 9:37 ` [PATCH v6 2/7] lib/xe/xe_query: introduce helpers for device query Andrzej Hajda
2025-11-25 9:37 ` [PATCH v6 3/7] lib/xe/xe_query: use recently introduced helper to query device Andrzej Hajda
2025-11-25 9:37 ` [PATCH v6 4/7] lib/xe/xe_query: introduce iterator for GT topology masks Andrzej Hajda
2025-11-25 9:37 ` [PATCH v6 5/7] lib/xe/xe_oa: use xe_query helpers for query GT topology Andrzej Hajda
2025-11-25 9:37 ` [PATCH v6 6/7] tests/intel/xe_query: " Andrzej Hajda
2025-11-25 9:37 ` [PATCH v6 7/7] tests/intel/xe_eudebug_online: " Andrzej Hajda
2025-11-25 13:50 ` ✓ i915.CI.BAT: success for lib/xe/xe_query: implement few query helpers (rev6) Patchwork
2025-11-25 15:04 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-25 18:24 ` ✗ Xe.CI.Full: failure " Patchwork
2025-11-26 9:15 ` â " Hajda, Andrzej
2025-11-26 1:30 ` ✗ 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=20251125-xe_query_helpers-v6-0-97686fac1b77@intel.com \
--to=andrzej.hajda@intel.com \
--cc=christoph.manszewski@intel.com \
--cc=gwan-gyeong.mun@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=piotr.piorkowski@intel.com \
--cc=priyanka.dandamudi@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;
as well as URLs for NNTP newsgroup(s).