[PATCH RFC v2 5/5] drm/virtio: add VIRTGPU_PARAM_HOST_SHM_PAGE_SIZE to params
Dmitry Osipenko
dmitry.osipenko at collabora.com
Fri Feb 14 17:13:12 UTC 2025
On 2/14/25 18:16, Sergio Lopez wrote:
> diff --git a/drivers/gpu/drm/virtio/virtgpu_ioctl.c b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
> index c33c057365f85a2ace536f91655c903036827312..4b49635b4fe1d4256f219823341cef8e5fa8f029 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_ioctl.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_ioctl.c
> @@ -117,6 +117,11 @@ static int virtio_gpu_getparam_ioctl(struct drm_device *dev, void *data,
> case VIRTGPU_PARAM_EXPLICIT_DEBUG_NAME:
> value = vgdev->has_context_init ? 1 : 0;
> break;
> + case VIRTGPU_PARAM_HOST_SHM_PAGE_SIZE:
> + if (!vgdev->has_host_visible)
> + return -EINVAL;
Nit: virtio_gpu_getparam_ioctl() returns EINVAL for unsupported params.
While this is a supported param, but there is no hostmem available.
Hence, should a different error code, maybe ENOENT or ENXIO.
--
Best regards,
Dmitry
More information about the dri-devel
mailing list