summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/virtio/virtgpu_ttm.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-06-06 10:17:53 +0200
committerAlex Deucher <alexander.deucher@amd.com>2016-07-07 14:54:35 -0400
commit88932a7be27d892aef21ff05428a55fefa091716 (patch)
treef7d422b1a2a541f6e5d9879c0106033b39ad730b /drivers/gpu/drm/virtio/virtgpu_ttm.c
parent1888577807ea4e7593d27582b02c5b4126a9a642 (diff)
downloadlinux-88932a7be27d892aef21ff05428a55fefa091716.tar.bz2
drm/ttm: add wait for idle in all drivers bo_move functions
Wait for idle before moving the BO in all drivers implementing an accelerated move function. This should keep the current behavior when removing the pre move wait. 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>
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_ttm.c')
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_ttm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_ttm.c b/drivers/gpu/drm/virtio/virtgpu_ttm.c
index a0580815629f..80482ac5f95d 100644
--- a/drivers/gpu/drm/virtio/virtgpu_ttm.c
+++ b/drivers/gpu/drm/virtio/virtgpu_ttm.c
@@ -375,6 +375,12 @@ static int virtio_gpu_bo_move(struct ttm_buffer_object *bo,
bool no_wait_gpu,
struct ttm_mem_reg *new_mem)
{
+ int ret;
+
+ ret = ttm_bo_wait(bo, interruptible, no_wait_gpu);
+ if (ret)
+ return ret;
+
virtio_gpu_move_null(bo, new_mem);
return 0;
}