diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-08-29 15:20:25 +0300 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-09-05 09:26:25 +0300 |
commit | b3f13ec958a77497da76cc7a89d60b741b79ba22 (patch) | |
tree | 9412c1aa79cf9e54deabf35fc2dd00e898ad0632 /drivers/gpu/drm/virtio/virtgpu_ttm.c | |
parent | 6c19787e10b1bb99abbc3d257156c22bea5ca5b1 (diff) | |
download | linux-b3f13ec958a77497da76cc7a89d60b741b79ba22.tar.xz |
drm/virtio: add virtio_gpu_object_detach() function
The new function balances virtio_gpu_object_attach().
Also make virtio_gpu_cmd_resource_inval_backing() static and switch
call sites to the new virtio_gpu_object_attach() function.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20180829122026.27012-2-kraxel@redhat.com
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_ttm.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_ttm.c b/drivers/gpu/drm/virtio/virtgpu_ttm.c index b6f021c0da5c..e3152d45c5f1 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ttm.c +++ b/drivers/gpu/drm/virtio/virtgpu_ttm.c @@ -343,8 +343,7 @@ static void virtio_gpu_bo_move_notify(struct ttm_buffer_object *tbo, if (!new_mem || (new_mem->placement & TTM_PL_FLAG_SYSTEM)) { if (bo->hw_res_handle) - virtio_gpu_cmd_resource_inval_backing(vgdev, - bo->hw_res_handle); + virtio_gpu_object_detach(vgdev, bo); } else if (new_mem->placement & TTM_PL_FLAG_TT) { if (bo->hw_res_handle) { |