igt-dev.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/8] lib/xe/xe_query: implement few query helpers
@ 2025-11-17 10:47 Andrzej Hajda
  2025-11-17 10:47 ` [PATCH v3 1/8] lib/xe_query: add helper to get first value of hwconfig Andrzej Hajda
                   ` (11 more replies)
  0 siblings, 12 replies; 17+ messages in thread
From: Andrzej Hajda @ 2025-11-17 10:47 UTC (permalink / raw)
  To: igt-dev
  Cc: Kamil Konieczny, Priyanka Dandamudi, Gwan-gyeong Mun,
	Piotr Piórkowski, Christoph Manszewski, Andrzej Hajda

This patchset adds following helpers to xe_query library:
- xe_hwconfig_get_u32 - to get single value from hwconfig,
  similar helper exists in kernel,
- 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 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 (8):
      lib/xe_query: add helper to get first value of hwconfig
      tests/intel/xe_eudebug_online: use helper to get hwconfig value
      lib/xe/xe_query: introduce helper for device query
      lib/xe/xe_query: use recently introduced helper to query device
      lib/xe/xe_query: introduce iterator for GT topology masks
      tests/intel/xe_eudebug_online: use xe_query helpers for query GT topology
      tests/intel/xe_query: use xe_query helpers for query GT topology
      lib/xe/xe_oa: use xe_query helpers for query GT topology

 lib/xe/xe_oa.c                  |  37 ++-----
 lib/xe/xe_query.c               | 222 ++++++++++------------------------------
 lib/xe/xe_query.h               |   8 ++
 tests/intel/xe_eudebug_online.c |  41 +-------
 tests/intel/xe_query.c          |  69 +++----------
 5 files changed, 95 insertions(+), 282 deletions(-)
---
base-commit: 7810bd1660b760d468164e83ca7d980ec83231a0
change-id: 20251106-xe_query_helpers-9a49432d828d

Best regards,
-- 
Andrzej Hajda <andrzej.hajda@intel.com>


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

end of thread, other threads:[~2025-11-19 10:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-17 10:47 [PATCH v3 0/8] lib/xe/xe_query: implement few query helpers Andrzej Hajda
2025-11-17 10:47 ` [PATCH v3 1/8] lib/xe_query: add helper to get first value of hwconfig Andrzej Hajda
2025-11-18  7:04   ` Dandamudi, Priyanka
2025-11-17 10:47 ` [PATCH v3 2/8] tests/intel/xe_eudebug_online: use helper to get hwconfig value Andrzej Hajda
2025-11-17 10:47 ` [PATCH v3 3/8] lib/xe/xe_query: introduce helper for device query Andrzej Hajda
2025-11-18 16:20   ` Kamil Konieczny
2025-11-17 10:47 ` [PATCH v3 4/8] lib/xe/xe_query: use recently introduced helper to query device Andrzej Hajda
2025-11-17 10:47 ` [PATCH v3 5/8] lib/xe/xe_query: introduce iterator for GT topology masks Andrzej Hajda
2025-11-19 10:54   ` Dandamudi, Priyanka
2025-11-17 10:47 ` [PATCH v3 6/8] tests/intel/xe_eudebug_online: use xe_query helpers for query GT topology Andrzej Hajda
2025-11-19 10:59   ` Dandamudi, Priyanka
2025-11-17 10:47 ` [PATCH v3 7/8] tests/intel/xe_query: " Andrzej Hajda
2025-11-17 10:47 ` [PATCH v3 8/8] lib/xe/xe_oa: " Andrzej Hajda
2025-11-17 15:51 ` ✓ Xe.CI.BAT: success for lib/xe/xe_query: implement few query helpers (rev3) Patchwork
2025-11-17 15:58 ` ✓ i915.CI.BAT: " Patchwork
2025-11-17 18:00 ` ✗ Xe.CI.Full: failure " Patchwork
2025-11-18  3:01 ` ✓ i915.CI.Full: success " Patchwork

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).