1. 30 Aug, 2024 9 commits
  2. 29 Aug, 2024 5 commits
  3. 28 Aug, 2024 8 commits
  4. 27 Aug, 2024 5 commits
  5. 26 Aug, 2024 1 commit
  6. 24 Aug, 2024 1 commit
  7. 23 Aug, 2024 9 commits
  8. 22 Aug, 2024 2 commits
    • Rodrigo Vivi's avatar
      drm/xe: Fix missing runtime outer protection for ggtt_remove_node · 919bb54e
      Rodrigo Vivi authored
      Defer the ggtt node removal to a thread if runtime_pm is not active.
      
      The ggtt node removal can be called from multiple places, including
      places where we cannot protect with outer callers and places we are
      within other locks. So, try to grab the runtime reference if the
      device is already active, otherwise defer the removal to a separate
      thread from where we are sure we can wake the device up.
      
      v2: - use xe wq instead of system wq (Matt and CI)
          - Avoid GFP_KERNEL to be future proof since this removal can
          be called from outside our drivers and we don't want to block
          if atomic is needed. (Brost)
      v3: amend forgot chunk declaring xe_device.
      v4: Use a xe_ggtt_region to encapsulate the node and remova info,
          wihtout the need for any memory allocation at runtime.
      v5: Actually fill the delayed_removal.invalidate (Brost)
      v6: - Ensure that ggtt_region is not freed before work finishes (Auld)
          - Own wq to ensures that the queued works are flushed before
            ggtt_fini (Brost)
      v7: also free ggtt_region on early !bound return (Auld)
      v8: Address the null deref (CI)
      v9: Based on the new xe_ggtt_node for the proper care of the lifetime
          of the object.
      v10: Redo the lost v5 change. (Brost)
      v11: Simplify the invalidate_on_remove (Lucas)
      
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Francois Dugast <francois.dugast@intel.com>
      Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
      Cc: Matthew Brost <matthew.brost@intel.com>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240821193842.352557-12-rodrigo.vivi@intel.comSigned-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      919bb54e
    • Rodrigo Vivi's avatar
      drm/xe: Make xe_ggtt_node struct independent · 34e80422
      Rodrigo Vivi authored
      In some rare cases, the drm_mm node cannot be removed synchronously
      due to runtime PM conditions. In this situation, the node removal will
      be delegated to a workqueue that will be able to wake up the device
      before removing the node.
      
      However, in this situation, the lifetime of the xe_ggtt_node cannot
      be restricted to the lifetime of the parent object. So, this patch
      introduces the infrastructure so the xe_ggtt_node struct can be
      allocated in advance and freed when needed.
      
      By having the ggtt backpointer, it also ensure that the init function
      is always called before any attempt to insert or reserve the node
      in the GGTT.
      
      v2: s/xe_ggtt_node_force_fini/xe_ggtt_node_fini and use it
          internaly (Brost)
      v3: - Use GF_NOFS for node allocation (CI)
          - Avoid ggtt argument, now that we have it inside the node (Lucas)
          - Fix some missed fini cases (CI)
      v4: - Fix SRIOV critical case where config->ggtt_region was
            lost (Michal)
          - Avoid ggtt argument also on removal (missed case on v3) (Michal)
          - Remove useless checks (Michal)
          - Return 0 instead of negative errno on a u32 addr. (Michal)
          - s/xe_ggtt_assign/xe_ggtt_node_assign for coherence, while we
            are touching it (Michal)
      v5: - Fix VFs' ggtt_balloon
      
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
      Cc: Matthew Brost <matthew.brost@intel.com>
      Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20240821193842.352557-11-rodrigo.vivi@intel.comSigned-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      34e80422