1. 30 12月, 2022 1 次提交
  2. 01 12月, 2022 1 次提交
  3. 30 11月, 2022 1 次提交
    • J
      drm/i915: Fix negative value passed as remaining time · 6a534729
      Janusz Krzysztofik 提交于
      Commit b97060a9 ("drm/i915/guc: Update intel_gt_wait_for_idle to work
      with GuC") extended the API of intel_gt_retire_requests_timeout() with an
      extra argument 'remaining_timeout', intended for passing back unconsumed
      portion of requested timeout when 0 (success) is returned.  However, when
      request retirement happens to succeed despite an error returned by a call
      to dma_fence_wait_timeout(), that error code (a negative value) is passed
      back instead of remaining time.  If we then pass that negative value
      forward as requested timeout to intel_uc_wait_for_idle(), an explicit BUG
      will be triggered.
      
      If request retirement succeeds but an error code is passed back via
      remaininig_timeout, we may have no clue on how much of the initial timeout
      might have been left for spending it on waiting for GuC to become idle.
      OTOH, since all pending requests have been successfully retired, that
      error code has been already ignored by intel_gt_retire_requests_timeout(),
      then we shouldn't fail.
      
      Assume no more time has been left on error and pass 0 timeout value to
      intel_uc_wait_for_idle() to give it a chance to return success if GuC is
      already idle.
      
      v3: Don't fail on any error passed back via remaining_timeout.
      
      v2: Fix the issue on the caller side, not the provider.
      
      Fixes: b97060a9 ("drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC")
      Signed-off-by: NJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
      Cc: stable@vger.kernel.org # v5.15+
      Reviewed-by: NAndrzej Hajda <andrzej.hajda@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221121145655.75141-2-janusz.krzysztofik@linux.intel.com
      (cherry picked from commit f235dbd5)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      6a534729
  4. 29 11月, 2022 1 次提交
    • J
      drm/i915: Fix negative value passed as remaining time · a8899b87
      Janusz Krzysztofik 提交于
      Commit b97060a9 ("drm/i915/guc: Update intel_gt_wait_for_idle to work
      with GuC") extended the API of intel_gt_retire_requests_timeout() with an
      extra argument 'remaining_timeout', intended for passing back unconsumed
      portion of requested timeout when 0 (success) is returned.  However, when
      request retirement happens to succeed despite an error returned by a call
      to dma_fence_wait_timeout(), that error code (a negative value) is passed
      back instead of remaining time.  If we then pass that negative value
      forward as requested timeout to intel_uc_wait_for_idle(), an explicit BUG
      will be triggered.
      
      If request retirement succeeds but an error code is passed back via
      remaininig_timeout, we may have no clue on how much of the initial timeout
      might have been left for spending it on waiting for GuC to become idle.
      OTOH, since all pending requests have been successfully retired, that
      error code has been already ignored by intel_gt_retire_requests_timeout(),
      then we shouldn't fail.
      
      Assume no more time has been left on error and pass 0 timeout value to
      intel_uc_wait_for_idle() to give it a chance to return success if GuC is
      already idle.
      
      v3: Don't fail on any error passed back via remaining_timeout.
      
      v2: Fix the issue on the caller side, not the provider.
      
      Fixes: b97060a9 ("drm/i915/guc: Update intel_gt_wait_for_idle to work with GuC")
      Signed-off-by: NJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
      Cc: stable@vger.kernel.org # v5.15+
      Reviewed-by: NAndrzej Hajda <andrzej.hajda@intel.com>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221121145655.75141-2-janusz.krzysztofik@linux.intel.com
      (cherry picked from commit f235dbd5)
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      a8899b87
  5. 24 11月, 2022 1 次提交
    • M
      drm/i915/gt: Manage uncore->lock while waiting on MCR register · 41f425ad
      Matt Roper 提交于
      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: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20221117173358.1980230-1-matthew.d.roper@intel.com
      (cherry picked from commit 192bb40f)
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      41f425ad
  6. 15 11月, 2022 1 次提交
  7. 11 11月, 2022 1 次提交
  8. 10 11月, 2022 1 次提交
  9. 31 10月, 2022 1 次提交
  10. 20 10月, 2022 1 次提交
  11. 18 10月, 2022 4 次提交
  12. 21 9月, 2022 1 次提交
  13. 16 9月, 2022 1 次提交
  14. 14 9月, 2022 2 次提交
  15. 12 9月, 2022 7 次提交
  16. 10 8月, 2022 1 次提交
  17. 09 8月, 2022 4 次提交
  18. 28 7月, 2022 4 次提交
  19. 13 7月, 2022 2 次提交
  20. 23 6月, 2022 1 次提交
  21. 17 6月, 2022 1 次提交
  22. 13 6月, 2022 1 次提交
  23. 09 6月, 2022 1 次提交
    • M
      drm/i915/pvc: Add register steering · e0d7371b
      Matt Roper 提交于
      Ponte Vecchio no longer has MSLICE or LNCF steering, but the bspec does
      document several new types of multicast register ranges.  Fortunately,
      most of the different MCR types all provide valid values at instance
      (0,0) so there's no need to read fuse registers and calculate a
      non-terminated instance.  We'll lump all of those range types (BSLICE,
      HALFBSLICE, TILEPSMI, CC, and L3BANK) into a single category called
      "INSTANCE0" to keep things simple.  We'll also perform explicit steering
      for each of these multicast register types, even if the implicit
      steering setup for COMPUTE/DSS ranges would have worked too; this is
      based on guidance from our hardware architects who suggested that we
      move away from implicit steering and start explicitly steer all MCR
      register accesses on modern platforms (we'll work on transitioning
      COMPUTE/DSS to explicit steering in the future).
      
      Note that there's one additional MCR range type defined in the bspec
      (SQIDI) that we don't handle here.  Those ranges use a different
      steering control register that we never touch; since instance 0 is also
      always a valid setting there, we can just ignore those ranges.
      
      Finally, we'll rename the HAS_MSLICES() macro to HAS_MSLICE_STEERING().
      PVC hardware still has units referred to as mslices, but there's no
      register steering based on mslice for this platform.
      
      v2:
       - Rebase on other recent changes
       - Swap two table rows to keep table sorted & easy to read.  (Harish)
      
      Bspec: 67609
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NHarish Chegondi <harish.chegondi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220608170700.4026648-1-matthew.d.roper@intel.com
      e0d7371b