mirror of
https://github.com/torvalds/linux.git
synced 2026-04-27 02:52:27 -04:00
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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user