[PATCH] drm/virtio: Add capset definitions

Dmitry Osipenko dmitry.osipenko at collabora.com
Thu Mar 27 00:36:24 UTC 2025


On 3/25/25 18:42, Aaron Ruby wrote:
> From 73e0b6fb04d90b70de1f40e8e2ffc8fe497fa204 Mon Sep 17 00:00:00 2001
> From: Aaron Ruby <aruby at qnx.com>
> Date: Mon, 24 Mar 2025 16:18:43 -0400
> Subject: [PATCH] drm/virtio: Add capset definitions
> 
> Since the context-type additions to the virtio-gpu spec, these have been
> defined locally in guest user-space, and virtio-gpu backend library code.
> 
> Now, these capsets have been stabilized, and should be defined in
> a common space, in both the virtio_gpu header, and alongside the virtgpu_drm
> interface that they apply to.
> ---
>  include/uapi/drm/virtgpu_drm.h  | 6 ++++++
>  include/uapi/linux/virtio_gpu.h | 3 ++-
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/include/uapi/drm/virtgpu_drm.h b/include/uapi/drm/virtgpu_drm.h
> index c2ce71987e9b..9debb320c34b 100644
> --- a/include/uapi/drm/virtgpu_drm.h
> +++ b/include/uapi/drm/virtgpu_drm.h
> @@ -163,6 +163,12 @@ struct drm_virtgpu_3d_wait {
>          __u32 flags;
>  };
>  
> +#define VIRTGPU_DRM_CAPSET_VIRGL 1
> +#define VIRTGPU_DRM_CAPSET_VIRGL2 2
> +#define VIRTGPU_DRM_CAPSET_GFXSTREAM_VULKAN 3
> +#define VIRTGPU_DRM_CAPSET_VENUS 4
> +#define VIRTGPU_DRM_CAPSET_CROSS_DOMAIN 5
> +#define VIRTGPU_DRM_CAPSET_DRM 6
>  struct drm_virtgpu_get_caps {
>          __u32 cap_set_id;
>          __u32 cap_set_ver;
> diff --git a/include/uapi/linux/virtio_gpu.h b/include/uapi/linux/virtio_gpu.h
> index bf2c9cabd207..be109777d10d 100644
> --- a/include/uapi/linux/virtio_gpu.h
> +++ b/include/uapi/linux/virtio_gpu.h
> @@ -309,8 +309,9 @@ struct virtio_gpu_cmd_submit {
>  
>  #define VIRTIO_GPU_CAPSET_VIRGL 1
>  #define VIRTIO_GPU_CAPSET_VIRGL2 2
> -/* 3 is reserved for gfxstream */
> +#define VIRTIO_GPU_CAPSET_GFXSTREAM_VULKAN 3
>  #define VIRTIO_GPU_CAPSET_VENUS 4
> +#define VIRTIO_GPU_CAPSET_CROSS_DOMAIN 5
>  #define VIRTIO_GPU_CAPSET_DRM 6
>  
>  /* VIRTIO_GPU_CMD_GET_CAPSET_INFO */
> --
> 2.25.1
> 
> ----------------------------------------------------------------------
> This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

Your patch is corrupted by your mail client or provider, please fix it.

Please also follow the patch submission guild [1] and add your
signed-off-by to the patch.

[1] https://www.kernel.org/doc/html/latest/process/submitting-patches.html

-- 
Best regards,
Dmitry



More information about the dri-devel mailing list