[Mesa-dev] [PATCH 2/2] egl/dri2: platform_drm should also try render node first.
Haixia Shi
hshi at chromium.org
Tue Feb 17 18:08:19 PST 2015
Signed-off-by: Haixia Shi <hshi at chromium.org>
---
src/egl/drivers/dri2/platform_drm.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c
index 02e87f7..834387f 100644
--- a/src/egl/drivers/dri2/platform_drm.c
+++ b/src/egl/drivers/dri2/platform_drm.c
@@ -589,6 +589,8 @@ static struct dri2_egl_display_vtbl dri2_drm_display_vtbl = {
.get_sync_values = dri2_fallback_get_sync_values,
};
+#define DRM_RENDER_DEV_NAME "%s/renderD%d"
+
EGLBoolean
dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
{
@@ -608,7 +610,7 @@ dri2_initialize_drm(_EGLDriver *drv, _EGLDisplay *disp)
gbm = disp->PlatformDisplay;
if (gbm == NULL) {
char buf[64];
- int n = snprintf(buf, sizeof(buf), DRM_DEV_NAME, DRM_DIR_NAME, 0);
+ int n = snprintf(buf, sizeof(buf), DRM_RENDER_DEV_NAME, DRM_DIR_NAME, 128);
if (n != -1 && n < sizeof(buf))
fd = open(buf, O_RDWR);
if (fd < 0)
--
2.2.0.rc0.207.ga3a616c
More information about the mesa-dev
mailing list