mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
drm/ttm: remove no_gpu_wait param from ttm_bo_move_accel_cleanup
It isn't used and not waiting for the GPU after scheduling a move is actually quite dangerous. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
99c44632d4
commit
74561cd4f1
5 changed files with 3 additions and 9 deletions
|
@ -287,8 +287,7 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo,
|
||||||
new_mem->num_pages * PAGE_SIZE, /* bytes */
|
new_mem->num_pages * PAGE_SIZE, /* bytes */
|
||||||
bo->resv, &fence);
|
bo->resv, &fence);
|
||||||
/* FIXME: handle copy error */
|
/* FIXME: handle copy error */
|
||||||
r = ttm_bo_move_accel_cleanup(bo, fence,
|
r = ttm_bo_move_accel_cleanup(bo, fence, evict, new_mem);
|
||||||
evict, no_wait_gpu, new_mem);
|
|
||||||
fence_put(fence);
|
fence_put(fence);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1082,7 +1082,6 @@ nouveau_bo_move_m2mf(struct ttm_buffer_object *bo, int evict, bool intr,
|
||||||
ret = ttm_bo_move_accel_cleanup(bo,
|
ret = ttm_bo_move_accel_cleanup(bo,
|
||||||
&fence->base,
|
&fence->base,
|
||||||
evict,
|
evict,
|
||||||
no_wait_gpu,
|
|
||||||
new_mem);
|
new_mem);
|
||||||
nouveau_fence_unref(&fence);
|
nouveau_fence_unref(&fence);
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,8 +300,7 @@ static int radeon_move_blit(struct ttm_buffer_object *bo,
|
||||||
if (IS_ERR(fence))
|
if (IS_ERR(fence))
|
||||||
return PTR_ERR(fence);
|
return PTR_ERR(fence);
|
||||||
|
|
||||||
r = ttm_bo_move_accel_cleanup(bo, &fence->base,
|
r = ttm_bo_move_accel_cleanup(bo, &fence->base, evict, new_mem);
|
||||||
evict, no_wait_gpu, new_mem);
|
|
||||||
radeon_fence_unref(&fence);
|
radeon_fence_unref(&fence);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
|
@ -637,7 +637,6 @@ EXPORT_SYMBOL(ttm_bo_kunmap);
|
||||||
int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
|
int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
|
||||||
struct fence *fence,
|
struct fence *fence,
|
||||||
bool evict,
|
bool evict,
|
||||||
bool no_wait_gpu,
|
|
||||||
struct ttm_mem_reg *new_mem)
|
struct ttm_mem_reg *new_mem)
|
||||||
{
|
{
|
||||||
struct ttm_bo_device *bdev = bo->bdev;
|
struct ttm_bo_device *bdev = bo->bdev;
|
||||||
|
|
|
@ -1004,7 +1004,6 @@ extern void ttm_bo_free_old_node(struct ttm_buffer_object *bo);
|
||||||
* @bo: A pointer to a struct ttm_buffer_object.
|
* @bo: A pointer to a struct ttm_buffer_object.
|
||||||
* @fence: A fence object that signals when moving is complete.
|
* @fence: A fence object that signals when moving is complete.
|
||||||
* @evict: This is an evict move. Don't return until the buffer is idle.
|
* @evict: This is an evict move. Don't return until the buffer is idle.
|
||||||
* @no_wait_gpu: Return immediately if the GPU is busy.
|
|
||||||
* @new_mem: struct ttm_mem_reg indicating where to move.
|
* @new_mem: struct ttm_mem_reg indicating where to move.
|
||||||
*
|
*
|
||||||
* Accelerated move function to be called when an accelerated move
|
* Accelerated move function to be called when an accelerated move
|
||||||
|
@ -1016,8 +1015,7 @@ extern void ttm_bo_free_old_node(struct ttm_buffer_object *bo);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
|
extern int ttm_bo_move_accel_cleanup(struct ttm_buffer_object *bo,
|
||||||
struct fence *fence,
|
struct fence *fence, bool evict,
|
||||||
bool evict, bool no_wait_gpu,
|
|
||||||
struct ttm_mem_reg *new_mem);
|
struct ttm_mem_reg *new_mem);
|
||||||
/**
|
/**
|
||||||
* ttm_io_prot
|
* ttm_io_prot
|
||||||
|
|
Loading…
Add table
Reference in a new issue