diff options
author | Gurchetan Singh <gurchetansingh@chromium.org> | 2020-09-23 17:32:14 -0700 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-09-29 11:23:57 +0200 |
commit | 378f257d583072b3a6ae0a2fa73fbd6497686dac (patch) | |
tree | 2ba8d4532333bf027e9142a510f98c682eae6c69 /drivers/gpu/drm | |
parent | 897b4d1acaf56314652c6a8e75d9f86b5e45638d (diff) | |
download | linux-378f257d583072b3a6ae0a2fa73fbd6497686dac.tar.bz2 |
drm/virtio: advertise features to userspace
New api changes are now available to userspace. Also, the
comparison to true is redundant, so remove it.
Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
Acked-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20200924003214.662-19-gurchetansingh@chromium.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/virtio/virtgpu_ioctl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index 3ede098c1d28..5417f365d1a3 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -212,11 +212,20 @@ static int virtio_gpu_getparam_ioctl(struct drm_device *dev, void *data, switch (param->param) { case VIRTGPU_PARAM_3D_FEATURES: - value = vgdev->has_virgl_3d == true ? 1 : 0; + value = vgdev->has_virgl_3d ? 1 : 0; break; case VIRTGPU_PARAM_CAPSET_QUERY_FIX: value = 1; break; + case VIRTGPU_PARAM_RESOURCE_BLOB: + value = vgdev->has_resource_blob ? 1 : 0; + break; + case VIRTGPU_PARAM_HOST_VISIBLE: + value = vgdev->has_host_visible ? 1 : 0; + break; + case VIRTGPU_PARAM_CROSS_DEVICE: + value = vgdev->has_resource_assign_uuid ? 1 : 0; + break; default: return -EINVAL; } |