1. 18 1月, 2022 1 次提交
  2. 11 1月, 2022 1 次提交
    • T
      drm/i915: Use vma resources for async unbinding · 2f6b90da
      Thomas Hellström 提交于
      Implement async (non-blocking) unbinding by not syncing the vma before
      calling unbind on the vma_resource.
      Add the resulting unbind fence to the object's dma_resv from where it is
      picked up by the ttm migration code.
      Ideally these unbind fences should be coalesced with the migration blit
      fence to avoid stalling the migration blit waiting for unbind, as they
      can certainly go on in parallel, but since we don't yet have a
      reasonable data structure to use to coalesce fences and attach the
      resulting fence to a timeline, we defer that for now.
      
      Note that with async unbinding, even while the unbind waits for the
      preceding bind to complete before unbinding, the vma itself might have been
      destroyed in the process, clearing the vma pages. Therefore we can
      only allow async unbinding if we have a refcounted sg-list and keep a
      refcount on that for the vma resource pages to stay intact until
      binding occurs. If this condition is not met, a request for an async
      unbind is diverted to a sync unbind.
      
      v2:
      - Use a separate kmem_cache for vma resources for now to isolate their
        memory allocation and aid debugging.
      - Move the check for vm closed to the actual unbinding thread. Regardless
        of whether the vm is closed, we need the unbind fence to properly wait
        for capture.
      - Clear vma_res::vm on unbind and update its documentation.
      v4:
      - Take cache coloring into account when searching for vma resources
        pending unbind. (Matthew Auld)
      v5:
      - Fix timeout and error check in i915_vma_resource_bind_dep_await().
      - Avoid taking a reference on the object for async binding if
        async unbind capable.
      - Fix braces around a single-line if statement.
      v6:
      - Fix up the cache coloring adjustment. (Kernel test robot <lkp@intel.com>)
      - Don't allow async unbinding if the vma_res pages are not the same as
        the object pages. (Matthew Auld)
      v7:
      - s/unsigned long/u64/ in a number of places (Matthew Auld)
      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/20220110172219.107131-5-thomas.hellstrom@linux.intel.com
      2f6b90da
  3. 06 1月, 2022 2 次提交
  4. 23 12月, 2021 1 次提交
  5. 20 12月, 2021 1 次提交
  6. 18 12月, 2021 3 次提交
  7. 13 12月, 2021 1 次提交
  8. 10 12月, 2021 1 次提交
  9. 09 12月, 2021 3 次提交
  10. 03 12月, 2021 8 次提交
  11. 01 12月, 2021 1 次提交
    • T
      drm/i915: Use per device iommu check · cca08469
      Tvrtko Ursulin 提交于
      With both integrated and discrete Intel GPUs in a system, the current
      global check of intel_iommu_gfx_mapped, as done from intel_vtd_active()
      may not be completely accurate.
      
      In this patch we add i915 parameter to intel_vtd_active() in order to
      prepare it for multiple GPUs and we also change the check away from Intel
      specific intel_iommu_gfx_mapped (global exported by the Intel IOMMU
      driver) to probing the presence of IOMMU on a specific device using
      device_iommu_mapped().
      
      This will return true both for IOMMU pass-through and address translation
      modes which matches the current behaviour. If in the future we wanted to
      distinguish between these two modes we could either use
      iommu_get_domain_for_dev() and check for __IOMMU_DOMAIN_PAGING bit
      indicating address translation, or ask for a new API to be exported from
      the IOMMU core code.
      
      v2:
        * Check for dmar translation specifically, not just iommu domain. (Baolu)
      
      v3:
       * Go back to plain "any domain" check for now, rewrite commit message.
      
      v4:
       * Use device_iommu_mapped. (Robin, Baolu)
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Lu Baolu <baolu.lu@linux.intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: Robin Murphy <robin.murphy@arm.com>
      Acked-by: NRobin Murphy <robin.murphy@arm.com>
      Reviewed-by: NLu Baolu <baolu.lu@linux.intel.com>
      Reviewed-by: NLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20211126141424.493753-1-tvrtko.ursulin@linux.intel.com
      cca08469
  12. 24 11月, 2021 1 次提交
  13. 23 11月, 2021 1 次提交
  14. 20 11月, 2021 2 次提交
  15. 19 11月, 2021 1 次提交
  16. 17 11月, 2021 1 次提交
  17. 16 11月, 2021 1 次提交
  18. 11 11月, 2021 2 次提交
  19. 05 11月, 2021 4 次提交
  20. 03 11月, 2021 3 次提交
  21. 29 10月, 2021 1 次提交