Skip to content

i915: Prep work for explicit MCR handling

Matt Roper dri-devel intel-gfx 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7drm/i915/gen8: Create separate reg definitions for new MCR registersdrivers/gpu/drm/i915/gt/intel_engine_cs.c drivers/gpu/drm/i915/gt/intel_gt_regs.h drivers/gpu/drm/i915/gt/intel_workarounds.c +6 more+34 -250 replies
2/7drm/i915/xehp: Create separate reg definitions for new MCR registersdrivers/gpu/drm/i915/gt/intel_gt_regs.h drivers/gpu/drm/i915/gt/intel_gtt.c drivers/gpu/drm/i915/gt/intel_mocs.c +2 more+52 -310 replies
3/7drm/i915/gt: Drop a few unused register definitionsdrivers/gpu/drm/i915/gt/intel_gt_regs.h+0 -170 replies
4/7drm/i915/gt: Correct prefix on a few registersdrivers/gpu/drm/i915/gt/intel_gt_regs.h drivers/gpu/drm/i915/gt/intel_workarounds.c+9 -90 replies
5/7drm/i915: Define MCR registers explicitlydrivers/gpu/drm/i915/gt/intel_gt_regs.h+60 -580 replies
6/7drm/i915/gt: Always use MCR functions on multicast registersdrivers/gpu/drm/i915/gt/intel_ggtt.c drivers/gpu/drm/i915/gt/intel_gtt.c drivers/gpu/drm/i915/gt/intel_gtt.h +3 more+55 -450 replies
7/7drm/i915/gt: Add MCR-specific workaround initializersdrivers/gpu/drm/i915/gt/intel_workarounds.c drivers/gpu/drm/i915/gt/intel_workarounds_types.h+252 -1660 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/7] i915: Prep work for explicit MCR handling

Steering of multicast/replicated registers becomes a bit more complicated on Meteor Lake. Whereas previously the control register we used to manage the steering was only used by our driver[*], software's control of steering has now been consolidated with the controls for various other hardware/firmware agents into a single register. We can no longer utilize pre-programmed implicit steering since other firmware agents may change the steering target and not restore it afterward; we'll need to explicitly steer all types of MCR registers (including the GSLICE/COMPUTE/DSS ranges that have been handled implicitly in the past). Furthermore, since multiple agents will now be sharing a single steering control register, races are possible. To address this, the hardware adds a new MCR semaphore register which is supposed to be used to temporarily lock the steering while performing MCR operations.

It's going to become important for us to handle accesses of multicast registers very explicitly going forward. This series provides some prep work for that by updating our register definitions to clearly define registers as either MCR or non-MCR and ensure that we're using the intel_gt_mcr_*() functions rather than intel_uncore_*() when operating on MCR registers. In a future series we plan to change the MCR_REG() register definitions to actually declare MCR registers as a new C type (i.e., not an i915_reg_t) so that the compiler will be able to help us find any mistakes where non-MCR functions are used on MCR registers and vice-versa. Introduction of the MTL steering tables and introduction of the steering semaphore support will also arrive in future patch series.

[*] This is a bit of an oversimplification; there are some hardware and software debug tools that use the same MCR_SELECTOR register that i915 does and which could potentially re-steer MCR accesses behind our back. E.g., simply using IGT's "intel_reg" tool to write the MCR_SELECTOR register at the wrong time could interfere with driver operation. But given that these debug facilities require root privileges to run and are only used by people intentionally debugging the driver or hardware, we can ignore such races for real-world usage.

Matt Roper (7):
drm/i915/gen8: Create separate reg definitions for new MCR registers drm/i915/xehp: Create separate reg definitions for new MCR registers drm/i915/gt: Drop a few unused register definitions drm/i915/gt: Correct prefix on a few registers
drm/i915: Define MCR registers explicitly
drm/i915/gt: Always use MCR functions on multicast registers drm/i915/gt: Add MCR-specific workaround initializers

 drivers/gpu/drm/i915/gt/intel_engine_cs.c     |   4 +-
 drivers/gpu/drm/i915/gt/intel_ggtt.c          |   4 +-
 drivers/gpu/drm/i915/gt/intel_gt_regs.h       | 138 +++---
 drivers/gpu/drm/i915/gt/intel_gtt.c           |  44 +-
 drivers/gpu/drm/i915/gt/intel_gtt.h           |   2 +-
 drivers/gpu/drm/i915/gt/intel_mocs.c          |  12 +-
 drivers/gpu/drm/i915/gt/intel_workarounds.c   | 426 +++++++++++-------
 .../gpu/drm/i915/gt/intel_workarounds_types.h |   4 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c    |   7 +-
 .../gpu/drm/i915/gt/uc/intel_guc_capture.c    |   4 +-
 drivers/gpu/drm/i915/gt/uc/intel_guc_fw.c     |  12 +-
 drivers/gpu/drm/i915/gvt/handlers.c           |   2 +-
 drivers/gpu/drm/i915/gvt/mmio_context.c       |   2 +-
 drivers/gpu/drm/i915/intel_gvt_mmio_table.c   |   2 +-
 drivers/gpu/drm/i915/intel_pm.c               |  20 +-
 15 files changed, 397 insertions(+), 286 deletions(-)
Signature · 1 line
2.37.2