public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Xin Wang <x.wang@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Xin Wang <x.wang@intel.com>
Subject: [PATCH v10 0/2] lib/intel_device_info: get the xe .graphics_rel from GMD_ID
Date: Mon, 12 Jan 2026 19:17:30 +0000	[thread overview]
Message-ID: <20260112191732.672297-1-x.wang@intel.com> (raw)

This series enables IGT to retrieve the accurate IP minor version
(graphics_rel) at runtime for xe platforms with GMD_ID support,
instead of relying on hardcoded values in the PCI device table.

Background:
-----------
Current IGT uses static PCI device tables with hardcoded graphics_rel
values. For Xe2 platforms, Different device instances may have
different graphics_rel (minor version) values

The kernel's GMD_ID ioctl provides accurate runtime IP version
information (ip_ver_major.ip_ver_minor) which should be used for
platform-specific workarounds and feature detection.

Solution:
---------
This series adds support to query xe device info at runtime:

Patch 1/2: Get runtime xe device graphics version from GMD_ID
- Populate graphics versions in xe_device from GMD_ID ioctl
- Cache device ipver by devid in global map for efficient lookup
- Provide xe_ipver_cache_lookup() API for other components

Patch 2/2: Query runtime xe device graphics versions
- Use runtime xe device ipver for Gen20+ platforms
- Use weak symbol linkage to avoid breaking static library builds
- Remove hardcoded graphics_rel from static table for xe platforms

Benefits:
---------
- Accurate IP version for platform-specific workarounds
- Proper feature detection for hardware variants
- Unified device info API between i915 and xe drivers
- No changes needed to existing test code

V2:
- set the graphics version info in xe_device_get() don't copy 
  the whole struct of the intel_device_info 
- update the graphics_rel when the info is already in the cache
V3:
- Optimize the coding style
V4:
- add braces around the else statement body
V5:
- add new struct xe_device_ipver to hold the ipver info
- separate cache map to eliminate collision (Roper, Matthew D)
- changed function name to xe_ipver_cache_lookup() to avoid 
  confusion (Roper, Matthew D)
V6:
- optimize the coding style. (Summers, Stuart)
V7:
- rebased to latest mainline

Xin Wang (2):
  lib/xe/xe_query: Get runtime xe device graphics version from GMD_ID
  lib/intel_device_info: Query runtime xe device graphics versions

 lib/intel_chipset.h     |  6 +++++
 lib/intel_device_info.c | 26 +++++++++++++++++---
 lib/xe/xe_query.c       | 54 ++++++++++++++++++++++++++++++++++++++++-
 lib/xe/xe_query.h       |  4 +++
 4 files changed, 86 insertions(+), 4 deletions(-)

-- 
2.43.0


             reply	other threads:[~2026-01-12 19:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 19:17 Xin Wang [this message]
2026-01-12 19:17 ` [PATCH v10 1/2] lib/xe/xe_query: Get runtime xe device graphics version from GMD_ID Xin Wang
2026-01-15  8:00   ` Zbigniew Kempczyński
2026-01-16 18:55     ` Wang, X
2026-01-16 21:33     ` Matt Roper
2026-01-19  7:43       ` Wang, X
2026-01-19 10:36       ` Zbigniew Kempczyński
2026-01-20 23:15         ` Matt Roper
2026-01-12 19:17 ` [PATCH v10 2/2] lib/intel_device_info: Query runtime xe device graphics versions Xin Wang
2026-01-12 20:38 ` ✓ Xe.CI.BAT: success for lib/intel_device_info: get the xe .graphics_rel from GMD_ID Patchwork
2026-01-12 20:50 ` ✗ i915.CI.BAT: failure " Patchwork
2026-01-13  3:22 ` ✓ Xe.CI.Full: success " 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=20260112191732.672297-1-x.wang@intel.com \
    --to=x.wang@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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