Re: [PATCH libdrm] xf86drm: test for render nodes before primary nodes

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

 



On Monday, 2019-05-13 02:50:49 +1000, Jonathan Gray wrote:
> Unlike Linux the OpenBSD primary "drm" device name is substring of the
> "drmR" render node device name and strncmp() tests resulted in render
> nodes being flagged as primary nodes.
> 
> Signed-off-by: Jonathan Gray <jsg@xxxxxxxxx>

Reviewed-by: Eric Engestrom <eric.engestrom@xxxxxxxxx>
and pushed!
Sorry it got forgotten for so long.

> ---
>  xf86drm.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/xf86drm.c b/xf86drm.c
> index 2858d826..42022cac 100644
> --- a/xf86drm.c
> +++ b/xf86drm.c
> @@ -3168,10 +3168,6 @@ drm_public int drmDevicesEqual(drmDevicePtr a, drmDevicePtr b)
>  
>  static int drmGetNodeType(const char *name)
>  {
> -    if (strncmp(name, DRM_PRIMARY_MINOR_NAME,
> -        sizeof(DRM_PRIMARY_MINOR_NAME) - 1) == 0)
> -        return DRM_NODE_PRIMARY;
> -
>      if (strncmp(name, DRM_CONTROL_MINOR_NAME,
>          sizeof(DRM_CONTROL_MINOR_NAME ) - 1) == 0)
>          return DRM_NODE_CONTROL;
> @@ -3180,6 +3176,10 @@ static int drmGetNodeType(const char *name)
>          sizeof(DRM_RENDER_MINOR_NAME) - 1) == 0)
>          return DRM_NODE_RENDER;
>  
> +    if (strncmp(name, DRM_PRIMARY_MINOR_NAME,
> +        sizeof(DRM_PRIMARY_MINOR_NAME) - 1) == 0)
> +        return DRM_NODE_PRIMARY;
> +
>      return -EINVAL;
>  }
>  
> -- 
> 2.21.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux