History

drm: add extern C guard for the UAPI headers

Emil Velikov committed 10 years ago

Commit ebbb0e51 parent 12246494 files · +40 −0Browse files

Showing the changes to include/uapi (4 of 4 files). Show all

Unified · Split

4 files
  1. include/uapi/drm/drm.h +16 −0
  2. include/uapi/drm/drm_fourcc.h +8 −0
  3. include/uapi/drm/drm_mode.h +8 −0
  4. include/uapi/drm/drm_sarea.h +8 −0
include/uapi/drm/drm.h+16−0
@@ -65,6 +65,10 @@ typedef unsigned long drm_handle_t; · 64 unmodified lines
65 65
66#endif66#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 { · 620 unmodified lines
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; · 187 unmodified lines
886typedef struct drm_set_version drm_set_version_t;898typedef struct drm_set_version drm_set_version_t;
887#endif899#endif
888 900
901#if defined(__cplusplus)
902}
903#endif
904
889#endif905#endif
include/uapi/drm/drm_fourcc.h+8−0
@@ -26,6 +26,10 @@ · 25 unmodified lines
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 @@ · 197 unmodified lines
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 */
include/uapi/drm/drm_mode.h+8−0
@@ -29,6 +29,10 @@ · 28 unmodified lines
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 3236#define DRM_DISPLAY_INFO_LEN 32
33#define DRM_CONNECTOR_NAME_LEN 3237#define DRM_CONNECTOR_NAME_LEN 32
34#define DRM_DISPLAY_MODE_LEN 3238#define DRM_DISPLAY_MODE_LEN 32
@@ -623,4 +627,8 @@ struct drm_mode_destroy_blob { · 588 unmodified lines
623 __u32 blob_id;627 __u32 blob_id;
624};628};
625 629
630#if defined(__cplusplus)
631}
632#endif
633
626#endif634#endif
include/uapi/drm/drm_sarea.h+8−0
@@ -34,6 +34,10 @@ · 33 unmodified lines
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 0x2000U43#define SAREA_MAX 0x2000U
@@ -83,4 +87,8 @@ typedef struct drm_sarea_frame drm_sarea_frame_t; · 43 unmodified lines
83typedef struct drm_sarea drm_sarea_t;87typedef struct drm_sarea drm_sarea_t;
84#endif88#endif
85 89
90#if defined(__cplusplus)
91}
92#endif
93
86#endif /* _DRM_SAREA_H_ */94#endif /* _DRM_SAREA_H_ */