diff options
author | Simon Zeni <simon@bl4ckb0ne.ca> | 2021-04-15 14:32:13 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2021-04-28 20:55:57 +0200 |
commit | c75aa71816826907805606a108626b4671120a7e (patch) | |
tree | 471aa3d45646e571555829a88bd506d0cfc09e2a /render | |
parent | 3a04fb4560cf60c34bd968fe711a45d42993e5a4 (diff) |
render/gbm_allocator: make wlr_gbm_allocator_create return a wlr_allocator
Diffstat (limited to 'render')
-rw-r--r-- | render/gbm_allocator.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/render/gbm_allocator.c b/render/gbm_allocator.c index da71cbaf..33fbf954 100644 --- a/render/gbm_allocator.c +++ b/render/gbm_allocator.c @@ -159,7 +159,7 @@ static struct wlr_gbm_allocator *get_gbm_alloc_from_alloc( return (struct wlr_gbm_allocator *)alloc; } -struct wlr_gbm_allocator *wlr_gbm_allocator_create(int fd) { +struct wlr_allocator *wlr_gbm_allocator_create(int fd) { uint64_t cap; if (drmGetCap(fd, DRM_CAP_PRIME, &cap) || !(cap & DRM_PRIME_CAP_EXPORT)) { @@ -185,8 +185,11 @@ struct wlr_gbm_allocator *wlr_gbm_allocator_create(int fd) { wlr_log(WLR_DEBUG, "Created GBM allocator with backend %s", gbm_device_get_backend_name(alloc->gbm_device)); + char *drm_name = drmGetDeviceNameFromFd2(fd); + wlr_log(WLR_DEBUG, "Using DRM node %s", drm_name); + free(drm_name); - return alloc; + return &alloc->base; } static void allocator_destroy(struct wlr_allocator *wlr_alloc) { |