Re: [PATCH] drm: Return -ENOTSUPP in drm_setclientcap() when driver do not support KMS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting José Roberto de Souza (2018-09-13 23:13:41)
> All DRM_CLIENT capabilities are tied to KMS support, so returning
> -ENOTSUPP when KMS is not supported.

The posix errno is ENOTSUP (ENOTSUPP is internal). Now since we have no
ENOTSUP in the uapi, I've switched to using EOPNOTSUP as that is
documented to have the same value as ENOTSUP under Linux. (At least
until somebody decided to make ENOTSUP unique.)

> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> Signed-off-by: José Roberto de Souza <jose.souza@xxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_ioctl.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
> index 6b4a633b4240..842423fe9762 100644
> --- a/drivers/gpu/drm/drm_ioctl.c
> +++ b/drivers/gpu/drm/drm_ioctl.c
> @@ -306,6 +306,9 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv)
>  {
>         struct drm_set_client_cap *req = data;
>  
> +       if (!drm_core_check_feature(dev, DRIVER_MODESET))
> +               return -ENOTSUPP;

The wider question though is client cap restricted to modesetting
capabilities? Or should each case include a check like
DRM_CLIENT_CAP_ATOMIC.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux