Skip to content
Snippets Groups Projects
Commit a7a8b5e7 authored by Dmitry Osipenko's avatar Dmitry Osipenko
Browse files

virtio-gpu: Don't require udmabuf when blob support is enabled


Host blobs don't need udmabuf, it's only needed by guest blobs. The host
blobs are utilized by the Mesa virgl driver when persistent memory mapping
is needed by a GL buffer, otherwise virgl driver doesn't use blobs.
Persistent mapping support bumps GL version from 4.3 to 4.5 in guest.
Relax the udmabuf requirement.

Signed-off-by: default avatarDmitry Osipenko <dmitry.osipenko@collabora.com>
parent f473264e
No related branches found
No related tags found
No related merge requests found
...@@ -366,7 +366,9 @@ static void virtio_gpu_resource_create_blob(VirtIOGPU *g, ...@@ -366,7 +366,9 @@ static void virtio_gpu_resource_create_blob(VirtIOGPU *g,
return; return;
} }
if (cblob.blob_mem == VIRTIO_GPU_BLOB_MEM_GUEST) {
virtio_gpu_init_udmabuf(res); virtio_gpu_init_udmabuf(res);
}
QTAILQ_INSERT_HEAD(&g->reslist, res, next); QTAILQ_INSERT_HEAD(&g->reslist, res, next);
} }
...@@ -1311,13 +1313,6 @@ void virtio_gpu_device_realize(DeviceState *qdev, Error **errp) ...@@ -1311,13 +1313,6 @@ void virtio_gpu_device_realize(DeviceState *qdev, Error **errp)
VirtIODevice *vdev = VIRTIO_DEVICE(qdev); VirtIODevice *vdev = VIRTIO_DEVICE(qdev);
VirtIOGPU *g = VIRTIO_GPU(qdev); VirtIOGPU *g = VIRTIO_GPU(qdev);
if (virtio_gpu_blob_enabled(g->parent_obj.conf)) {
if (!virtio_gpu_have_udmabuf()) {
error_setg(errp, "cannot enable blob resources without udmabuf");
return;
}
}
if (!virtio_gpu_base_device_realize(qdev, if (!virtio_gpu_base_device_realize(qdev,
virtio_gpu_handle_ctrl_cb, virtio_gpu_handle_ctrl_cb,
virtio_gpu_handle_cursor_cb, virtio_gpu_handle_cursor_cb,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment