diff options
author | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2023-09-08 11:17:13 +0200 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 11:41:07 -0500 |
commit | b7ab8c4f028f87b8c79c9f99e12b891fd5430483 (patch) | |
tree | 2340366ea28a938b605a20b01c4eac81fead5e29 /drivers/gpu/drm/xe/xe_bo.h | |
parent | d00e9cc28e1e42108618e7a146969a26679170a2 (diff) |
drm/xe/bo: Remove the lock_no_vm()/unlock_no_vm() interface
Apart from asserts, it's essentially the same as
xe_bo_lock()/xe_bo_unlock(), and the usage intentions of this interface
was unclear. Remove it.
v2:
- Update the xe_display subsystem as well.
Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230908091716.36984-4-thomas.hellstrom@linux.intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/xe_bo.h')
-rw-r--r-- | drivers/gpu/drm/xe/xe_bo.h | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/drivers/gpu/drm/xe/xe_bo.h b/drivers/gpu/drm/xe/xe_bo.h index c06dafcc93ec..d22b2ae7db72 100644 --- a/drivers/gpu/drm/xe/xe_bo.h +++ b/drivers/gpu/drm/xe/xe_bo.h @@ -173,25 +173,6 @@ static inline void xe_bo_unlock_vm_held(struct xe_bo *bo) } } -static inline void xe_bo_lock_no_vm(struct xe_bo *bo, - struct ww_acquire_ctx *ctx) -{ - if (bo) { - XE_WARN_ON(bo->vm || (bo->ttm.type != ttm_bo_type_sg && - bo->ttm.base.resv != &bo->ttm.base._resv)); - dma_resv_lock(bo->ttm.base.resv, ctx); - } -} - -static inline void xe_bo_unlock_no_vm(struct xe_bo *bo) -{ - if (bo) { - XE_WARN_ON(bo->vm || (bo->ttm.type != ttm_bo_type_sg && - bo->ttm.base.resv != &bo->ttm.base._resv)); - dma_resv_unlock(bo->ttm.base.resv); - } -} - int xe_bo_pin_external(struct xe_bo *bo); int xe_bo_pin(struct xe_bo *bo); void xe_bo_unpin_external(struct xe_bo *bo); @@ -206,9 +187,9 @@ static inline bool xe_bo_is_pinned(struct xe_bo *bo) static inline void xe_bo_unpin_map_no_vm(struct xe_bo *bo) { if (likely(bo)) { - xe_bo_lock_no_vm(bo, NULL); + xe_bo_lock(bo, false); xe_bo_unpin(bo); - xe_bo_unlock_no_vm(bo); + xe_bo_unlock(bo); xe_bo_put(bo); } |