aboutsummaryrefslogtreecommitdiffstats
path: root/src/egl/drivers/dri2
diff options
context:
space:
mode:
authorAdam Jackson <[email protected]>2017-08-24 14:52:14 -0400
committerAdam Jackson <[email protected]>2017-08-25 16:21:43 -0400
commitcd8ab40cd4a047ec64f59ff078b6558b1dab44a5 (patch)
treec0238f67b9360726500b4e1f22400e1f148fec56 /src/egl/drivers/dri2
parente8378adc01a8cbb08e057fb2b50a9e2f8d95b36f (diff)
egl/drm: Don't "fall back" to /dev/dri/card0 if the first open fails
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. Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/egl/drivers/dri2')
-rw-r--r--src/egl/drivers/dri2/platform_drm.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index 259b1cd5194..0ccbd9a30a0 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";