1. 19 Sep, 2022 2 commits
    • Janusz Krzysztofik's avatar
      drm/i915/gem: Flush contexts on driver release · 1cec3444
      Janusz Krzysztofik authored
      Due to i915_perf assuming that it can use the i915_gem_context reference
      to protect its i915->gem.contexts.list iteration, we need to defer removal
      of the context from the list until last reference to the context is put.
      However, there is a risk of triggering kernel warning on contexts list not
      empty at driver release time if we deleagate that task to a worker for
      i915_gem_context_release_work(), unless that work is flushed first.
      Unfortunately, it is not flushed on driver release.  Fix it.
      
      Instead of additionally calling flush_workqueue(), either directly or via
      a new dedicated wrapper around it, replace last call to
      i915_gem_drain_freed_objects() with existing i915_gem_drain_workqueue()
      that performs both tasks.
      
      Fixes: 75eefd82 ("drm/i915: Release i915_gem_context from a worker")
      Suggested-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
      Reviewed-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Cc: stable@kernel.org # v5.16+
      Signed-off-by: default avatarAndi Shyti <andi.shyti@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220916092403.201355-2-janusz.krzysztofik@linux.intel.com
      1cec3444
    • Matt Roper's avatar
      drm/i915/mtl: Add MTL forcewake support · 14f2f9bf
      Matt Roper authored
      MTL has separate forcewake tables for the primary/render GT and the
      media GT; each GT's intel_uncore will use a separate forcewake table and
      should only initialize the domains that are relevant to that GT.  The GT
      ack register also moves to a new location of (GSI base + 0xDFC) on this
      platform.
      
      Note that although our uncore handlers take care of transparently
      redirecting all register accesses in the media GT's GSI range to their
      new offset at 0x380000, the forcewake ranges listed in the table should
      use the final, post-translation offsets.
      
      NOTE:  There are two ranges in the media IP that have multicast
      registers where the two register instances reside in different power
      wells (either VD0 or VD2).  We don't have an easy way to deal with this
      today (and in fact we don't even access these register ranges in the
      driver today), so for now we just mark those ranges as FORCEWAKE_ALL
      which will cause all of the media power wells to be grabbed, ensuring
      proper operation.  If we start reading/writing in those ranges in the
      future, we can re-visit whether it's worth adding extra steering
      complexity into our forcewake support.
      
      Bspec: 67788, 67789, 52077
      Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarHarish Chegondi <harish.chegondi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220910001631.1986601-1-matthew.d.roper@intel.com
      14f2f9bf
  2. 16 Sep, 2022 9 commits
  3. 15 Sep, 2022 3 commits
  4. 14 Sep, 2022 7 commits
  5. 13 Sep, 2022 2 commits
  6. 12 Sep, 2022 17 commits