From: Xin Wang <x.wang@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: kamil.konieczny@linux.intel.com, matthew.d.roper@intel.com,
shuicheng.lin@intel.com, brian3.nguyen@intel.com,
alex.zuo@intel.com, nakshtra.goyal@intel.com,
dnyaneshwar.bhadane@intel.com, gustavo.sousa@intel.com,
Xin Wang <x.wang@intel.com>
Subject: [PATCH v2 0/6] lib: Add runtime device info query APIs for xe devices
Date: Tue, 7 Oct 2025 23:26:00 +0000 [thread overview]
Message-ID: <20251007232606.363629-1-x.wang@intel.com> (raw)
In-Reply-To: <20251007050554.340485-1-x.wang@intel.com>
This patch series introduces runtime device information query APIs for xe devices,
replacing static device ID lookups with dynamic GMD_ID-based queries.
Background:
-----------
Currently, IGT relies on static device ID tables to determine device capabilities
like graphics generation and version. For xe devices, this approach has limitations:
1. Different device instances may have different graphics_rel (minor version) values
2. Adding new device IDs requires updating hardcoded tables
3. Graphics version information from GMD_ID is more accurate than static lookups
Solution:
---------
This series introduces new runtime query APIs:
- intel_query_gen(fd): Get graphics generation from GMD_ID
- intel_query_graphics_ver(fd): Get combined graphics version
- intel_query_device_info(fd): Get complete device info structure
These APIs enable accurate device version detection by querying GMD_ID at runtime
rather than relying on static device ID matching.
Implementation approach:
------------------------
The series follows a layered approach to ensure clean integration:
1. Add new API infrastructure (lib/intel_chipset, lib/xe/xe_query)
2. Update xe-specific library code to use new APIs
3. Update core library functions to use new APIs
4. Update test cases to use new APIs
5. Update tools to use new APIs
6. Remove hardcoded graphics_rel values as cleanup
Benefits:
---------
- Accurate graphics version detection including minor versions
- Reduced maintenance burden for new device additions
- Better compatibility with varying device configurations
- Consistent API across xe and i915 devices (fallback supported)
Testing:
--------
Tested on xe devices with GMD_ID support. Fallback to traditional devid-based
lookup verified for i915 devices. All existing tests pass with no functional
changes to test behavior.
Xin Wang (6):
lib: Add runtime device info query APIs for xe devices
lib/xe: Use new APIs for xe device info queries
lib: Use new APIs for xe device info queries
tests/intel: Use new APIs for xe device info queries
tools: Use new APIs for xe device info queries
lib/intel_device_info: Remove hardcoded .graphics_rel values
lib/gpgpu_shader.c | 2 +-
lib/gpu_cmds.c | 22 +++++-----
lib/igt_draw.c | 6 +--
lib/igt_gt.c | 10 ++---
lib/igt_store.c | 2 +-
lib/intel_blt.c | 21 +++++-----
lib/intel_blt.h | 2 +-
lib/intel_bufops.c | 13 +++---
lib/intel_chipset.c | 56 ++++++++++++++++++++++++++
lib/intel_chipset.h | 3 ++
lib/intel_common.c | 8 ++--
lib/intel_compute.c | 7 ++--
lib/intel_device_info.c | 3 --
lib/intel_mocs.c | 15 ++++---
lib/intel_pat.c | 17 ++++----
lib/ioctl_wrappers.c | 2 +-
lib/rendercopy_gen9.c | 22 +++++-----
lib/xe/xe_legacy.c | 2 +-
lib/xe/xe_oa.c | 4 +-
lib/xe/xe_query.c | 19 +++++++++
lib/xe/xe_query.h | 3 ++
lib/xe/xe_sriov_provisioning.c | 4 +-
tests/intel/api_intel_allocator.c | 2 +-
tests/intel/kms_ccs.c | 13 ++----
tests/intel/kms_draw_crc.c | 2 +-
tests/intel/kms_fbcon_fbt.c | 2 +-
tests/intel/kms_frontbuffer_tracking.c | 12 +++---
tests/intel/kms_pipe_stress.c | 4 +-
tests/intel/xe_ccs.c | 24 +++++------
tests/intel/xe_copy_basic.c | 6 +--
tests/intel/xe_debugfs.c | 3 +-
tests/intel/xe_eudebug_online.c | 8 +---
tests/intel/xe_exec_store.c | 6 +--
tests/intel/xe_fault_injection.c | 2 +-
tests/intel/xe_oa.c | 38 +++++++++--------
tests/intel/xe_pat.c | 26 +++++-------
tools/intel_tiling_detect.c | 3 +-
tools/xe-perf/meson.build | 2 +-
tools/xe-perf/xe_perf_configs.c | 2 +-
tools/xe-perf/xe_perf_recorder.c | 2 +-
40 files changed, 226 insertions(+), 174 deletions(-)
--
2.43.0
next prev parent reply other threads:[~2025-10-07 23:26 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 5:05 [PATCH] lib/intel_device_info: get the xe .graphics_rel from GMD_ID Xin Wang
2025-10-07 9:34 ` Kamil Konieczny
2025-10-07 13:12 ` ✗ Xe.CI.BAT: failure for " Patchwork
2025-10-07 13:32 ` ✓ i915.CI.BAT: success " Patchwork
2025-10-07 16:10 ` ✗ Xe.CI.Full: failure " Patchwork
2025-10-07 16:42 ` [PATCH] " Lin, Shuicheng
2025-10-07 23:26 ` Xin Wang [this message]
2025-10-07 23:26 ` [PATCH v2 1/6] lib: Add runtime device info query APIs for xe devices Xin Wang
2025-10-07 23:26 ` [PATCH v2 2/6] lib/xe: Use new APIs for xe device info queries Xin Wang
2025-10-07 23:26 ` [PATCH v2 3/6] lib: " Xin Wang
2025-10-07 23:26 ` [PATCH v2 4/6] tests/intel: " Xin Wang
2025-10-07 23:26 ` [PATCH v2 5/6] tools: " Xin Wang
2025-10-07 23:26 ` [PATCH v2 6/6] lib/intel_device_info: Remove hardcoded .graphics_rel values Xin Wang
2025-10-08 1:19 ` ✓ Xe.CI.BAT: success for lib/intel_device_info: get the xe .graphics_rel from GMD_ID (rev2) Patchwork
2025-10-08 3:07 ` ✗ Xe.CI.Full: failure " Patchwork
2025-10-08 5:04 ` ✓ i915.CI.BAT: success " Patchwork
2025-10-08 6:45 ` ✗ i915.CI.Full: failure for lib/intel_device_info: get the xe .graphics_rel from GMD_ID Patchwork
2025-10-08 12:14 ` ✗ i915.CI.Full: failure for lib/intel_device_info: get the xe .graphics_rel from GMD_ID (rev2) Patchwork
2025-10-08 21:02 ` [PATCH v3 0/6] lib/intel_device_info: get the xe .graphics_rel from GMD_ID Xin Wang
2025-10-08 21:02 ` [PATCH v3 1/6] lib: Add runtime device info query APIs for xe devices Xin Wang
2025-10-08 22:01 ` Matt Roper
2025-10-09 18:00 ` Wang, X
2025-10-09 23:57 ` Matt Roper
2025-10-10 23:25 ` Ville Syrjälä
2025-10-08 22:07 ` Lin, Shuicheng
2025-10-09 22:34 ` Wang, X
2025-10-09 16:42 ` Kamil Konieczny
2025-10-09 22:30 ` Wang, X
2025-10-08 21:02 ` [PATCH v3 2/6] lib/xe: Use new APIs for xe device info queries Xin Wang
2025-10-08 21:02 ` [PATCH v3 3/6] lib: " Xin Wang
2025-10-08 21:02 ` [PATCH v3 4/6] tests/intel: " Xin Wang
2025-10-08 21:02 ` [PATCH v3 5/6] tools: " Xin Wang
2025-10-08 21:02 ` [PATCH v3 6/6] lib/intel_device_info: Remove hardcoded .graphics_rel values Xin Wang
2025-10-08 21:46 ` ✗ Xe.CI.BAT: failure for lib/intel_device_info: get the xe .graphics_rel from GMD_ID (rev3) Patchwork
2025-10-08 22:04 ` ✓ i915.CI.BAT: success " Patchwork
2025-10-09 1:06 ` ✗ Xe.CI.Full: failure " Patchwork
2025-10-09 11:21 ` ✗ 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=20251007232606.363629-1-x.wang@intel.com \
--to=x.wang@intel.com \
--cc=alex.zuo@intel.com \
--cc=brian3.nguyen@intel.com \
--cc=dnyaneshwar.bhadane@intel.com \
--cc=gustavo.sousa@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=matthew.d.roper@intel.com \
--cc=nakshtra.goyal@intel.com \
--cc=shuicheng.lin@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