1. 13 6月, 2022 1 次提交
  2. 30 4月, 2022 1 次提交
  3. 22 4月, 2022 1 次提交
  4. 07 4月, 2022 1 次提交
  5. 21 3月, 2022 3 次提交
  6. 18 3月, 2022 1 次提交
    • J
      drm/i915/guc: Add fetch of hwconfig blob · 8781f051
      John Harrison 提交于
      Implement support for fetching the hardware description table from the
      GuC. The call is made twice - once without a destination buffer to
      query the size and then a second time to fill in the buffer.
      
      The table is stored in the GT structure so that it can be fetched once
      at driver load time. Keeping inside a GuC structure would mean it
      would be release and reloaded on a GuC reset (part of a full GT
      reset). However, the table does not change just because the GT has been
      reset and the GuC reloaded. Also, dynamic memory allocations inside
      the reset path are a problem.
      
      Note that the table is only available on ADL-P and later platforms.
      
      v2 (John's v2 patch):
       * Move to GT level to avoid memory allocation during reset path (and
         unnecessary re-read of the table on a reset).
      
      v5 (of Jordan's posting):
       * Various changes made by Jordan and recommended by Michal
         - Makefile ordering
         - Adjust "struct intel_guc_hwconfig hwconfig" comment
         - Set Copyright year to 2022 in intel_guc_hwconfig.c/.h
         - Drop inline from hwconfig_to_guc()
         - Replace hwconfig param with guc in __guc_action_get_hwconfig()
         - Move zero size check into guc_hwconfig_discover_size()
         - Change comment to say zero size offset/size is needed to get size
         - Add has_guc_hwconfig to devinfo and drop has_table()
         - Change drm_err to notice in __uc_init_hw() and use %pe
      
      v6 (of Jordan's posting):
       * Added a couple more small changes recommended by Michal
       * Merge in John's v2 patch, but note:
         - Using drm_notice as recommended by Michal
         - Reverted Michal's suggestion of using devinfo
      
      v7 (of Jordan's posting):
       * Change back to drm_err as preferred by John
      
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NMatthew Brost <matthew.brost@intel.com>
      Acked-by: NJon Bloomfield <jon.bloomfield@intel.com>
      Signed-off-by: NJordan Justen <jordan.l.justen@intel.com>
      Reviewed-by: NMichal Wajdeczko <michal.wajdeczko@intel.com>
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220306232157.1174335-2-jordan.l.justen@intel.com
      8781f051
  7. 16 3月, 2022 2 次提交
  8. 28 2月, 2022 1 次提交
  9. 20 2月, 2022 1 次提交
  10. 19 2月, 2022 1 次提交
  11. 11 2月, 2022 1 次提交
  12. 02 2月, 2022 2 次提交
  13. 26 1月, 2022 1 次提交
    • T
      drm/i915: Flush TLBs before releasing backing store · 7938d615
      Tvrtko Ursulin 提交于
      We need to flush TLBs before releasing backing store otherwise userspace
      is able to encounter stale entries if a) it is not declaring access to
      certain buffers and b) it races with the backing store release from a
      such undeclared execution already executing on the GPU in parallel.
      
      The approach taken is to mark any buffer objects which were ever bound
      to the GPU and to trigger a serialized TLB flush when their backing
      store is released.
      
      Alternatively the flushing could be done on VMA unbind, at which point
      we would be able to ascertain whether there is potential a parallel GPU
      execution (which could race), but essentially it boils down to paying
      the cost of TLB flushes potentially needlessly at VMA unbind time (when
      the backing store is not known to be going away so not needed for
      safety), versus potentially needlessly at backing store relase time
      (since we at that point cannot tell whether there is anything executing
      on the GPU which uses that object).
      
      Thereforce simplicity of implementation has been chosen for now with
      scope to benchmark and refine later as required.
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reported-by: NSushma Venkatesh Reddy <sushma.venkatesh.reddy@intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Acked-by: NDave Airlie <airlied@redhat.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jon Bloomfield <jon.bloomfield@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      7938d615
  14. 12 1月, 2022 1 次提交
  15. 06 1月, 2022 1 次提交
  16. 18 12月, 2021 1 次提交
  17. 16 11月, 2021 1 次提交
  18. 05 10月, 2021 1 次提交
  19. 25 9月, 2021 1 次提交
    • J
      drm/i915: Flush buffer pools on driver remove · 74af1e2c
      Janusz Krzysztofik 提交于
      We currently do an explicit flush of the buffer pools within the call path
      of drm_driver.release(); this removes all buffers, regardless of their age,
      freeing the buffers' associated resources (objects, address space areas).
      However there is other code that runs within the drm_driver.release() call
      chain that expects objects and their associated address space areas have
      already been flushed.
      
      Since buffer pools auto-flush old buffers once per second in a worker
      thread, there's a small window where if we remove the driver while there
      are still objects in buffers with an age of less than one second, the
      assumptions of the other release code may be violated.
      
      By moving the flush to driver remove (which executes earlier via the
      pci_driver.remove() flow) we're ensuring that all buffers are flushed and
      their associated objects freed before some other code in
      pci_driver.remove() flushes those objects so they are released before
      _any_ code in drm_driver.release() that check completness of those
      flushes executes.
      
      v2: Reword commit description as suggested by Matt.
      Signed-off-by: NJanusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210924163825.634606-1-janusz.krzysztofik@linux.intel.com
      74af1e2c
  20. 24 9月, 2021 1 次提交
    • T
      drm/i915: Reduce the number of objects subject to memcpy recover · a259cc14
      Thomas Hellström 提交于
      We really only need memcpy restore for objects that affect the
      operability of the migrate context. That is, primarily the page-table
      objects of the migrate VM.
      
      Add an object flag, I915_BO_ALLOC_PM_EARLY for objects that need early
      restores using memcpy and a way to assign LMEM page-table object flags
      to be used by the vms.
      
      Restore objects without this flag with the gpu blitter and only objects
      carrying the flag using TTM memcpy.
      
      Initially mark the migrate, gt, gtt and vgpu vms to use this flag, and
      defer for a later audit which vms actually need it. Most importantly, user-
      allocated vms with pinned page-table objects can be restored using the
      blitter.
      
      Performance-wise memcpy restore is probably as fast as gpu restore if not
      faster, but using gpu restore will help tackling future restrictions in
      mappable LMEM size.
      
      v4:
      - Don't mark the aliasing ppgtt page table flags for early resume, but
        rather the ggtt page table flags as intended. (Matthew Auld)
      - The check for user buffer objects during early resume is pointless, since
        they are never marked I915_BO_ALLOC_PM_EARLY. (Matthew Auld)
      v5:
      - Mark GuC LMEM objects with I915_BO_ALLOC_PM_EARLY to have them restored
        before we fire up the migrate context.
      
      Cc: Matthew Brost <matthew.brost@intel.com>
      Signed-off-by: NThomas Hellström <thomas.hellstrom@linux.intel.com>
      Reviewed-by: NMatthew Auld <matthew.auld@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210922062527.865433-8-thomas.hellstrom@linux.intel.com
      a259cc14
  21. 20 9月, 2021 2 次提交
  22. 19 9月, 2021 1 次提交
  23. 15 9月, 2021 1 次提交
  24. 03 9月, 2021 1 次提交
  25. 05 8月, 2021 3 次提交
  26. 04 8月, 2021 1 次提交
  27. 28 7月, 2021 1 次提交
  28. 23 7月, 2021 2 次提交
  29. 18 6月, 2021 2 次提交
    • M
      drm/i915: Add support for explicit L3BANK steering · 31939274
      Matt Roper 提交于
      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: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210617211425.1943662-4-matthew.d.roper@intel.com
      31939274
    • M
      drm/i915: Add GT support for multiple types of multicast steering · 0957e931
      Matt Roper 提交于
      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: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210617211425.1943662-3-matthew.d.roper@intel.com
      0957e931
  30. 17 6月, 2021 1 次提交
  31. 06 6月, 2021 1 次提交