[PATCH 24/24] drm/virtio: advertise features to userspace
Gurchetan Singh
gurchetansingh at chromium.org
Fri Aug 14 02:40:00 UTC 2020
New api changes are now available to userspace.
Signed-off-by: Gurchetan Singh <gurchetansingh at chromium.org>
Acked-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
---
drivers/gpu/drm/virtio/virtgpu_ioctl.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
index 47ac32b7031a..f3737dc0f8ea 100644
--- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
+++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
@@ -216,6 +216,15 @@ static int virtio_gpu_getparam_ioctl(struct drm_device *dev, void *data,
case VIRTGPU_PARAM_CAPSET_QUERY_FIX:
value = 1;
break;
+ case VIRTGPU_PARAM_RESOURCE_BLOB:
+ value = vgdev->has_resource_blob == true ? 1 : 0;
+ break;
+ case VIRTGPU_PARAM_HOST_VISIBLE:
+ value = vgdev->has_host_visible == true ? 1 : 0;
+ break;
+ case VIRTGPU_PARAM_CROSS_DEVICE:
+ value = vgdev->has_resource_assign_uuid == true ? 1 : 0;
+ break;
default:
return -EINVAL;
}
--
2.24.1
More information about the dri-devel
mailing list