Skip to content

Reduce MTL-specific platform checks

Matt Roper intel-gfx 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest9 patches 5 repliesIn review
  2. v49 patches 8 repliesSuperseded
  3. v39 patches 3 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v29 patches17 repliesSuperseded
v18 patches17 repliesSuperseded

Changes in v5 from the cover letter

- Rebase on top of latest drm-tip changes.
- Add NULL check to IS_MEDIA_GT_IP_RANGE() so that it can be used safely on i915->media_gt, even on platforms where that pointer may be NULL. (Gustavo)
- Leave the GuC/HuC compatibility check as MTL-specific since that seems to truly be a platform rather than IP limitation. (Gustavo)
- Tweak some macro comment documentation. (Gustavo)

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9drm/i915: Consolidate condition for Wa_22011802037drivers/gpu/drm/i915/gt/intel_engine_cs.c drivers/gpu/drm/i915/gt/intel_execlists_submission.c drivers/gpu/drm/i915/gt/intel_reset.c +3 more+24 -120 replies
2/9drm/i915/xelpmp: Don't assume workarounds extend to future platformsdrivers/gpu/drm/i915/gt/intel_workarounds.c+2 -20 replies
3/9drm/i915/xelpg: Call Xe_LPG workaround functions based on IP versiondrivers/gpu/drm/i915/gt/intel_gt.h drivers/gpu/drm/i915/gt/intel_workarounds.c+31 -180 replies
4/9drm/i915: Eliminate IS_MTL_GRAPHICS_STEPdrivers/gpu/drm/i915/display/skl_universal_plane.c drivers/gpu/drm/i915/gt/gen8_engine_cs.c drivers/gpu/drm/i915/gt/intel_gt.h +7 more+62 -433 replies
5/9drm/i915: Eliminate IS_MTL_MEDIA_STEPdrivers/gpu/drm/i915/gt/intel_gt.h drivers/gpu/drm/i915/gt/intel_rc6.c drivers/gpu/drm/i915/i915_drv.h +1 more+37 -171 reply
6/9drm/i915: Eliminate IS_MTL_DISPLAY_STEPdrivers/gpu/drm/i915/display/intel_display_device.h drivers/gpu/drm/i915/display/intel_fbc.c drivers/gpu/drm/i915/display/intel_pmdemand.c +2 more+35 -110 replies
7/9drm/i915/mtl: Eliminate subplatformsdrivers/gpu/drm/i915/i915_drv.h drivers/gpu/drm/i915/intel_device_info.c drivers/gpu/drm/i915/intel_device_info.h +1 more+3 -300 replies
8/9drm/i915/display: Eliminate IS_METEORLAKE checksdrivers/gpu/drm/i915/display/intel_cdclk.c drivers/gpu/drm/i915/display/intel_cx0_phy.c drivers/gpu/drm/i915/display/intel_display.c +1 more+5 -50 replies
9/9drm/i915: Replace several IS_METEORLAKE with proper IP version checksdrivers/gpu/drm/i915/gem/i915_gem_create.c drivers/gpu/drm/i915/gt/intel_engine_pm.c drivers/gpu/drm/i915/gt/intel_mocs.c +5 more+13 -141 reply

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchAndi ShytiGustavo SousaNemesa Garg
1/9R-b
2/9R-b
3/9R-b
4/9R-b R-b
5/9R-b
6/9R-b
7/9R-b R-b
8/9R-b
9/9R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v5 thread

Cover letter [Intel-gfx] [PATCH v5 0/9] Reduce MTL-specific platform checks

Starting with MTL, the hardware moved to a disaggregated IP design where graphics, media, and display are supposed to be treated independently of the base platform that they're incorporated into. For driver logic that is conditional on these IPs, the code should be checking the IP versions (as read from the GMD_ID registers) rather than trying to match on a specific platform (e.g., MTL). It's possible that these IPs could show up again, without changes, on future non-MTL platforms, or that the current MTL platform could be extended to include new IP versions in future SKUs or refreshes; making sure our driver's conditions are handled appropriately future-proofs for both of these cases.

Going forward, conditions like IS_METEORLAKE should be very rare in the driver; in most places our logic will be conditional upon the IP rather than the base platform.

v2:
- Rework macros slightly; new IP range and stepping range macros can be used with both GFX or MEDIA rather than needing separate macros for each IP. (Tvrtko, Gustavo)
- Fix a > that should have been a >=. (Gustavo)
- Split non-inheritance of media workarounds by future platforms into its own patch. (Gustavo)
- Extra documentation comments

