From patchwork Wed Apr 1 16:15:33 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Emil Velikov X-Patchwork-Id: 6141341 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 677739F691 for ; Wed, 1 Apr 2015 16:13:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BCAD220154 for ; Wed, 1 Apr 2015 16:12:58 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 06B702035E for ; Wed, 1 Apr 2015 16:12:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E5936E8D5; Wed, 1 Apr 2015 09:12:56 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wi0-f169.google.com (mail-wi0-f169.google.com [209.85.212.169]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C87E6E8D7 for ; Wed, 1 Apr 2015 09:12:54 -0700 (PDT) Received: by widdi4 with SMTP id di4so50651520wid.0 for ; Wed, 01 Apr 2015 09:12:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=Ic9fwZpz58L0kda1LdalSXf8mfEvlYV6EsylQYDKir4=; b=bLXw8YVnW40R8KLsoaFozUamYpL+jo8GOjKsWH9a7PZSe/jQZ5F3CH5iozaN0u835r nBwxwTyo7UMxn32M72T3AZwu/WxfTTRbBI2D3oEFUzw5ttHxa0hmLq8KoagsYYv7JRul /nnAco2KV1t9kAYt587t/v2BkZNTkVtOcWorAMsSpmicOzjcolqJ7Rd38Aa3eU5h0fkb weqfAJRqCKp4Rdf/QaOD4j9h4jJ3FruPyJDHJLvjAoW8tWVBCYDKexLiptPUJLTmJOfi beHZv71o22ynavVnDq041C1qc3PXbgrKbwf4YEdlAzr4fXMrCFQ8okYK4mHKV3dn+5gk TMgQ== X-Received: by 10.194.208.229 with SMTP id mh5mr85517816wjc.108.1427904773751; Wed, 01 Apr 2015 09:12:53 -0700 (PDT) Received: from arch-x220.localdomain (cpc12-croy20-2-0-cust52.croy.cable.virginm.net. [82.44.54.53]) by mx.google.com with ESMTPSA id ge8sm3319498wjc.32.2015.04.01.09.12.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 01 Apr 2015 09:12:52 -0700 (PDT) From: Emil Velikov To: dri-devel@lists.freedesktop.org Subject: [PATCH libdrm 22/24] drm: rename libdrm{,_macros}.h Date: Wed, 1 Apr 2015 17:15:33 +0100 Message-Id: <1427904935-14387-23-git-send-email-emil.l.velikov@gmail.com> X-Mailer: git-send-email 2.3.1 In-Reply-To: <1427904935-14387-1-git-send-email-emil.l.velikov@gmail.com> References: <1427904935-14387-1-git-send-email-emil.l.velikov@gmail.com> MIME-Version: 1.0 Cc: emil.l.velikov@gmail.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Provide a more meaningful name, considering what it does. Signed-off-by: Emil Velikov --- Makefile.sources | 2 +- exynos/exynos_drm.c | 2 +- exynos/exynos_fimg2d.c | 2 +- freedreno/freedreno_priv.h | 2 +- intel/intel_bufmgr.c | 2 +- intel/intel_bufmgr_fake.c | 2 +- intel/intel_bufmgr_gem.c | 2 +- intel/intel_decode.c | 2 +- intel/mm.c | 2 +- intel/mm.h | 2 +- intel/test_decode.c | 2 +- libdrm.h | 89 ---------------------------------------------- libdrm_macros.h | 89 ++++++++++++++++++++++++++++++++++++++++++++++ libkms/api.c | 2 +- libkms/dumb.c | 2 +- libkms/exynos.c | 2 +- libkms/intel.c | 2 +- libkms/internal.h | 2 +- libkms/linux.c | 2 +- libkms/nouveau.c | 2 +- libkms/radeon.c | 2 +- libkms/vmwgfx.c | 2 +- nouveau/nouveau.c | 2 +- nouveau/private.h | 2 +- omap/omap_drm.c | 2 +- radeon/bof.h | 2 +- radeon/radeon_bo.c | 2 +- radeon/radeon_bo_gem.c | 2 +- radeon/radeon_cs.c | 2 +- radeon/radeon_cs_gem.c | 2 +- radeon/radeon_cs_space.c | 2 +- radeon/radeon_surface.c | 6 ++-- tegra/private.h | 2 +- tests/modetest/buffers.c | 2 +- xf86drm.c | 2 +- 35 files changed, 124 insertions(+), 124 deletions(-) delete mode 100644 libdrm.h create mode 100644 libdrm_macros.h diff --git a/Makefile.sources b/Makefile.sources index 566f7b5..8747ccd 100644 --- a/Makefile.sources +++ b/Makefile.sources @@ -5,7 +5,7 @@ LIBDRM_FILES := \ xf86drmSL.c \ xf86drmMode.c \ xf86atomic.h \ - libdrm.h \ + libdrm_macros.h \ libdrm_lists.h LIBDRM_H_FILES := \ diff --git a/exynos/exynos_drm.c b/exynos/exynos_drm.c index c5dd948..5d07ea7 100644 --- a/exynos/exynos_drm.c +++ b/exynos/exynos_drm.c @@ -38,7 +38,7 @@ #include -#include "libdrm.h" +#include "libdrm_macros.h" #include "exynos_drm.h" #include "exynos_drmif.h" diff --git a/exynos/exynos_fimg2d.c b/exynos/exynos_fimg2d.c index fc605ed..cb422e8 100644 --- a/exynos/exynos_fimg2d.c +++ b/exynos/exynos_fimg2d.c @@ -24,7 +24,7 @@ #include -#include "libdrm.h" +#include "libdrm_macros.h" #include "exynos_drm.h" #include "fimg2d_reg.h" #include "exynos_fimg2d.h" diff --git a/freedreno/freedreno_priv.h b/freedreno/freedreno_priv.h index 2d0fa6d..3c194fb 100644 --- a/freedreno/freedreno_priv.h +++ b/freedreno/freedreno_priv.h @@ -44,7 +44,7 @@ #include #include -#include "libdrm.h" +#include "libdrm_macros.h" #include "xf86drm.h" #include "xf86atomic.h" diff --git a/intel/intel_bufmgr.c b/intel/intel_bufmgr.c index 234cd13..a95771d 100644 --- a/intel/intel_bufmgr.c +++ b/intel/intel_bufmgr.c @@ -37,7 +37,7 @@ #include #include #include -#include "libdrm.h" +#include "libdrm_macros.h" #include "intel_bufmgr.h" #include "intel_bufmgr_priv.h" #include "xf86drm.h" diff --git a/intel/intel_bufmgr_fake.c b/intel/intel_bufmgr_fake.c index c4828fa..d0c2d74 100644 --- a/intel/intel_bufmgr_fake.c +++ b/intel/intel_bufmgr_fake.c @@ -49,7 +49,7 @@ #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 */ diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index 5a67f53..201da08 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -56,7 +56,7 @@ #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" diff --git a/intel/intel_decode.c b/intel/intel_decode.c index 7d5cbe5..8759760 100644 --- a/intel/intel_decode.c +++ b/intel/intel_decode.c @@ -33,7 +33,7 @@ #include #include -#include "libdrm.h" +#include "libdrm_macros.h" #include "xf86drm.h" #include "intel_chipset.h" #include "intel_bufmgr.h" diff --git a/intel/mm.c b/intel/mm.c index 9c67660..954e9dc 100644 --- a/intel/mm.c +++ b/intel/mm.c @@ -30,7 +30,7 @@ #include #include "xf86drm.h" -#include "libdrm.h" +#include "libdrm_macros.h" #include "mm.h" drm_private void mmDumpMemInfo(const struct mem_block *heap) diff --git a/intel/mm.h b/intel/mm.h index 01813a5..8d83743 100644 --- a/intel/mm.h +++ b/intel/mm.h @@ -33,7 +33,7 @@ #include "config.h" #endif -#include "libdrm.h" +#include "libdrm_macros.h" struct mem_block { struct mem_block *next, *prev; diff --git a/intel/test_decode.c b/intel/test_decode.c index 93f47ef..bef86bb 100644 --- a/intel/test_decode.c +++ b/intel/test_decode.c @@ -34,7 +34,7 @@ #include #include -#include "libdrm.h" +#include "libdrm_macros.h" #include "intel_bufmgr.h" #include "intel_chipset.h" diff --git a/libdrm.h b/libdrm.h deleted file mode 100644 index 6c3cd59..0000000 --- a/libdrm.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * 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 - -#if defined(ANDROID) && !defined(__LP64__) -#include /* 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 diff --git a/libdrm_macros.h b/libdrm_macros.h new file mode 100644 index 0000000..6c3cd59 --- /dev/null +++ b/libdrm_macros.h @@ -0,0 +1,89 @@ +/* + * 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 + +#if defined(ANDROID) && !defined(__LP64__) +#include /* 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 diff --git a/libkms/api.c b/libkms/api.c index a07a242..354d8a2 100644 --- a/libkms/api.c +++ b/libkms/api.c @@ -34,7 +34,7 @@ #include #include -#include "libdrm.h" +#include "libdrm_macros.h" #include "internal.h" int kms_create(int fd, struct kms_driver **out) diff --git a/libkms/dumb.c b/libkms/dumb.c index e252d8c..b95a072 100644 --- a/libkms/dumb.c +++ b/libkms/dumb.c @@ -38,7 +38,7 @@ #include #include "xf86drm.h" -#include "libdrm.h" +#include "libdrm_macros.h" struct dumb_bo { diff --git a/libkms/exynos.c b/libkms/exynos.c index db65f81..5de2e5a 100644 --- a/libkms/exynos.c +++ b/libkms/exynos.c @@ -25,7 +25,7 @@ #include #include "xf86drm.h" -#include "libdrm.h" +#include "libdrm_macros.h" #include "exynos_drm.h" struct exynos_bo diff --git a/libkms/intel.c b/libkms/intel.c index a539df2..3d8ca05 100644 --- a/libkms/intel.c +++ b/libkms/intel.c @@ -38,7 +38,7 @@ #include #include "xf86drm.h" -#include "libdrm.h" +#include "libdrm_macros.h" #include "i915_drm.h" diff --git a/libkms/internal.h b/libkms/internal.h index e7d5c46..905f5b1 100644 --- a/libkms/internal.h +++ b/libkms/internal.h @@ -33,7 +33,7 @@ #include "config.h" #endif -#include "libdrm.h" +#include "libdrm_macros.h" #include "libkms.h" struct kms_driver diff --git a/libkms/linux.c b/libkms/linux.c index 06dbc42..4d47148 100644 --- a/libkms/linux.c +++ b/libkms/linux.c @@ -41,7 +41,7 @@ #include #include -#include "libdrm.h" +#include "libdrm_macros.h" #include "internal.h" #define PATH_SIZE 512 diff --git a/libkms/nouveau.c b/libkms/nouveau.c index 7f57f21..d10e0fd 100644 --- a/libkms/nouveau.c +++ b/libkms/nouveau.c @@ -38,7 +38,7 @@ #include #include "xf86drm.h" -#include "libdrm.h" +#include "libdrm_macros.h" #include "nouveau_drm.h" diff --git a/libkms/radeon.c b/libkms/radeon.c index f0d5db6..aaeeaf3 100644 --- a/libkms/radeon.c +++ b/libkms/radeon.c @@ -38,7 +38,7 @@ #include #include "xf86drm.h" -#include "libdrm.h" +#include "libdrm_macros.h" #include "radeon_drm.h" diff --git a/libkms/vmwgfx.c b/libkms/vmwgfx.c index 3c99ea3..6a24fd4 100644 --- a/libkms/vmwgfx.c +++ b/libkms/vmwgfx.c @@ -36,7 +36,7 @@ #include "internal.h" #include "xf86drm.h" -#include "libdrm.h" +#include "libdrm_macros.h" #include "vmwgfx_drm.h" struct vmwgfx_bo diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c index 5c8a0ec..9d12091 100644 --- a/nouveau/nouveau.c +++ b/nouveau/nouveau.c @@ -37,7 +37,7 @@ #include #include -#include "libdrm.h" +#include "libdrm_macros.h" #include "libdrm_lists.h" #include "nouveau_drm.h" diff --git a/nouveau/private.h b/nouveau/private.h index 74d604e..e9439f3 100644 --- a/nouveau/private.h +++ b/nouveau/private.h @@ -1,7 +1,7 @@ #ifndef __NOUVEAU_LIBDRM_PRIVATE_H__ #define __NOUVEAU_LIBDRM_PRIVATE_H__ -#include +#include #include #include #include diff --git a/omap/omap_drm.c b/omap/omap_drm.c index 8b4ec46..7bc8984 100644 --- a/omap/omap_drm.c +++ b/omap/omap_drm.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include diff --git a/radeon/bof.h b/radeon/bof.h index b7632b4..6f2474d 100644 --- a/radeon/bof.h +++ b/radeon/bof.h @@ -32,7 +32,7 @@ #include #include -#include "libdrm.h" +#include "libdrm_macros.h" #define BOF_TYPE_STRING 0 #define BOF_TYPE_NULL 1 diff --git a/radeon/radeon_bo.c b/radeon/radeon_bo.c index 865e3f7..02a2d83 100644 --- a/radeon/radeon_bo.c +++ b/radeon/radeon_bo.c @@ -32,7 +32,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include +#include #include #include diff --git a/radeon/radeon_bo_gem.c b/radeon/radeon_bo_gem.c index e78303a..b48cf54 100644 --- a/radeon/radeon_bo_gem.c +++ b/radeon/radeon_bo_gem.c @@ -37,7 +37,7 @@ #include #include #include -#include "libdrm.h" +#include "libdrm_macros.h" #include "xf86drm.h" #include "xf86atomic.h" #include "drm.h" diff --git a/radeon/radeon_cs.c b/radeon/radeon_cs.c index fe5bbce..142b71f 100644 --- a/radeon/radeon_cs.c +++ b/radeon/radeon_cs.c @@ -1,7 +1,7 @@ #ifdef HAVE_CONFIG_H #include #endif -#include "libdrm.h" +#include "libdrm_macros.h" #include #include "radeon_cs.h" #include "radeon_cs_int.h" diff --git a/radeon/radeon_cs_gem.c b/radeon/radeon_cs_gem.c index 705ee05..86e0855 100644 --- a/radeon/radeon_cs_gem.c +++ b/radeon/radeon_cs_gem.c @@ -44,7 +44,7 @@ #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" diff --git a/radeon/radeon_cs_space.c b/radeon/radeon_cs_space.c index cca650b..1a6ea28 100644 --- a/radeon/radeon_cs_space.c +++ b/radeon/radeon_cs_space.c @@ -31,7 +31,7 @@ #include #include #include -#include "libdrm.h" +#include "libdrm_macros.h" #include "radeon_cs.h" #include "radeon_bo_int.h" #include "radeon_cs_int.h" diff --git a/radeon/radeon_surface.c b/radeon/radeon_surface.c index bd9ee6d..fd75b16 100644 --- a/radeon/radeon_surface.c +++ b/radeon/radeon_surface.c @@ -37,7 +37,7 @@ #include #include #include "drm.h" -#include "libdrm.h" +#include "libdrm_macros.h" #include "xf86drm.h" #include "radeon_drm.h" #include "radeon_surface.h" @@ -785,7 +785,7 @@ static int eg_surface_init_1d_miptrees(struct radeon_surface_manager *surf_man, { 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; @@ -807,7 +807,7 @@ static int eg_surface_init_2d_miptrees(struct radeon_surface_manager *surf_man, { 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; diff --git a/tegra/private.h b/tegra/private.h index 9b6bc93..bb6c1a5 100644 --- a/tegra/private.h +++ b/tegra/private.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include "tegra.h" diff --git a/tests/modetest/buffers.c b/tests/modetest/buffers.c index e4e8149..878b64e 100644 --- a/tests/modetest/buffers.c +++ b/tests/modetest/buffers.c @@ -39,7 +39,7 @@ #include "drm.h" #include "drm_fourcc.h" -#include "libdrm.h" +#include "libdrm_macros.h" #include "xf86drm.h" #include "buffers.h" diff --git a/xf86drm.c b/xf86drm.c index e73cddd..9ae5071 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -62,7 +62,7 @@ #endif #include "xf86drm.h" -#include "libdrm.h" +#include "libdrm_macros.h" #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) #define DRM_MAJOR 145