dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] i915: dedicated MCR locking and hardware semaphore
@ 2022-11-28 23:30 Matt Roper
  2022-11-28 23:30 ` [PATCH v2 1/5] drm/i915/gt: Correct kerneldoc for intel_gt_mcr_wait_for_reg() Matt Roper
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Matt Roper @ 2022-11-28 23:30 UTC (permalink / raw)
  To: intel-gfx; +Cc: Mika Kuoppala, Balasubramani Vivekanandan, dri-devel

We've been overloading uncore->lock to protect access to the MCR
steering register.  That's not really what uncore->lock is intended for,
and it would be better if we didn't need to hold such a high-traffic
spinlock for the whole sequence of (apply steering, access MCR register,
restore steering).  Switch to a dedicated MCR lock to protect the
steering control register over this critical section and stop relying on
the high-traffic uncore->lock.  On pre-MTL platforms the dedicated MCR
lock is just another software lock, but on MTL and beyond we also
utilize the hardware-provided STEER_SEMAPHORE that allows us to
synchronize with external hardware and firmware agents.

v2:
 - Use irqsave/irqrestore locking; on platforms that use execlist
   submission instead of GuC, MCR accesses can happen in interrupt
   context (tasklet) during reset -> error dump.
 - Extend timeout for hardware semaphore and CI taint if we ever
   encounter it (this implies a hardware/firmware problem).  (Mika)
 - Add an extra patch optimizing xehp_setup_private_ppat by holding
   forcewake & mcr lock over the sequence of register writes.  (Bala)

Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Balasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>

Matt Roper (5):
  drm/i915/gt: Correct kerneldoc for intel_gt_mcr_wait_for_reg()
  drm/i915/gt: Pass gt rather than uncore to lowest-level reads/writes
  drm/i915/gt: Add dedicated MCR lock
  drm/i915/mtl: Add hardware-level lock for steering
  drm/i915/mtl: Hold forcewake and MCR lock over PPAT setup

 drivers/gpu/drm/i915/gt/intel_gt.c          |   7 +-
 drivers/gpu/drm/i915/gt/intel_gt_mcr.c      | 129 ++++++++++++++++++--
 drivers/gpu/drm/i915/gt/intel_gt_mcr.h      |   2 +
 drivers/gpu/drm/i915/gt/intel_gt_regs.h     |   1 +
 drivers/gpu/drm/i915/gt/intel_gt_types.h    |   8 ++
 drivers/gpu/drm/i915/gt/intel_gtt.c         |  27 ++--
 drivers/gpu/drm/i915/gt/intel_mocs.c        |   3 +
 drivers/gpu/drm/i915/gt/intel_workarounds.c |  12 +-
 8 files changed, 162 insertions(+), 27 deletions(-)

-- 
2.38.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2022-12-05 18:16 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 23:30 [PATCH v2 0/5] i915: dedicated MCR locking and hardware semaphore Matt Roper
2022-11-28 23:30 ` [PATCH v2 1/5] drm/i915/gt: Correct kerneldoc for intel_gt_mcr_wait_for_reg() Matt Roper
2022-11-30 15:42   ` Balasubramani Vivekanandan
2022-11-28 23:30 ` [PATCH v2 2/5] drm/i915/gt: Pass gt rather than uncore to lowest-level reads/writes Matt Roper
2022-11-30 15:43   ` Balasubramani Vivekanandan
2022-11-28 23:30 ` [PATCH v2 3/5] drm/i915/gt: Add dedicated MCR lock Matt Roper
2022-11-30 15:45   ` Balasubramani Vivekanandan
2022-11-28 23:30 ` [PATCH v2 4/5] drm/i915/mtl: Add hardware-level lock for steering Matt Roper
2022-12-02 14:46   ` [Intel-gfx] " Balasubramani Vivekanandan
2022-12-05  8:58   ` Tvrtko Ursulin
2022-12-05 15:52     ` Matt Roper
2022-12-05 18:16       ` Tvrtko Ursulin
2022-11-28 23:30 ` [PATCH v2 5/5] drm/i915/mtl: Hold forcewake and MCR lock over PPAT setup Matt Roper
2022-11-30 15:51   ` Balasubramani Vivekanandan
2022-11-30 15:58     ` [PATCH v3 " Matt Roper
2022-12-01  9:26       ` Balasubramani Vivekanandan
2022-12-01 21:01         ` Matt Roper
2022-11-30 16:05     ` [PATCH v2 " Matt Roper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).