mirror_ubuntu-kernels/drivers/gpu/drm/i915/gem
Maarten Lankhorst b5cfe6f7a6 drm/i915: Remove short-term pins from execbuf, v6.
Add a flag PIN_VALIDATE, to indicate we don't need to pin and only
protected by the object lock.

This removes the need to unpin, which is done by just releasing the
lock.

eb_reserve is slightly reworked for readability, but the same steps
are still done:
- First pass pins with NONBLOCK.
- Second pass unbinds all objects first, then pins.
- Third pass is only called when not all objects are softpinned, and
  unbinds all objects, then calls i915_gem_evict_vm(), then pins.

Changes since v1:
- Split out eb_reserve() into separate functions for readability.
Changes since v2:
- Make batch buffer mappable on platforms where only GGTT is available,
  to prevent moving the batch buffer during relocations.
Changes since v3:
- Preserve current behavior for batch buffer, instead be cautious when
  calling i915_gem_object_ggtt_pin_ww, and re-use the current batch vma
  if it's inside ggtt and map-and-fenceable.
- Remove impossible condition check from eb_reserve. (Matt)
Changes since v5:
- Do not even temporarily pin, just call i915_gem_evict_vm() and mark
  all vma's as unpinned.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220114132320.109030-7-maarten.lankhorst@linux.intel.com
2022-01-18 12:19:30 +01:00
..
selftests drm/i915: Add i915_vma_unbind_unlocked, and take obj lock for i915_vma_unbind, v2. 2022-01-18 12:19:29 +01:00
i915_gem_busy.c drm/i915: use the new iterator in i915_gem_busy_ioctl v2 2021-11-17 14:23:09 +01:00
i915_gem_clflush.c drm/i915: stop setting cache_dirty on discrete 2021-11-02 09:44:10 +00:00
i915_gem_clflush.h
i915_gem_context_types.h drm/i915/guc: Connect UAPI to GuC multi-lrc interface 2021-10-15 10:45:50 -07:00
i915_gem_context.c Merge drm/drm-next into drm-intel-gt-next 2022-01-18 10:54:02 +00:00
i915_gem_context.h drm/i915/gem: Use to_gt() helper for GGTT accesses 2022-01-05 10:43:36 -08:00
i915_gem_create.c drm/i915/gem: Use to_gt() helper 2021-12-17 21:50:32 -08:00
i915_gem_dmabuf.c Revert "drm/i915/dmabuf: fix broken build" 2021-11-24 09:22:53 +00:00
i915_gem_domain.c drm/i915: stop setting cache_dirty on discrete 2021-11-02 09:44:10 +00:00
i915_gem_execbuffer.c drm/i915: Remove short-term pins from execbuf, v6. 2022-01-18 12:19:30 +01:00
i915_gem_internal.c drm/i915: Create a dummy object for gen6 ppgtt 2021-11-19 17:38:03 +00:00
i915_gem_ioctls.h drm/i915/uapi: introduce drm_i915_gem_create_ext 2021-05-04 10:58:56 +01:00
i915_gem_lmem.c drm/i915/gem: Fix a lockdep warning the __i915_gem_is_lmem() function 2021-09-24 08:17:39 +02:00
i915_gem_lmem.h drm/i915/guc: put all guc objects in lmem when available 2021-09-20 12:35:41 -07:00
i915_gem_mman.c drm/i915: Add locking to i915_gem_evict_vm(), v3. 2022-01-18 12:00:30 +01:00
i915_gem_mman.h
i915_gem_object_types.h drm/i915: Use the vma resource as argument for gtt binding / unbinding 2022-01-11 10:53:14 +01:00
i915_gem_object.c drm/i915: Asynchronous migration selftest 2022-01-11 10:54:11 +01:00
i915_gem_object.h drm/i915: Asynchronous migration selftest 2022-01-11 10:54:11 +01:00
i915_gem_pages.c drm/i915: don't call free_mmap_offset when purging 2022-01-10 13:54:57 +00:00
i915_gem_phys.c drm/i915/gem: Use to_gt() helper 2021-12-17 21:50:32 -08:00
i915_gem_pm.c drm/i915/gem: Use to_gt() helper for GGTT accesses 2022-01-05 10:43:36 -08:00
i915_gem_pm.h drm/i915 Implement LMEM backup and restore for suspend / resume 2021-09-24 08:19:11 +02:00
i915_gem_region.c drm/i915/ttm: Drop region reference counting 2021-11-25 09:36:16 +01:00
i915_gem_region.h drm/i915/gem: Implement a function to process all gem objects of a region 2021-09-24 08:19:09 +02:00
i915_gem_shmem.c drm/i915: clean up shrinker_release_pages 2022-01-10 10:49:50 +00:00
i915_gem_shrinker.c drm/i915: clean up shrinker_release_pages 2022-01-10 10:49:50 +00:00
i915_gem_shrinker.h drm/i915: Finally remove obj->mm.lock. 2021-03-24 17:47:20 +01:00
i915_gem_stolen.c drm/i915/gem: Use to_gt() helper for GGTT accesses 2022-01-05 10:43:36 -08:00
i915_gem_stolen.h drm/i915/ttm Initialize the ttm device and memory managers 2021-06-02 13:21:24 +01:00
i915_gem_throttle.c drm/i915/gem: Use to_gt() helper 2021-12-17 21:50:32 -08:00
i915_gem_tiling.c drm/i915/gem: Use to_gt() helper for GGTT accesses 2022-01-05 10:43:36 -08:00
i915_gem_ttm_move.c drm/i915: Use vma resources for async unbinding 2022-01-11 10:54:11 +01:00
i915_gem_ttm_move.h drm/i915: Break out the i915_deps utility 2021-12-22 08:52:57 +01:00
i915_gem_ttm_pm.c drm/i915/ttm: Update i915_gem_obj_copy_ttm() to be asynchronous 2021-11-25 09:36:20 +01:00
i915_gem_ttm_pm.h drm/i915 Implement LMEM backup and restore for suspend / resume 2021-09-24 08:19:11 +02:00
i915_gem_ttm.c drm/i915/ttm: ensure we unmap when purging 2022-01-10 14:00:47 +00:00
i915_gem_ttm.h drm/i915/ttm: Implement asynchronous TTM moves 2021-11-25 09:36:19 +01:00
i915_gem_userptr.c drm/i915/gem: Use to_gt() helper 2021-12-17 21:50:32 -08:00
i915_gem_wait.c drm/i915: Remove dma_resv_prune 2021-11-30 15:59:17 +01:00
i915_gemfs.c drm/i915: Use per device iommu check 2021-12-01 09:21:47 +00:00
i915_gemfs.h