From 75371d2c8845c09e77b97dc91bbd536ccc0eb3ab Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 29 Jan 2019 19:33:38 +0100 Subject: Require libdrm >= 2.4.95 --- backend/drm/renderer.c | 4 ---- include/wlr/render/dmabuf.h | 9 --------- meson.build | 2 +- render/gles2/texture.c | 7 ++----- types/meson.build | 8 +++++++- types/wlr_linux_dmabuf_v1.c | 1 + 6 files changed, 11 insertions(+), 20 deletions(-) diff --git a/backend/drm/renderer.c b/backend/drm/renderer.c index fa235af9..b77a7ce0 100644 --- a/backend/drm/renderer.c +++ b/backend/drm/renderer.c @@ -14,10 +14,6 @@ #include "backend/drm/drm.h" #include "glapi.h" -#ifndef DRM_FORMAT_MOD_LINEAR -#define DRM_FORMAT_MOD_LINEAR 0 -#endif - bool init_drm_renderer(struct wlr_drm_backend *drm, struct wlr_drm_renderer *renderer, wlr_renderer_create_func_t create_renderer_func) { renderer->gbm = gbm_create_device(drm->fd); diff --git a/include/wlr/render/dmabuf.h b/include/wlr/render/dmabuf.h index 32cfe874..1d61da4e 100644 --- a/include/wlr/render/dmabuf.h +++ b/include/wlr/render/dmabuf.h @@ -11,15 +11,6 @@ #include -// So we don't have to pull in linux specific drm headers -#ifndef DRM_FORMAT_MOD_INVALID -#define DRM_FORMAT_MOD_INVALID ((1ULL<<56) - 1) -#endif - -#ifndef DRM_FORMAT_MOD_LINEAR -#define DRM_FORMAT_MOD_LINEAR 0 -#endif - #define WLR_DMABUF_MAX_PLANES 4 enum wlr_dmabuf_attributes_flags { diff --git a/meson.build b/meson.build index c917f6cc..a53f46eb 100644 --- a/meson.build +++ b/meson.build @@ -56,7 +56,7 @@ wayland_egl = dependency('wayland-egl') wayland_protos = dependency('wayland-protocols', version: '>=1.16') egl = dependency('egl') glesv2 = dependency('glesv2') -drm = dependency('libdrm') +drm = dependency('libdrm', version: '>=2.4.95') gbm = dependency('gbm', version: '>=17.1.0') libinput = dependency('libinput', version: '>=1.7.0') xkbcommon = dependency('xkbcommon') diff --git a/render/gles2/texture.c b/render/gles2/texture.c index d035841e..5f982e2c 100644 --- a/render/gles2/texture.c +++ b/render/gles2/texture.c @@ -1,13 +1,14 @@ #include +#include #include #include #include #include #include #include -#include #include #include +#include #include #include #include "glapi.h" @@ -239,10 +240,6 @@ struct wlr_texture *wlr_gles2_texture_from_wl_drm(struct wlr_egl *egl, return &texture->wlr_texture; } -#ifndef DRM_FORMAT_BIG_ENDIAN -#define DRM_FORMAT_BIG_ENDIAN 0x80000000 -#endif - struct wlr_texture *wlr_gles2_texture_from_dmabuf(struct wlr_egl *egl, struct wlr_dmabuf_attributes *attribs) { if (!wlr_egl_is_current(egl)) { diff --git a/types/meson.build b/types/meson.build index d459c1e4..f2e41b58 100644 --- a/types/meson.build +++ b/types/meson.build @@ -70,5 +70,11 @@ lib_wlr_types = static_library( 'wlr_xdg_output_v1.c', ), include_directories: wlr_inc, - dependencies: [pixman, xkbcommon, wayland_server, wlr_protos, libinput], + dependencies: [ + drm.partial_dependency(compile_args: true), # + pixman, + wayland_server, + wlr_protos, + xkbcommon, + ], ) diff --git a/types/wlr_linux_dmabuf_v1.c b/types/wlr_linux_dmabuf_v1.c index eb7b2f9e..179602e1 100644 --- a/types/wlr_linux_dmabuf_v1.c +++ b/types/wlr_linux_dmabuf_v1.c @@ -1,5 +1,6 @@ #define _POSIX_C_SOURCE 200809L #include +#include #include #include #include -- cgit v1.2.3