From 0b15b4a6ae6654f838ee38ce4d8862a600136c87 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 23 Aug 2023 15:57:03 +0200 Subject: render/allocator: log message when GBM is disabled When the backend and renderer would need GBM but it's disabled at compile-time, log a message to make this situation easier to debug. --- render/allocator/allocator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'render/allocator') diff --git a/render/allocator/allocator.c b/render/allocator/allocator.c index 2b7da4f1..f71902f2 100644 --- a/render/allocator/allocator.c +++ b/render/allocator/allocator.c @@ -100,10 +100,10 @@ struct wlr_allocator *allocator_autocreate_with_drm_fd( struct wlr_allocator *alloc = NULL; -#if WLR_HAS_GBM_ALLOCATOR uint32_t gbm_caps = WLR_BUFFER_CAP_DMABUF; if ((backend_caps & gbm_caps) && (renderer_caps & gbm_caps) && drm_fd >= 0) { +#if WLR_HAS_GBM_ALLOCATOR wlr_log(WLR_DEBUG, "Trying to create gbm allocator"); int gbm_fd = reopen_drm_node(drm_fd, true); if (gbm_fd < 0) { @@ -114,8 +114,10 @@ struct wlr_allocator *allocator_autocreate_with_drm_fd( } close(gbm_fd); wlr_log(WLR_DEBUG, "Failed to create gbm allocator"); - } +#else + wlr_log(WLR_DEBUG, "Skipping gbm allocator: disabled at compile-time"); #endif + } uint32_t shm_caps = WLR_BUFFER_CAP_SHM | WLR_BUFFER_CAP_DATA_PTR; if ((backend_caps & shm_caps) && (renderer_caps & shm_caps)) { -- cgit v1.2.3