From e90b5385a0374f3f4ff39a68b646171565c430b3 Mon Sep 17 00:00:00 2001 From: Leandro Ribeiro Date: Mon, 4 Sep 2023 13:32:57 -0300 Subject: [PATCH] egl: move is_render_node flag to platform_wayland This flag is being used only by platform_wayland. So move it to be included by the #ifdef HAVE_WAYLAND_PLATFORM in struct dri2_egl_display. Signed-off-by: Leandro Ribeiro Reviewed-by: Erik Faye-Lund Reviewed-by: Simon Ser Part-of: --- src/egl/drivers/dri2/egl_dri2.h | 3 +-- src/egl/drivers/dri2/platform_drm.c | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/egl/drivers/dri2/egl_dri2.h b/src/egl/drivers/dri2/egl_dri2.h index ec6ca6c6e9c..8b2f88b8390 100644 --- a/src/egl/drivers/dri2/egl_dri2.h +++ b/src/egl/drivers/dri2/egl_dri2.h @@ -307,6 +307,7 @@ struct dri2_egl_display { bool authenticated; uint32_t capabilities; char *device_name; + bool is_render_node; #endif #ifdef HAVE_ANDROID_PLATFORM @@ -314,8 +315,6 @@ struct dri2_egl_display { /* gralloc vendor usage bit for front rendering */ uint32_t front_rendering_usage; #endif - - bool is_render_node; }; struct dri2_egl_context { diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index d8941063fee..7b56a9a37ab 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -632,8 +632,6 @@ dri2_initialize_drm(_EGLDisplay *disp) disp->Device = dev; dri2_dpy->driver_name = strdup(dri2_dpy->gbm_dri->driver_name); - dri2_dpy->is_render_node = - drmGetNodeTypeFromFd(dri2_dpy->fd_render_gpu) == DRM_NODE_RENDER; if (!dri2_load_driver_dri3(disp)) { err = "DRI3: failed to load driver";