aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/drm
diff options
context:
space:
mode:
authorEmil Velikov <emil.l.velikov@gmail.com>2016-04-07 13:49:00 -0400
committerEmil Velikov <emil.l.velikov@gmail.com>2016-05-13 08:57:17 -0400
commitebbb0e5cfd2ceb1150b1af7f9fcf7aeebfb1b69f (patch)
treef4a6b0f01b2edd7c0108ae327518c990114f66f9 /include/uapi/drm
parent1224649a9c842b4bb2ba4bd06af0c24d2b941ff0 (diff)
drm: add extern C guard for the UAPI headers
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'include/uapi/drm')
-rw-r--r--include/uapi/drm/drm.h16
-rw-r--r--include/uapi/drm/drm_fourcc.h8
-rw-r--r--include/uapi/drm/drm_mode.h8
-rw-r--r--include/uapi/drm/drm_sarea.h8
4 files changed, 40 insertions, 0 deletions
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h
index 368325061ca7..452675fb55d9 100644
--- a/include/uapi/drm/drm.h
+++ b/include/uapi/drm/drm.h
@@ -65,6 +65,10 @@ typedef unsigned long drm_handle_t;
65 65
66#endif 66#endif
67 67
68#if defined(__cplusplus)
69extern "C" {
70#endif
71
68#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ 72#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */
69#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ 73#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */
70#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ 74#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */
@@ -691,8 +695,16 @@ struct drm_prime_handle {
691 __s32 fd; 695 __s32 fd;
692}; 696};
693 697
698#if defined(__cplusplus)
699}
700#endif
701
694#include "drm_mode.h" 702#include "drm_mode.h"
695 703
704#if defined(__cplusplus)
705extern "C" {
706#endif
707
696#define DRM_IOCTL_BASE 'd' 708#define DRM_IOCTL_BASE 'd'
697#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) 709#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
698#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type) 710#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type)
@@ -886,4 +898,8 @@ typedef struct drm_scatter_gather drm_scatter_gather_t;
886typedef struct drm_set_version drm_set_version_t; 898typedef struct drm_set_version drm_set_version_t;
887#endif 899#endif
888 900
901#if defined(__cplusplus)
902}
903#endif
904
889#endif 905#endif
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h
index 4d8da699a623..a5890bf44c0a 100644
--- a/include/uapi/drm/drm_fourcc.h
+++ b/include/uapi/drm/drm_fourcc.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#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \ 33#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \
30 ((__u32)(c) << 16) | ((__u32)(d) << 24)) 34 ((__u32)(c) << 16) | ((__u32)(d) << 24))
31 35
@@ -229,4 +233,8 @@
229 */ 233 */
230#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1) 234#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1)
231 235
236#if defined(__cplusplus)
237}
238#endif
239
232#endif /* DRM_FOURCC_H */ 240#endif /* DRM_FOURCC_H */
diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h
index f7e53ea9ee96..49a72659b801 100644
--- a/include/uapi/drm/drm_mode.h
+++ b/include/uapi/drm/drm_mode.h
@@ -29,6 +29,10 @@
29 29
30#include "drm.h" 30#include "drm.h"
31 31
32#if defined(__cplusplus)
33extern "C" {
34#endif
35
32#define DRM_DISPLAY_INFO_LEN 32 36#define DRM_DISPLAY_INFO_LEN 32
33#define DRM_CONNECTOR_NAME_LEN 32 37#define DRM_CONNECTOR_NAME_LEN 32
34#define DRM_DISPLAY_MODE_LEN 32 38#define DRM_DISPLAY_MODE_LEN 32
@@ -623,4 +627,8 @@ struct drm_mode_destroy_blob {
623 __u32 blob_id; 627 __u32 blob_id;
624}; 628};
625 629
630#if defined(__cplusplus)
631}
632#endif
633
626#endif 634#endif
diff --git a/include/uapi/drm/drm_sarea.h b/include/uapi/drm/drm_sarea.h
index 1d1a858a203d..a951ced60ebe 100644
--- a/include/uapi/drm/drm_sarea.h
+++ b/include/uapi/drm/drm_sarea.h
@@ -34,6 +34,10 @@
34 34
35#include "drm.h" 35#include "drm.h"
36 36
37#if defined(__cplusplus)
38extern "C" {
39#endif
40
37/* SAREA area needs to be at least a page */ 41/* SAREA area needs to be at least a page */
38#if defined(__alpha__) 42#if defined(__alpha__)
39#define SAREA_MAX 0x2000U 43#define SAREA_MAX 0x2000U
@@ -83,4 +87,8 @@ typedef struct drm_sarea_frame drm_sarea_frame_t;
83typedef struct drm_sarea drm_sarea_t; 87typedef struct drm_sarea drm_sarea_t;
84#endif 88#endif
85 89
90#if defined(__cplusplus)
91}
92#endif
93
86#endif /* _DRM_SAREA_H_ */ 94#endif /* _DRM_SAREA_H_ */