aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt2017-11-08 13:06:55 -0600
committerEric Anholt2017-11-10 14:10:12 -0600
commit8d34bba212342ec0e187cd3602d01edba2d7ec26 (patch)
tree8b50bddbf45c7fb5dbd5eb4633c386905505900f /include
parente38de517991a20d7a2abdffc1bc4fd702e8f673c (diff)
downloadexternal-libgbm-8d34bba212342ec0e187cd3602d01edba2d7ec26.tar.gz
external-libgbm-8d34bba212342ec0e187cd3602d01edba2d7ec26.tar.xz
external-libgbm-8d34bba212342ec0e187cd3602d01edba2d7ec26.zip
headers: Sync up some header guard changes from drm-next.
This pulls in pieces of drm-next d65d31388a23 ("Merge tag 'drm-misc-next-fixes-2017-11-07' of git://anongit.freedesktop.org/drm/drm-misc into drm-next") Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/drm/README4
-rw-r--r--include/drm/mga_drm.h8
-rw-r--r--include/drm/nouveau_drm.h10
-rw-r--r--include/drm/qxl_drm.h8
-rw-r--r--include/drm/r128_drm.h10
-rw-r--r--include/drm/savage_drm.h10
-rw-r--r--include/drm/sis_drm.h10
-rw-r--r--include/drm/tegra_drm.h14
-rw-r--r--include/drm/via_drm.h8
-rw-r--r--include/drm/vmwgfx_drm.h9
10 files changed, 84 insertions, 7 deletions
diff --git a/include/drm/README b/include/drm/README
index 870b0b5b..47d80929 100644
--- a/include/drm/README
+++ b/include/drm/README
@@ -86,10 +86,6 @@ Outdated or Broken Headers
86This section contains a list of headers and the respective "issues" they might 86This section contains a list of headers and the respective "issues" they might
87have relative to their kernel equivalent. 87have relative to their kernel equivalent.
88 88
89Nearly all headers:
90 - Missing extern C notation.
91Status: Trivial.
92
93Most UMS headers: 89Most UMS headers:
94 - Not using fixed size integers - compat ioctls are broken. 90 - Not using fixed size integers - compat ioctls are broken.
95Status: ? 91Status: ?
diff --git a/include/drm/mga_drm.h b/include/drm/mga_drm.h
index b630e8fa..f54e7a2e 100644
--- a/include/drm/mga_drm.h
+++ b/include/drm/mga_drm.h
@@ -37,6 +37,10 @@
37 37
38#include "drm.h" 38#include "drm.h"
39 39
40#if defined(__cplusplus)
41extern "C" {
42#endif
43
40/* WARNING: If you change any of these defines, make sure to change the 44/* WARNING: If you change any of these defines, make sure to change the
41 * defines in the Xserver file (mga_sarea.h) 45 * defines in the Xserver file (mga_sarea.h)
42 */ 46 */
@@ -416,4 +420,8 @@ typedef struct drm_mga_getparam {
416 void *value; 420 void *value;
417} drm_mga_getparam_t; 421} drm_mga_getparam_t;
418 422
423#if defined(__cplusplus)
424}
425#endif
426
419#endif 427#endif
diff --git a/include/drm/nouveau_drm.h b/include/drm/nouveau_drm.h
index e418f9f3..542a732b 100644
--- a/include/drm/nouveau_drm.h
+++ b/include/drm/nouveau_drm.h
@@ -27,6 +27,12 @@
27 27
28#define NOUVEAU_DRM_HEADER_PATCHLEVEL 16 28#define NOUVEAU_DRM_HEADER_PATCHLEVEL 16
29 29
30#include "drm.h"
31
32#if defined(__cplusplus)
33extern "C" {
34#endif
35
30struct drm_nouveau_channel_alloc { 36struct drm_nouveau_channel_alloc {
31 uint32_t fb_ctxdma_handle; 37 uint32_t fb_ctxdma_handle;
32 uint32_t tt_ctxdma_handle; 38 uint32_t tt_ctxdma_handle;
@@ -207,4 +213,8 @@ struct drm_nouveau_sarea {
207#define DRM_NOUVEAU_GEM_CPU_FINI 0x43 213#define DRM_NOUVEAU_GEM_CPU_FINI 0x43
208#define DRM_NOUVEAU_GEM_INFO 0x44 214#define DRM_NOUVEAU_GEM_INFO 0x44
209 215
216#if defined(__cplusplus)
217}
218#endif
219
210#endif /* __NOUVEAU_DRM_H__ */ 220#endif /* __NOUVEAU_DRM_H__ */
diff --git a/include/drm/qxl_drm.h b/include/drm/qxl_drm.h
index 1e331a86..ccd841b1 100644
--- a/include/drm/qxl_drm.h
+++ b/include/drm/qxl_drm.h
@@ -27,6 +27,10 @@
27#include <stddef.h> 27#include <stddef.h>
28#include "drm.h" 28#include "drm.h"
29 29
30#if defined(__cplusplus)
31extern "C" {
32#endif
33
30/* Please note that modifications to all structs defined here are 34/* Please note that modifications to all structs defined here are
31 * subject to backwards-compatibility constraints. 35 * subject to backwards-compatibility constraints.
32 * 36 *
@@ -149,4 +153,8 @@ struct drm_qxl_alloc_surf {
149 DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF,\ 153 DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF,\
150 struct drm_qxl_alloc_surf) 154 struct drm_qxl_alloc_surf)
151 155
156#if defined(__cplusplus)
157}
158#endif
159
152#endif 160#endif
diff --git a/include/drm/r128_drm.h b/include/drm/r128_drm.h
index ede78ff9..bf431a02 100644
--- a/include/drm/r128_drm.h
+++ b/include/drm/r128_drm.h
@@ -33,6 +33,12 @@
33#ifndef __R128_DRM_H__ 33#ifndef __R128_DRM_H__
34#define __R128_DRM_H__ 34#define __R128_DRM_H__
35 35
36#include "drm.h"
37
38#if defined(__cplusplus)
39extern "C" {
40#endif
41
36/* WARNING: If you change any of these defines, make sure to change the 42/* WARNING: If you change any of these defines, make sure to change the
37 * defines in the X server file (r128_sarea.h) 43 * defines in the X server file (r128_sarea.h)
38 */ 44 */
@@ -323,4 +329,8 @@ typedef struct drm_r128_getparam {
323 void *value; 329 void *value;
324} drm_r128_getparam_t; 330} drm_r128_getparam_t;
325 331
332#if defined(__cplusplus)
333}
334#endif
335
326#endif 336#endif
diff --git a/include/drm/savage_drm.h b/include/drm/savage_drm.h
index f7a75eff..26f387b7 100644
--- a/include/drm/savage_drm.h
+++ b/include/drm/savage_drm.h
@@ -26,6 +26,12 @@
26#ifndef __SAVAGE_DRM_H__ 26#ifndef __SAVAGE_DRM_H__
27#define __SAVAGE_DRM_H__ 27#define __SAVAGE_DRM_H__
28 28
29#include "drm.h"
30
31#if defined(__cplusplus)
32extern "C" {
33#endif
34
29#ifndef __SAVAGE_SAREA_DEFINES__ 35#ifndef __SAVAGE_SAREA_DEFINES__
30#define __SAVAGE_SAREA_DEFINES__ 36#define __SAVAGE_SAREA_DEFINES__
31 37
@@ -207,4 +213,8 @@ union drm_savage_cmd_header {
207 } clear1; /* SAVAGE_CMD_CLEAR data */ 213 } clear1; /* SAVAGE_CMD_CLEAR data */
208}; 214};
209 215
216#if defined(__cplusplus)
217}
218#endif
219
210#endif 220#endif
diff --git a/include/drm/sis_drm.h b/include/drm/sis_drm.h
index 30f7b382..8e51bb9a 100644
--- a/include/drm/sis_drm.h
+++ b/include/drm/sis_drm.h
@@ -27,6 +27,12 @@
27#ifndef __SIS_DRM_H__ 27#ifndef __SIS_DRM_H__
28#define __SIS_DRM_H__ 28#define __SIS_DRM_H__
29 29
30#include "drm.h"
31
32#if defined(__cplusplus)
33extern "C" {
34#endif
35
30/* SiS specific ioctls */ 36/* SiS specific ioctls */
31#define NOT_USED_0_3 37#define NOT_USED_0_3
32#define DRM_SIS_FB_ALLOC 0x04 38#define DRM_SIS_FB_ALLOC 0x04
@@ -64,4 +70,8 @@ typedef struct {
64 unsigned int offset, size; 70 unsigned int offset, size;
65} drm_sis_fb_t; 71} drm_sis_fb_t;
66 72
73#if defined(__cplusplus)
74}
75#endif
76
67#endif /* __SIS_DRM_H__ */ 77#endif /* __SIS_DRM_H__ */
diff --git a/include/drm/tegra_drm.h b/include/drm/tegra_drm.h
index 7c0fe0ed..12f9bf84 100644
--- a/include/drm/tegra_drm.h
+++ b/include/drm/tegra_drm.h
@@ -20,10 +20,14 @@
20 * OTHER DEALINGS IN THE SOFTWARE. 20 * OTHER DEALINGS IN THE SOFTWARE.
21 */ 21 */
22 22
23#ifndef _UAPI_TEGRA_DRM_H_ 23#ifndef _TEGRA_DRM_H_
24#define _UAPI_TEGRA_DRM_H_ 24#define _TEGRA_DRM_H_
25 25
26#include <drm.h> 26#include "drm.h"
27
28#if defined(__cplusplus)
29extern "C" {
30#endif
27 31
28#define DRM_TEGRA_GEM_CREATE_TILED (1 << 0) 32#define DRM_TEGRA_GEM_CREATE_TILED (1 << 0)
29#define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1) 33#define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1)
@@ -198,4 +202,8 @@ struct drm_tegra_gem_get_flags {
198#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags) 202#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags)
199#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags) 203#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags)
200 204
205#if defined(__cplusplus)
206}
207#endif
208
201#endif 209#endif
diff --git a/include/drm/via_drm.h b/include/drm/via_drm.h
index 182f8792..8b69e819 100644
--- a/include/drm/via_drm.h
+++ b/include/drm/via_drm.h
@@ -26,6 +26,10 @@
26 26
27#include "drm.h" 27#include "drm.h"
28 28
29#if defined(__cplusplus)
30extern "C" {
31#endif
32
29/* WARNING: These defines must be the same as what the Xserver uses. 33/* WARNING: These defines must be the same as what the Xserver uses.
30 * if you change them, you must change the defines in the Xserver. 34 * if you change them, you must change the defines in the Xserver.
31 */ 35 */
@@ -272,4 +276,8 @@ typedef struct drm_via_dmablit {
272 drm_via_blitsync_t sync; 276 drm_via_blitsync_t sync;
273} drm_via_dmablit_t; 277} drm_via_dmablit_t;
274 278
279#if defined(__cplusplus)
280}
281#endif
282
275#endif /* _VIA_DRM_H_ */ 283#endif /* _VIA_DRM_H_ */
diff --git a/include/drm/vmwgfx_drm.h b/include/drm/vmwgfx_drm.h
index 5b68b4d1..d325a410 100644
--- a/include/drm/vmwgfx_drm.h
+++ b/include/drm/vmwgfx_drm.h
@@ -30,6 +30,10 @@
30 30
31#include "drm.h" 31#include "drm.h"
32 32
33#if defined(__cplusplus)
34extern "C" {
35#endif
36
33#define DRM_VMW_MAX_SURFACE_FACES 6 37#define DRM_VMW_MAX_SURFACE_FACES 6
34#define DRM_VMW_MAX_MIP_LEVELS 24 38#define DRM_VMW_MAX_MIP_LEVELS 24
35 39
@@ -1087,4 +1091,9 @@ union drm_vmw_extended_context_arg {
1087 enum drm_vmw_extended_context req; 1091 enum drm_vmw_extended_context req;
1088 struct drm_vmw_context_arg rep; 1092 struct drm_vmw_context_arg rep;
1089}; 1093};
1094
1095#if defined(__cplusplus)
1096}
1097#endif
1098
1090#endif 1099#endif