Commit 198bc28d authored by Matthew Brost's avatar Matthew Brost

drm/xe: Pipeline evict / restore of pinned BOs during suspend / resume

Rather than waiting for each evict / restore of pinned BOs to complete
just wait on migrate exec queue to be idle once during suspend / resume.

Cc: Matthew Auld <matthew.auld@intel.com>
Signed-off-by: default avatarMatthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240305173503.285223-1-matthew.brost@intel.com
parent 5c9da9fc
...@@ -816,7 +816,6 @@ static int xe_bo_move(struct ttm_buffer_object *ttm_bo, bool evict, ...@@ -816,7 +816,6 @@ static int xe_bo_move(struct ttm_buffer_object *ttm_bo, bool evict,
* @bo: The buffer object to move. * @bo: The buffer object to move.
* *
* On successful completion, the object memory will be moved to sytem memory. * On successful completion, the object memory will be moved to sytem memory.
* This function blocks until the object has been fully moved.
* *
* This is needed to for special handling of pinned VRAM object during * This is needed to for special handling of pinned VRAM object during
* suspend-resume. * suspend-resume.
...@@ -873,9 +872,6 @@ int xe_bo_evict_pinned(struct xe_bo *bo) ...@@ -873,9 +872,6 @@ int xe_bo_evict_pinned(struct xe_bo *bo)
if (ret) if (ret)
goto err_res_free; goto err_res_free;
dma_resv_wait_timeout(bo->ttm.base.resv, DMA_RESV_USAGE_KERNEL,
false, MAX_SCHEDULE_TIMEOUT);
return 0; return 0;
err_res_free: err_res_free:
...@@ -888,7 +884,6 @@ int xe_bo_evict_pinned(struct xe_bo *bo) ...@@ -888,7 +884,6 @@ int xe_bo_evict_pinned(struct xe_bo *bo)
* @bo: The buffer object to move. * @bo: The buffer object to move.
* *
* On successful completion, the object memory will be moved back to VRAM. * On successful completion, the object memory will be moved back to VRAM.
* This function blocks until the object has been fully moved.
* *
* This is needed to for special handling of pinned VRAM object during * This is needed to for special handling of pinned VRAM object during
* suspend-resume. * suspend-resume.
...@@ -930,9 +925,6 @@ int xe_bo_restore_pinned(struct xe_bo *bo) ...@@ -930,9 +925,6 @@ int xe_bo_restore_pinned(struct xe_bo *bo)
if (ret) if (ret)
goto err_res_free; goto err_res_free;
dma_resv_wait_timeout(bo->ttm.base.resv, DMA_RESV_USAGE_KERNEL,
false, MAX_SCHEDULE_TIMEOUT);
return 0; return 0;
err_res_free: err_res_free:
......
...@@ -220,7 +220,7 @@ int xe_bo_restore_user(struct xe_device *xe) ...@@ -220,7 +220,7 @@ int xe_bo_restore_user(struct xe_device *xe)
list_splice_tail(&still_in_list, &xe->pinned.external_vram); list_splice_tail(&still_in_list, &xe->pinned.external_vram);
spin_unlock(&xe->pinned.lock); spin_unlock(&xe->pinned.lock);
/* Wait for validate to complete */ /* Wait for restore to complete */
for_each_tile(tile, xe, id) for_each_tile(tile, xe, id)
xe_tile_migrate_wait(tile); xe_tile_migrate_wait(tile);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment