1. 06 Dec, 2022 4 commits
  2. 05 Dec, 2022 3 commits
  3. 02 Dec, 2022 1 commit
    • Matt Roper's avatar
      drm/i915/mtl: Add hardware-level lock for steering · 3100240b
      Matt Roper authored
      Starting with MTL, the driver needs to not only protect the steering
      control register from simultaneous software accesses, but also protect
      against races with hardware/firmware agents.  The hardware provides a
      dedicated locking mechanism to support this via the MTL_STEER_SEMAPHORE
      register.  Reading the register acts as a 'trylock' operation; the read
      will return 0x1 if the lock is acquired or 0x0 if something else is
      already holding the lock; once acquired, writing 0x1 to the register
      will release the lock.
      
      We'll continue to grab the software lock as well, just so lockdep can
      track our locking; assuming the hardware lock is behaving properly,
      there should never be any contention on the software lock in this case.
      
      v2:
       - Extend hardware semaphore timeout and add a taint for CI if it ever
         happens (this would imply misbehaving hardware/firmware).  (Mika)
       - Add "MTL_" prefix to new steering semaphore register.  (Mika)
      
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarBalasubramani Vivekanandan <balasubramani.vivekanandan@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221128233014.4000136-5-matthew.d.roper@intel.com
      3100240b
  4. 01 Dec, 2022 2 commits
  5. 30 Nov, 2022 6 commits
  6. 29 Nov, 2022 2 commits
  7. 28 Nov, 2022 2 commits
  8. 24 Nov, 2022 2 commits
  9. 23 Nov, 2022 3 commits
  10. 22 Nov, 2022 1 commit
  11. 21 Nov, 2022 4 commits
  12. 18 Nov, 2022 1 commit
    • Matt Roper's avatar
      drm/i915/gt: Manage uncore->lock while waiting on MCR register · 192bb40f
      Matt Roper authored
      The GT MCR code currently relies on uncore->lock to avoid race
      conditions on the steering control register during MCR operations.  The
      *_fw() versions of MCR operations expect the caller to already hold
      uncore->lock, while the non-fw variants manage the lock internally.
      However the sole callsite of intel_gt_mcr_wait_for_reg_fw() does not
      currently obtain the forcewake lock, allowing a potential race condition
      (and triggering an assertion on lockdep builds).  Furthermore, since
      'wait for register value' requests may not return immediately, it is
      undesirable to hold a fundamental lock like uncore->lock for the entire
      wait and block all other MMIO for the duration; rather the lock is only
      needed around the MCR read operations and can be released during the
      delays.
      
      Convert intel_gt_mcr_wait_for_reg_fw() to a non-fw variant that will
      manage uncore->lock internally.  This does have the side effect of
      causing an unnecessary lookup in the forcewake table on each read
      operation, but since the caller is still holding the relevant forcewake
      domain, this will ultimately just incremenent the reference count and
      won't actually cause any additional MMIO traffic.
      
      In the future we plan to switch to a dedicated MCR lock to protect the
      steering critical section rather than using the overloaded and
      high-traffic uncore->lock; on MTL and beyond the new lock can be
      implemented on top of the hardware-provided synchonization mechanism for
      steering.
      
      Fixes: 3068bec8 ("drm/i915/gt: Add intel_gt_mcr_wait_for_reg_fw()")
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221117173358.1980230-1-matthew.d.roper@intel.com
      192bb40f
  13. 17 Nov, 2022 5 commits
  14. 16 Nov, 2022 4 commits