diff options
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_gem.c')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_gem.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c index 0a2b62279647..f0d5a8974677 100644 --- a/drivers/gpu/drm/virtio/virtgpu_gem.c +++ b/drivers/gpu/drm/virtio/virtgpu_gem.c @@ -39,6 +39,9 @@ int virtio_gpu_gem_create(struct drm_file *file, int ret; u32 handle; + if (vgdev->has_virgl_3d) + virtio_gpu_create_context(dev, file); + ret = virtio_gpu_object_create(vgdev, params, &obj, NULL); if (ret < 0) return ret; @@ -123,6 +126,7 @@ int virtio_gpu_gem_object_open(struct drm_gem_object *obj, virtio_gpu_cmd_context_attach_resource(vgdev, vfpriv->ctx_id, objs); + virtio_gpu_notify(vgdev); return 0; } @@ -143,6 +147,7 @@ void virtio_gpu_gem_object_close(struct drm_gem_object *obj, virtio_gpu_cmd_context_detach_resource(vgdev, vfpriv->ctx_id, objs); + virtio_gpu_notify(vgdev); } struct virtio_gpu_object_array *virtio_gpu_array_alloc(u32 nents) |