Begin adding GMD_ID support for Xe
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest9 patches 4 repliesIn review
- v29 patches 0 repliesSuperseded
- v16 patches 12 repliesSuperseded
Changes in v3 from the cover letter
- Fix KUnit build failure (missing EXPORT_SYMBOL_IF_KUNIT)
- Place graphics/media descriptor structures in their own header at first introduction rather than moving them later in the series. (Lucas)
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | drm/xe: Start splitting xe_device_desc into graphics/media structuresdrivers/ drivers/ | +86 | 0 replies | |
| 2/9 | drm/xe: Set require_force_probe in each platform's descriptiondrivers/ | +7 | 0 replies | |
| 3/9 | drm/xe: Move most platform traits to graphics IPdrivers/ drivers/ | +56 | 0 replies | |
| 4/9 | drm/xe: Move engine masks into IP descriptor structuresdrivers/ drivers/ | +46 | 0 replies | |
| 5/9 | drm/xe: Clarify GT counting logicdrivers/ drivers/ | +16 | 0 replies | |
| 6/9 | drm/xe: Add printable name to IP descriptorsdrivers/ drivers/ drivers/ | +24 | 1 reply | |
| 7/9 | drm/xe: Select graphics/media descriptors from GMD_IDdrivers/ drivers/ drivers/ | +159 | 1 reply | |
| 8/9 | drm/xe: Add KUnit test for xe_pci.c IP engine listsdrivers/ drivers/ drivers/ +1 more | +125 | 1 reply | |
| 9/9 | drm/xe: Clean up xe_device_descdrivers/ | +4 | 1 reply |
Reviews trailers per patch
All 9 patches have a Reviewed-by or Acked-by.
| Patch | Lucas De Marchi |
|---|---|
| 1/9 | R-b |
| 2/9 | R-b |
| 3/9 | R-b |
| 4/9 | R-b |
| 5/9 | R-b |
| 6/9 | R-b |
| 7/9 | R-b |
| 8/9 | R-b |
| 9/9 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Intel-xe] [PATCH v3 0/9] Begin adding GMD_ID support for Xe
As Intel GPUs move toward chiplet-based designs with disaggregated IP blocks, it's no longer considered correct to determine platform IP versions and most of the behavior/capabilities based on a simple PCI devid/revid lookup. From Meteor Lake onward, the driver is instead expected to identify the specific IP blocks present on the platform by reading GMD_ID registers that provide the version/stepping of each unit. PCI IDs should only be used in the rare cases where the driver needs to identify the SoC and its characteristics. Going forward, we could theoretically see products mixing and matching chiplets in ways that cross the traditional platform boundaries (e.g., it would be possible for a "MTL" to show up with a future graphics and/or media IP chiplet, or it would be possible for some future platform to directly reuse a graphics and/or media chiplet from MTL). In the long term we can no longer rely on PCI IDs to properly reflect these types of cases.
This series provides the initial framework for GMD_ID matching. The xe_device_desc structures used to describe platforms are broken up so that most of the important characteristics now reside in separate xe_graphics_desc and xe_media_desc structures for each IP rather than in the platform-level structure. PCI devid matching will still happen at probe and will operate mostly unchanged on pre-MTL platforms where the xe_device_desc will point directly at the appropriate xe_graphics_desc and xe_media_desc descriptors. However on MTL and beyond, the xe_device_desc structure associated with a PCI ID will initially just point at generic pair of descriptors with no real feature flags set, indicating that true matching needs to happen based on GMD_ID readout. The driver will then read the appropriate GMD_ID registers and select the corresponding set of feature flags to use, independently of the base platform.
MTL still isn't loading and running properly on the Xe driver, so this is only lightly tested; with these patches the driver seems to identify the IP versions correctly (already more correctly than the old PCI-matching code did) and pick the correct set of feature flags before the load fails for other pre-existing reasons.
Note that there's still more work to be done in this area after this series:
- Most subplatform matching (e.g., MTL-M vs MTL-P) should also be tied to GMD_ID rather than PCI ID.
- Graphics/Media stepping information also comes from GMD_ID; PCI revid should only be used to identify the SoC stepping (which is seldom used by the driver).
- Various places in the driver that match a platform directly will need to be updated to match on the IP version instead. Some examples would be places like GuC firmware loading or workaround definition, where we only care about the graphics chiplet, not the base platform it happens to be plugged into.
- i915 has basic GMD_ID support for version identification, but needs similar reworks to select feature flags based on the GMD_ID. Since Xe recycles i915's display code, these i915 updates will be needed to fully handle display IP matching properly.
v2:
- Drop dummy dummy structures for GMD_ID graphics/media; leaving these set to NULL should work both for GMD_ID platforms and for pre-GMD_ID platforms that lack media IP (e.g., PVC).
- Add KUnit test to ensure the hardware engine lists are sane in the GMD_ID-based IP descriptors.
- Associate a printable name with the various IPs and include it in the initial drm_dbg() print.
- General cleanup/packing for the xe_device_desc structure.
v3:
- Fix KUnit build failure (missing EXPORT_SYMBOL_IF_KUNIT)
- Place graphics/media descriptor structures in their own header at first introduction rather than moving them later in the series. (Lucas)
Matt Roper (9):
drm/xe: Start splitting xe_device_desc into graphics/media structures drm/xe: Set require_force_probe in each platform's description drm/xe: Move most platform traits to graphics IP
drm/xe: Move engine masks into IP descriptor structures drm/xe: Clarify GT counting logic
drm/xe: Add printable name to IP descriptors
drm/xe: Select graphics/media descriptors from GMD_ID drm/xe: Add KUnit test for xe_pci.c IP engine lists drm/xe: Clean up xe_device_desc
drivers/gpu/drm/xe/regs/xe_gt_regs.h | 6 + drivers/gpu/drm/xe/tests/Makefile | 1 + drivers/gpu/drm/xe/tests/xe_pci.c | 44 +++ drivers/gpu/drm/xe/tests/xe_pci_test.c | 74 ++++ drivers/gpu/drm/xe/tests/xe_pci_test.h | 6 + drivers/gpu/drm/xe/xe_device_types.h | 4 + drivers/gpu/drm/xe/xe_pci.c | 463 ++++++++++++++++--------- drivers/gpu/drm/xe/xe_pci.h | 5 + drivers/gpu/drm/xe/xe_pci_types.h | 39 +++ 9 files changed, 486 insertions(+), 156 deletions(-) create mode 100644 drivers/gpu/drm/xe/tests/xe_pci_test.c create mode 100644 drivers/gpu/drm/xe/xe_pci_types.h
Signature · 1 line
2.39.2