1. 18 Jun, 2021 4 commits
    • Thomas Hellström's avatar
      drm/i915/ttm: Fix incorrect assumptions about ttm_bo_validate() semantics · b07a6483
      Thomas Hellström authored
      We have assumed that if the current placement was not the requested
      placement, but instead one of the busy placements, a TTM move would have
      been triggered. That is not the case.
      
      So when we initially place LMEM objects in "Limbo", (that is system
      placement without any pages allocated), to be able to defer clearing
      objects until first get_pages(), the first get_pages() would happily keep
      objects in system memory if that is one of the allowed placements. And
      since we don't yet support i915 GEM system memory from TTM, everything
      breaks apart.
      
      So make sure we try the requested placement first, if no eviction is
      needed. If that fails, retry with all allowed placements also allowing
      evictions. Also make sure we handle TTM failure codes correctly.
      
      Also temporarily (until we support i915 GEM system on TTM), restrict
      allowed placements to the requested placement to avoid things falling
      apart should LMEM be full.
      
      Fixes: 38f28c06 ("drm/i915/ttm: Calculate the object placement at get_pages time")
      Signed-off-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
      Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210618132515.163277-1-thomas.hellstrom@linux.intel.com
      b07a6483
    • Matt Roper's avatar
      drm/i915: Add support for explicit L3BANK steering · 31939274
      Matt Roper authored
      Because Render Power Gating restricts us to just a single subslice as a
      valid steering target for reads of multicast registers in a SUBSLICE
      range, the default steering we setup at init may not lead to a suitable
      target for L3BANK multicast register.  In cases where it does not, use
      explicit runtime steering whenever an L3BANK multicast register is read.
      
      While we're at it, let's simplify the function a little bit and drop its
      support for gen10/CNL since no such platforms ever materialized for real
      use.  Multicast register steering is already an area that causes enough
      confusion; no need to complicate it with what's effectively dead code.
      
      v2:
       - Use gt->uncore instead of gt->i915->uncore.  (Tvrtko)
       - Use {} as table terminator.  (Rodrigo)
      
      v3:
       - L3bank fuse register is a disable mask rather than an enable mask.
         We need to invert it before use.  (CI)
      
      v4:
       - L3bank ID goes in the subslice field, not the slice field.  (CI)
      
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210617211425.1943662-4-matthew.d.roper@intel.com
      31939274
    • Matt Roper's avatar
      drm/i915: Add GT support for multiple types of multicast steering · 0957e931
      Matt Roper authored
      Although most of our multicast registers are replicated per-subslice, we
      also have a small number of multicast registers that are replicated
      per-l3 bank instead.  For both types of multicast registers we need to
      make sure we steer reads of these registers to a valid instance.
      Ideally we'd like to find a specific instance ID that would steer reads
      of either type of multicast register to a valid instance (i.e., not
      fused off and not powered down), but sometimes the combination of
      part-specific fusing and the additional restrictions imposed by Render
      Power Gating make it impossible to find any overlap between the set of
      valid subslices and valid l3 banks.  This problem will become even more
      noticeable on our upcoming platforms since they will be adding
      additional types of multicast registers with new types of replication
      and rules for finding valid instances for reads.
      
      To handle this we'll continue to pick a suitable subslice instance at
      driver startup and program this as the default (sliceid,subsliceid)
      setting in the steering control register (0xFDC).  In cases where we
      need to read another type of multicast GT register, but the default
      subslice steering would not correspond to a valid instance, we'll
      explicitly re-steer the single read to a valid value, perform the read,
      and then reset the steering to it's "subslice" default.
      
      This patch adds the general functionality to prepare for this explicit
      steering of other multicast register types.  We'll plug L3 bank steering
      into this in the next patch, and then add additional types of multicast
      registers when the support for our next upcoming platform arrives.
      
      v2:
       - Use entry->end==0 as table terminator.  (Rodrigo)
       - Grab forcewake in wa_list_verify() now that we're using accessors
         that assume forcewake is already held.
      
      v3:
       - Fix loop condition when iterating over steering range tables.
         (Rodrigo)
      
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210617211425.1943662-3-matthew.d.roper@intel.com
      0957e931
    • Daniele Ceraolo Spurio's avatar
      drm/i915: extract steered reg access to common function · 932641f0
      Daniele Ceraolo Spurio authored
      New steering cases will be added in the follow-up patches, so prepare a
      common helper to avoid code duplication.
      
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210617211425.1943662-2-matthew.d.roper@intel.com
      932641f0
  2. 17 Jun, 2021 16 commits
  3. 16 Jun, 2021 8 commits
  4. 15 Jun, 2021 1 commit
  5. 14 Jun, 2021 4 commits
  6. 11 Jun, 2021 7 commits