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:
Gerd Hoffmann
2018-08-29 14:20:25 +02:00
parent 6c19787e10
commit b3f13ec958
4 changed files with 12 additions and 7 deletions

View File

@@ -291,7 +291,7 @@ static int virtio_gpufb_create(struct drm_fb_helper *helper,
return 0;
err_fb_alloc:
virtio_gpu_cmd_resource_inval_backing(vgdev, resid);
virtio_gpu_object_detach(vgdev, obj);
err_obj_attach:
err_obj_vmap:
virtio_gpu_gem_free_object(&obj->gem_base);