From: Gurchetan Singh Date: Tue, 21 Sep 2021 23:20:24 +0000 (-0700) Subject: drm/virtio: implement context init: advertise feature to userspace X-Git-Tag: v6.1-rc5~617^2^2~1292 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78aa20fa4381623cf59a85d053486f98784ca3a0;p=platform%2Fkernel%2Flinux-starfive.git drm/virtio: implement context init: advertise feature to userspace This advertises the context init feature to userspace, along with a mask of supported capabilities. Signed-off-by: Gurchetan Singh Acked-by: Lingfeng Yang Link: http://patchwork.freedesktop.org/patch/msgid/20210921232024.817-13-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann --- diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c index fdaa7f3..5618a1d 100644 --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c @@ -286,6 +286,12 @@ static int virtio_gpu_getparam_ioctl(struct drm_device *dev, void *data, case VIRTGPU_PARAM_CROSS_DEVICE: value = vgdev->has_resource_assign_uuid ? 1 : 0; break; + case VIRTGPU_PARAM_CONTEXT_INIT: + value = vgdev->has_context_init ? 1 : 0; + break; + case VIRTGPU_PARAM_SUPPORTED_CAPSET_IDs: + value = vgdev->capset_id_mask; + break; default: return -EINVAL; }