aboutsummaryrefslogtreecommitdiff
path: root/render/allocator
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-08-23 15:57:03 +0200
committerSimon Ser <contact@emersion.fr>2023-10-06 09:10:31 +0000
commit0b15b4a6ae6654f838ee38ce4d8862a600136c87 (patch)
treeda8fc9c78e10bf583ef0e70b39a53de0b0d4428b /render/allocator
parentdb7751f39ee58aff43ba9c63a70b4104ea7bed14 (diff)
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.
Diffstat (limited to 'render/allocator')
-rw-r--r--render/allocator/allocator.c6
1 files changed, 4 insertions, 2 deletions
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)) {