Skip to content

Commit

Permalink
drm/xe: Pipeline evict / restore of pinned BOs during suspend / resume
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Matthew Brost <[email protected]>
Reviewed-by: Matthew Auld <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
mbrost05 committed Mar 5, 2024
1 parent 5c9da9f commit 198bc28
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions drivers/gpu/drm/xe/xe_bo.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,6 @@ static int xe_bo_move(struct ttm_buffer_object *ttm_bo, bool evict,
* @bo: The buffer object to move.
*
* 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
* suspend-resume.
Expand Down Expand Up @@ -873,9 +872,6 @@ int xe_bo_evict_pinned(struct xe_bo *bo)
if (ret)
goto err_res_free;

dma_resv_wait_timeout(bo->ttm.base.resv, DMA_RESV_USAGE_KERNEL,
false, MAX_SCHEDULE_TIMEOUT);

return 0;

err_res_free:
Expand All @@ -888,7 +884,6 @@ int xe_bo_evict_pinned(struct xe_bo *bo)
* @bo: The buffer object to move.
*
* 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
* suspend-resume.
Expand Down Expand Up @@ -930,9 +925,6 @@ int xe_bo_restore_pinned(struct xe_bo *bo)
if (ret)
goto err_res_free;

dma_resv_wait_timeout(bo->ttm.base.resv, DMA_RESV_USAGE_KERNEL,
false, MAX_SCHEDULE_TIMEOUT);

return 0;

err_res_free:
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/xe/xe_bo_evict.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ int xe_bo_restore_user(struct xe_device *xe)
list_splice_tail(&still_in_list, &xe->pinned.external_vram);
spin_unlock(&xe->pinned.lock);

/* Wait for validate to complete */
/* Wait for restore to complete */
for_each_tile(tile, xe, id)
xe_tile_migrate_wait(tile);

Expand Down

0 comments on commit 198bc28

Please sign in to comment.