Provide a more meaningful name, considering what it does.
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
xf86drmSL.c \
xf86drmMode.c \
xf86atomic.h \
- libdrm.h \
+ libdrm_macros.h \
libdrm_lists.h
LIBDRM_H_FILES := \
#include <xf86drm.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "exynos_drm.h"
#include "exynos_drmif.h"
#include <xf86drm.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "exynos_drm.h"
#include "fimg2d_reg.h"
#include "exynos_fimg2d.h"
#include <stdio.h>
#include <assert.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "xf86drm.h"
#include "xf86atomic.h"
#include <drm.h>
#include <i915_drm.h>
#include <pciaccess.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "intel_bufmgr.h"
#include "intel_bufmgr_priv.h"
#include "xf86drm.h"
#include "drm.h"
#include "i915_drm.h"
#include "mm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "libdrm_lists.h"
/* Support gcc's __FUNCTION__ for people using other compilers */
#ifndef ETIME
#define ETIME ETIMEDOUT
#endif
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "libdrm_lists.h"
#include "intel_bufmgr.h"
#include "intel_bufmgr_priv.h"
#include <stdarg.h>
#include <string.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "xf86drm.h"
#include "intel_chipset.h"
#include "intel_bufmgr.h"
#include <assert.h>
#include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "mm.h"
drm_private void mmDumpMemInfo(const struct mem_block *heap)
#include "config.h"
#endif
-#include "libdrm.h"
+#include "libdrm_macros.h"
struct mem_block {
struct mem_block *next, *prev;
#include <sys/stat.h>
#include <err.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "intel_bufmgr.h"
#include "intel_chipset.h"
+++ /dev/null
-/*
- * Copyright © 2014 NVIDIA Corporation
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
- * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
- * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
- * OTHER DEALINGS IN THE SOFTWARE.
- */
-
-#ifndef LIBDRM_LIBDRM_H
-#define LIBDRM_LIBDRM_H
-
-#if defined(HAVE_VISIBILITY)
-# define drm_private __attribute__((visibility("hidden")))
-# define drm_public __attribute__((visibility("default")))
-#else
-# define drm_private
-# define drm_public
-#endif
-
-
-/**
- * Static (compile-time) assertion.
- * Basically, use COND to dimension an array. If COND is false/zero the
- * array size will be -1 and we'll get a compilation error.
- */
-#define STATIC_ASSERT(COND) \
- do { \
- (void) sizeof(char [1 - 2*!(COND)]); \
- } while (0)
-
-
-#include <sys/mman.h>
-
-#if defined(ANDROID) && !defined(__LP64__)
-#include <errno.h> /* for EINVAL */
-
-extern void *__mmap2(void *, size_t, int, int, int, size_t);
-
-static inline void *drm_mmap(void *addr, size_t length, int prot, int flags,
- int fd, loff_t offset)
-{
- /* offset must be aligned to 4096 (not necessarily the page size) */
- if (offset & 4095) {
- errno = EINVAL;
- return MAP_FAILED;
- }
-
- return __mmap2(addr, length, prot, flags, fd, (size_t) (offset >> 12));
-}
-
-# define drm_munmap(addr, length) \
- munmap(addr, length)
-
-
-#else
-
-/* assume large file support exists */
-# define drm_mmap(addr, length, prot, flags, fd, offset) \
- mmap(addr, length, prot, flags, fd, offset)
-
-
-static inline int drm_munmap(void *addr, size_t length)
-{
- /* Copied from configure code generated by AC_SYS_LARGEFILE */
-#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + \
- (((off_t) 1 << 31) << 31))
- STATIC_ASSERT(LARGE_OFF_T % 2147483629 == 721 &&
- LARGE_OFF_T % 2147483647 == 1);
-#undef LARGE_OFF_T
-
- return munmap(addr, length);
-}
-#endif
-
-#endif
--- /dev/null
+/*
+ * Copyright © 2014 NVIDIA Corporation
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
+ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#ifndef LIBDRM_LIBDRM_H
+#define LIBDRM_LIBDRM_H
+
+#if defined(HAVE_VISIBILITY)
+# define drm_private __attribute__((visibility("hidden")))
+# define drm_public __attribute__((visibility("default")))
+#else
+# define drm_private
+# define drm_public
+#endif
+
+
+/**
+ * Static (compile-time) assertion.
+ * Basically, use COND to dimension an array. If COND is false/zero the
+ * array size will be -1 and we'll get a compilation error.
+ */
+#define STATIC_ASSERT(COND) \
+ do { \
+ (void) sizeof(char [1 - 2*!(COND)]); \
+ } while (0)
+
+
+#include <sys/mman.h>
+
+#if defined(ANDROID) && !defined(__LP64__)
+#include <errno.h> /* for EINVAL */
+
+extern void *__mmap2(void *, size_t, int, int, int, size_t);
+
+static inline void *drm_mmap(void *addr, size_t length, int prot, int flags,
+ int fd, loff_t offset)
+{
+ /* offset must be aligned to 4096 (not necessarily the page size) */
+ if (offset & 4095) {
+ errno = EINVAL;
+ return MAP_FAILED;
+ }
+
+ return __mmap2(addr, length, prot, flags, fd, (size_t) (offset >> 12));
+}
+
+# define drm_munmap(addr, length) \
+ munmap(addr, length)
+
+
+#else
+
+/* assume large file support exists */
+# define drm_mmap(addr, length, prot, flags, fd, offset) \
+ mmap(addr, length, prot, flags, fd, offset)
+
+
+static inline int drm_munmap(void *addr, size_t length)
+{
+ /* Copied from configure code generated by AC_SYS_LARGEFILE */
+#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + \
+ (((off_t) 1 << 31) << 31))
+ STATIC_ASSERT(LARGE_OFF_T % 2147483629 == 721 &&
+ LARGE_OFF_T % 2147483647 == 1);
+#undef LARGE_OFF_T
+
+ return munmap(addr, length);
+}
+#endif
+
+#endif
#include <stdlib.h>
#include <string.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "internal.h"
int kms_create(int fd, struct kms_driver **out)
#include <sys/ioctl.h>
#include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
struct dumb_bo
{
#include <sys/ioctl.h>
#include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "exynos_drm.h"
struct exynos_bo
#include <sys/ioctl.h>
#include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "i915_drm.h"
#include "config.h"
#endif
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "libkms.h"
struct kms_driver
#include <unistd.h>
#include <sys/stat.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "internal.h"
#define PATH_SIZE 512
#include <sys/ioctl.h>
#include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "nouveau_drm.h"
#include <sys/ioctl.h>
#include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "radeon_drm.h"
#include "internal.h"
#include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "vmwgfx_drm.h"
struct vmwgfx_bo
#include <xf86drm.h>
#include <xf86atomic.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "libdrm_lists.h"
#include "nouveau_drm.h"
#ifndef __NOUVEAU_LIBDRM_PRIVATE_H__
#define __NOUVEAU_LIBDRM_PRIVATE_H__
-#include <libdrm.h>
+#include <libdrm_macros.h>
#include <xf86drm.h>
#include <xf86atomic.h>
#include <pthread.h>
#include <unistd.h>
#include <pthread.h>
-#include <libdrm.h>
+#include <libdrm_macros.h>
#include <xf86drm.h>
#include <xf86atomic.h>
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include <libdrm.h>
+#include <libdrm_macros.h>
#include <radeon_bo.h>
#include <radeon_bo_int.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "xf86drm.h"
#include "xf86atomic.h"
#include "drm.h"
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include <stdio.h>
#include "radeon_cs.h"
#include "radeon_cs_int.h"
#include "radeon_cs_gem.h"
#include "radeon_bo_gem.h"
#include "drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "xf86drm.h"
#include "xf86atomic.h"
#include "radeon_drm.h"
#include <assert.h>
#include <errno.h>
#include <stdlib.h>
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "radeon_cs.h"
#include "radeon_bo_int.h"
#include "radeon_cs_int.h"
#include <string.h>
#include <sys/ioctl.h>
#include "drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "xf86drm.h"
#include "radeon_drm.h"
#include "radeon_surface.h"
{
unsigned zs_flags = RADEON_SURF_ZBUFFER | RADEON_SURF_SBUFFER;
int r, is_depth_stencil = (surf->flags & zs_flags) == zs_flags;
- /* Old libdrm headers didn't have stencil_level in it. This prevents crashes. */
+ /* Old libdrm_macros.headers didn't have stencil_level in it. This prevents crashes. */
struct radeon_surface_level tmp[RADEON_SURF_MAX_LEVEL];
struct radeon_surface_level *stencil_level =
(surf->flags & RADEON_SURF_HAS_SBUFFER_MIPTREE) ? surf->stencil_level : tmp;
{
unsigned zs_flags = RADEON_SURF_ZBUFFER | RADEON_SURF_SBUFFER;
int r, is_depth_stencil = (surf->flags & zs_flags) == zs_flags;
- /* Old libdrm headers didn't have stencil_level in it. This prevents crashes. */
+ /* Old libdrm_macros.headers didn't have stencil_level in it. This prevents crashes. */
struct radeon_surface_level tmp[RADEON_SURF_MAX_LEVEL];
struct radeon_surface_level *stencil_level =
(surf->flags & RADEON_SURF_HAS_SBUFFER_MIPTREE) ? surf->stencil_level : tmp;
#include <stdbool.h>
#include <stdint.h>
-#include <libdrm.h>
+#include <libdrm_macros.h>
#include <xf86atomic.h>
#include "tegra.h"
#include "drm.h"
#include "drm_fourcc.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
#include "xf86drm.h"
#include "buffers.h"
#endif
#include "xf86drm.h"
-#include "libdrm.h"
+#include "libdrm_macros.h"
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
#define DRM_MAJOR 145