summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/radeon/radeon_ttm.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-04-26 17:31:14 +0300
committerAlex Deucher <alexander.deucher@amd.com>2017-12-06 20:48:03 +0300
commit2823f4f019d888472c7032ab7d7bc1c98df3c071 (patch)
tree3e3a916c0a5266d13527356cf34a77a927ae2d82 /drivers/gpu/drm/radeon/radeon_ttm.c
parent83876c1bed8c91ed21a00bc929247d7427d9dde8 (diff)
downloadlinux-2823f4f019d888472c7032ab7d7bc1c98df3c071.tar.xz
drm/ttm: add context to driver move callback as well
Instead of passing the parameters manually. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@amd.com> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de> Tested-by: Michel Dänzer <michel.daenzer@amd.com> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_ttm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_ttm.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_ttm.c b/drivers/gpu/drm/radeon/radeon_ttm.c
index ef7cb83331b3..98e30d71d9e0 100644
--- a/drivers/gpu/drm/radeon/radeon_ttm.c
+++ b/drivers/gpu/drm/radeon/radeon_ttm.c
@@ -393,17 +393,16 @@ out_cleanup:
return r;
}
-static int radeon_bo_move(struct ttm_buffer_object *bo,
- bool evict, bool interruptible,
- bool no_wait_gpu,
- struct ttm_mem_reg *new_mem)
+static int radeon_bo_move(struct ttm_buffer_object *bo, bool evict,
+ struct ttm_operation_ctx *ctx,
+ struct ttm_mem_reg *new_mem)
{
struct radeon_device *rdev;
struct radeon_bo *rbo;
struct ttm_mem_reg *old_mem = &bo->mem;
int r;
- r = ttm_bo_wait(bo, interruptible, no_wait_gpu);
+ r = ttm_bo_wait(bo, ctx->interruptible, ctx->no_wait_gpu);
if (r)
return r;
@@ -433,19 +432,21 @@ static int radeon_bo_move(struct ttm_buffer_object *bo,
if (old_mem->mem_type == TTM_PL_VRAM &&
new_mem->mem_type == TTM_PL_SYSTEM) {
- r = radeon_move_vram_ram(bo, evict, interruptible,
- no_wait_gpu, new_mem);
+ r = radeon_move_vram_ram(bo, evict, ctx->interruptible,
+ ctx->no_wait_gpu, new_mem);
} else if (old_mem->mem_type == TTM_PL_SYSTEM &&
new_mem->mem_type == TTM_PL_VRAM) {
- r = radeon_move_ram_vram(bo, evict, interruptible,
- no_wait_gpu, new_mem);
+ r = radeon_move_ram_vram(bo, evict, ctx->interruptible,
+ ctx->no_wait_gpu, new_mem);
} else {
- r = radeon_move_blit(bo, evict, no_wait_gpu, new_mem, old_mem);
+ r = radeon_move_blit(bo, evict, ctx->no_wait_gpu,
+ new_mem, old_mem);
}
if (r) {
memcpy:
- r = ttm_bo_move_memcpy(bo, interruptible, no_wait_gpu, new_mem);
+ r = ttm_bo_move_memcpy(bo, ctx->interruptible,
+ ctx->no_wait_gpu, new_mem);
if (r) {
return r;
}