v3:
- Switch back to separate long-form gfx and media macros with no macro pasting. (Jani)
- Move GT-specific macros from intel_drv.h to intel_gt.h. (Andi)
- Replace two more IS_METEORLAKE() conditions with IP version checks.

v4:
- Build IS_*_IP_STEP macros on top of existing range check and stepping check building blocks. (Jani)
- Fix parameters in comment examples.

v5:
- Rebase on top of latest drm-tip changes.
- Add NULL check to IS_MEDIA_GT_IP_RANGE() so that it can be used safely on i915->media_gt, even on platforms where that pointer may be NULL. (Gustavo)
- Leave the GuC/HuC compatibility check as MTL-specific since that seems to truly be a platform rather than IP limitation. (Gustavo)
- Tweak some macro comment documentation. (Gustavo)

Cc Tvrtko Ursulin <[email protected]>
Cc Dnyaneshwar Bhadane <[email protected]>
Cc Gustavo Sousa <[email protected]>
Cc Jani Nikula <[email protected]>
Cc Andi Shyti <[email protected]>

Matt Roper (9):
drm/i915: Consolidate condition for Wa_22011802037 drm/i915/xelpmp: Don't assume workarounds extend to future platforms drm/i915/xelpg: Call Xe_LPG workaround functions based on IP version drm/i915: Eliminate IS_MTL_GRAPHICS_STEP
drm/i915: Eliminate IS_MTL_MEDIA_STEP
drm/i915: Eliminate IS_MTL_DISPLAY_STEP
drm/i915/mtl: Eliminate subplatforms
drm/i915/display: Eliminate IS_METEORLAKE checks
drm/i915: Replace several IS_METEORLAKE with proper IP version checks

 drivers/gpu/drm/i915/display/intel_cdclk.c    |  4 +-
 drivers/gpu/drm/i915/display/intel_cx0_phy.c  |  2 +-
 drivers/gpu/drm/i915/display/intel_display.c  |  2 +-
 .../drm/i915/display/intel_display_device.h   | 25 ++++++
 drivers/gpu/drm/i915/display/intel_dmc.c      |  2 +-
 drivers/gpu/drm/i915/display/intel_fbc.c      |  3 +-
 drivers/gpu/drm/i915/display/intel_pmdemand.c |  2 +-
 drivers/gpu/drm/i915/display/intel_psr.c      | 10 +--
 .../drm/i915/display/skl_universal_plane.c    |  5 +-
 drivers/gpu/drm/i915/gem/i915_gem_create.c    |  4 +-
 drivers/gpu/drm/i915/gt/gen8_engine_cs.c      | 11 +--
 drivers/gpu/drm/i915/gt/intel_engine_cs.c     |  4 +-
 drivers/gpu/drm/i915/gt/intel_engine_pm.c     |  2 +-
 .../drm/i915/gt/intel_execlists_submission.c  |  4 +-
 drivers/gpu/drm/i915/gt/intel_gt.h            | 63 +++++++++++++
 drivers/gpu/drm/i915/gt/intel_gt_mcr.c        |  7 +-
 drivers/gpu/drm/i915/gt/intel_lrc.c           |  4 +-
 drivers/gpu/drm/i915/gt/intel_mocs.c          |  2 +-
 drivers/gpu/drm/i915/gt/intel_rc6.c           |  5 +-
 drivers/gpu/drm/i915/gt/intel_reset.c         | 20 ++++-
 drivers/gpu/drm/i915/gt/intel_reset.h         |  2 +
 drivers/gpu/drm/i915/gt/intel_rps.c           |  2 +-
 drivers/gpu/drm/i915/gt/intel_workarounds.c   | 88 ++++++++++---------
 drivers/gpu/drm/i915/gt/uc/intel_guc.c        |  6 +-
 .../gpu/drm/i915/gt/uc/intel_guc_submission.c |  6 +-
 drivers/gpu/drm/i915/i915_debugfs.c           |  2 +-
 drivers/gpu/drm/i915/i915_drv.h               | 18 +---
 drivers/gpu/drm/i915/i915_perf.c              | 26 ++----
 drivers/gpu/drm/i915/intel_device_info.c      | 14 ---
 drivers/gpu/drm/i915/intel_device_info.h      |  4 -
 include/drm/i915_pciids.h                     | 11 +--
 31 files changed, 210 insertions(+), 150 deletions(-)
Signature · 1 line
2.41.0