On Thursday, 2017-08-24 14:52:14 -0400, Adam Jackson wrote:
> The snprintf stuff here already constructs the right name for the device
> node, and if it doesn't, you configured Mesa wrong, don't do that.

Very good point.
Reviewed-by: Eric Engestrom <[email protected]>

> 
> Signed-off-by: Adam Jackson <[email protected]>
> ---
>  src/egl/drivers/dri2/platform_drm.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/src/egl/drivers/dri2/platform_drm.c 
> b/src/egl/drivers/dri2/platform_drm.c
> index 259b1cd519..0ccbd9a30a 100644
> --- a/src/egl/drivers/dri2/platform_drm.c
> +++ b/src/egl/drivers/dri2/platform_drm.c
> @@ -667,8 +667,6 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
>        int n = snprintf(buf, sizeof(buf), DRM_DEV_NAME, DRM_DIR_NAME, 0);
>        if (n != -1 && n < sizeof(buf))
>           dri2_dpy->fd = loader_open_device(buf);
> -      if (dri2_dpy->fd < 0)
> -         dri2_dpy->fd = loader_open_device("/dev/dri/card0");
>        gbm = gbm_create_device(dri2_dpy->fd);
>        if (gbm == NULL) {
>           err = "DRI2: failed to create gbm device";
> -- 
> 2.13.5
> 
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to