drop MOD_INVALID, MOD_LINEAR definitions

MOD_INVALID came with libdrm 2.4.83 and MOD_LINEAR came with libdrm
2.4.82. libweston unconditionally depends on libdrm >= 2.4.95, so the
fallback is not necessary.

Since linux-dmabuf.h itself has no use for these and also forgets to
include drm_fourcc.h, .c files including drm_fourcc.h after this header
would trigger compiler warnings.

linux-dmabuf.c does need these, so add the proper include.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 4 years ago
parent e51a75c7b3
commit b9ca801324
  1. 4
      clients/simple-dmabuf-egl.c
  2. 4
      libweston/backend-drm/kms.c
  3. 2
      libweston/linux-dmabuf.c
  4. 6
      libweston/linux-dmabuf.h

@ -60,10 +60,6 @@
#include "shared/weston-egl-ext.h" #include "shared/weston-egl-ext.h"
#ifndef DRM_FORMAT_MOD_INVALID
#define DRM_FORMAT_MOD_INVALID ((1ULL << 56) - 1)
#endif
/* Possible options that affect the displayed image */ /* Possible options that affect the displayed image */
#define OPT_IMMEDIATE (1 << 0) /* create wl_buffer immediately */ #define OPT_IMMEDIATE (1 << 0) /* create wl_buffer immediately */
#define OPT_IMPLICIT_SYNC (1 << 1) /* force implicit sync */ #define OPT_IMPLICIT_SYNC (1 << 1) /* force implicit sync */

@ -42,10 +42,6 @@
#include "pixel-formats.h" #include "pixel-formats.h"
#include "presentation-time-server-protocol.h" #include "presentation-time-server-protocol.h"
#ifndef DRM_FORMAT_MOD_LINEAR
#define DRM_FORMAT_MOD_LINEAR 0
#endif
struct drm_property_enum_info plane_type_enums[] = { struct drm_property_enum_info plane_type_enums[] = {
[WDRM_PLANE_TYPE_PRIMARY] = { [WDRM_PLANE_TYPE_PRIMARY] = {
.name = "Primary", .name = "Primary",

@ -30,6 +30,8 @@
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include <drm_fourcc.h>
#include <libweston/libweston.h> #include <libweston/libweston.h>
#include "linux-dmabuf.h" #include "linux-dmabuf.h"
#include "linux-dmabuf-unstable-v1-server-protocol.h" #include "linux-dmabuf-unstable-v1-server-protocol.h"

@ -29,12 +29,6 @@
#include <stdint.h> #include <stdint.h>
#define MAX_DMABUF_PLANES 4 #define MAX_DMABUF_PLANES 4
#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
struct linux_dmabuf_buffer; struct linux_dmabuf_buffer;
typedef void (*dmabuf_user_data_destroy_func)( typedef void (*dmabuf_user_data_destroy_func)(

Loading…
Cancel
Save