diff options
author | Thomas Hellström <thomas.hellstrom@linux.intel.com> | 2023-09-08 12:17:11 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-21 19:41:06 +0300 |
commit | 08a4f00e62bc96eabf7d876933f84600a3dc5e69 (patch) | |
tree | 0a8b6e553f32f714620a2f72e05cfccc5a43a259 /drivers/gpu/drm/xe/tests | |
parent | 9fa81f914a1ce8ee7a5a0ce6f275a636a15bb109 (diff) | |
download | linux-08a4f00e62bc96eabf7d876933f84600a3dc5e69.tar.xz |
drm/xe/bo: Simplify xe_bo_lock()
xe_bo_lock() was, although it only grabbed a single lock, unnecessarily
using ttm_eu_reserve_buffers(). Simplify and document the interface.
v2:
- Update also the xe_display subsystem.
v4:
- Reinstate a lost dma_resv_reserve_fences().
- Improve on xe_bo_lock() documentation (Matthew Brost)
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-2-thomas.hellstrom@linux.intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/tests')
-rw-r--r-- | drivers/gpu/drm/xe/tests/xe_bo.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/gpu/drm/xe/tests/xe_bo.c b/drivers/gpu/drm/xe/tests/xe_bo.c index c448b00a569c..97788432a122 100644 --- a/drivers/gpu/drm/xe/tests/xe_bo.c +++ b/drivers/gpu/drm/xe/tests/xe_bo.c @@ -204,9 +204,9 @@ static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struc goto cleanup_bo; } - xe_bo_lock(external, &ww, 0, false); + xe_bo_lock(external, false); err = xe_bo_pin_external(external); - xe_bo_unlock(external, &ww); + xe_bo_unlock(external); if (err) { KUNIT_FAIL(test, "external bo pin err=%pe\n", ERR_PTR(err)); @@ -272,9 +272,9 @@ static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struc ERR_PTR(err)); goto cleanup_all; } - xe_bo_lock(external, &ww, 0, false); + xe_bo_lock(external, false); err = xe_bo_validate(external, NULL, false); - xe_bo_unlock(external, &ww); + xe_bo_unlock(external); if (err) { KUNIT_FAIL(test, "external bo valid err=%pe\n", ERR_PTR(err)); @@ -282,28 +282,28 @@ static int evict_test_run_tile(struct xe_device *xe, struct xe_tile *tile, struc } } - xe_bo_lock(external, &ww, 0, false); + xe_bo_lock(external, false); xe_bo_unpin_external(external); - xe_bo_unlock(external, &ww); + xe_bo_unlock(external); xe_bo_put(external); - xe_bo_lock(bo, &ww, 0, false); + xe_bo_lock(bo, false); __xe_bo_unset_bulk_move(bo); - xe_bo_unlock(bo, &ww); + xe_bo_unlock(bo); xe_bo_put(bo); continue; cleanup_all: - xe_bo_lock(external, &ww, 0, false); + xe_bo_lock(external, false); xe_bo_unpin_external(external); - xe_bo_unlock(external, &ww); + xe_bo_unlock(external); cleanup_external: xe_bo_put(external); cleanup_bo: - xe_bo_lock(bo, &ww, 0, false); + xe_bo_lock(bo, false); __xe_bo_unset_bulk_move(bo); - xe_bo_unlock(bo, &ww); + xe_bo_unlock(bo); xe_bo_put(bo); break; } |