From cfa7152f1cfeedba7c4ab3abcb4accee94cc2c0f Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 18:45:18 +0100 Subject: [PATCH 01/22] drm/amdgpu: add extern C guard for the UAPI header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Alex Deucher Cc: Christian König Signed-off-by: Emil Velikov --- include/uapi/drm/amdgpu_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h index 453a76af123c..cdecf87576e8 100644 --- a/include/uapi/drm/amdgpu_drm.h +++ b/include/uapi/drm/amdgpu_drm.h @@ -34,6 +34,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define DRM_AMDGPU_GEM_CREATE 0x00 #define DRM_AMDGPU_GEM_MMAP 0x01 #define DRM_AMDGPU_CTX 0x02 @@ -642,4 +646,8 @@ struct drm_amdgpu_info_hw_ip { #define AMDGPU_FAMILY_VI 130 /* Iceland, Tonga */ #define AMDGPU_FAMILY_CZ 135 /* Carrizo, Stoney */ +#if defined(__cplusplus) +} +#endif + #endif From 1224649a9c842b4bb2ba4bd06af0c24d2b941ff0 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 18:47:05 +0100 Subject: [PATCH 02/22] drm/armada: add extern C guard for the UAPI header Signed-off-by: Emil Velikov Acked-by: Russell King --- include/uapi/drm/armada_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/armada_drm.h b/include/uapi/drm/armada_drm.h index 6de7f0196ca0..72e326f9c7de 100644 --- a/include/uapi/drm/armada_drm.h +++ b/include/uapi/drm/armada_drm.h @@ -11,6 +11,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define DRM_ARMADA_GEM_CREATE 0x00 #define DRM_ARMADA_GEM_MMAP 0x02 #define DRM_ARMADA_GEM_PWRITE 0x03 @@ -44,4 +48,8 @@ struct drm_armada_gem_pwrite { #define DRM_IOCTL_ARMADA_GEM_PWRITE \ ARMADA_IOCTL(IOW, GEM_PWRITE, gem_pwrite) +#if defined(__cplusplus) +} +#endif + #endif From ebbb0e5cfd2ceb1150b1af7f9fcf7aeebfb1b69f Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 18:49:00 +0100 Subject: [PATCH 03/22] drm: add extern C guard for the UAPI headers Signed-off-by: Emil Velikov --- include/uapi/drm/drm.h | 16 ++++++++++++++++ include/uapi/drm/drm_fourcc.h | 8 ++++++++ include/uapi/drm/drm_mode.h | 8 ++++++++ include/uapi/drm/drm_sarea.h | 8 ++++++++ 4 files changed, 40 insertions(+) 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; #endif +#if defined(__cplusplus) +extern "C" { +#endif + #define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */ #define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */ #define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */ @@ -691,8 +695,16 @@ struct drm_prime_handle { __s32 fd; }; +#if defined(__cplusplus) +} +#endif + #include "drm_mode.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define DRM_IOCTL_BASE 'd' #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) #define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type) @@ -886,4 +898,8 @@ typedef struct drm_scatter_gather drm_scatter_gather_t; typedef struct drm_set_version drm_set_version_t; #endif +#if defined(__cplusplus) +} +#endif + #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 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \ ((__u32)(c) << 16) | ((__u32)(d) << 24)) @@ -229,4 +233,8 @@ */ #define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1) +#if defined(__cplusplus) +} +#endif + #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 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define DRM_DISPLAY_INFO_LEN 32 #define DRM_CONNECTOR_NAME_LEN 32 #define DRM_DISPLAY_MODE_LEN 32 @@ -623,4 +627,8 @@ struct drm_mode_destroy_blob { __u32 blob_id; }; +#if defined(__cplusplus) +} +#endif + #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 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* SAREA area needs to be at least a page */ #if defined(__alpha__) #define SAREA_MAX 0x2000U @@ -83,4 +87,8 @@ typedef struct drm_sarea_frame drm_sarea_frame_t; typedef struct drm_sarea drm_sarea_t; #endif +#if defined(__cplusplus) +} +#endif + #endif /* _DRM_SAREA_H_ */ From 60ef910d0d7f007c805c2824906d4d6ea24f7890 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 18:54:33 +0100 Subject: [PATCH 04/22] drm/etnaviv: add extern C guard for the UAPI header Cc: Lucas Stach Signed-off-by: Emil Velikov Acked-by: Christian Gmeiner Acked-by: Russell King --- include/uapi/drm/etnaviv_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/etnaviv_drm.h b/include/uapi/drm/etnaviv_drm.h index f95e1c43c3fb..2584c1cca42f 100644 --- a/include/uapi/drm/etnaviv_drm.h +++ b/include/uapi/drm/etnaviv_drm.h @@ -19,6 +19,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* Please note that modifications to all structs defined here are * subject to backwards-compatibility constraints: * 1) Do not use pointers, use __u64 instead for 32 bit / 64 bit @@ -222,4 +226,8 @@ struct drm_etnaviv_gem_wait { #define DRM_IOCTL_ETNAVIV_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_USERPTR, struct drm_etnaviv_gem_userptr) #define DRM_IOCTL_ETNAVIV_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_WAIT, struct drm_etnaviv_gem_wait) +#if defined(__cplusplus) +} +#endif + #endif /* __ETNAVIV_DRM_H__ */ From 37a96bedae42317e85dcb1a5064a3ef39ded338c Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 18:58:35 +0100 Subject: [PATCH 05/22] drm/exynos: add extern C guard for the UAPI header Cc: Andrzej Hajda Cc: Inki Dae Signed-off-by: Emil Velikov --- include/uapi/drm/exynos_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/exynos_drm.h b/include/uapi/drm/exynos_drm.h index 3947c2eb8d69..cb3e9f9d029f 100644 --- a/include/uapi/drm/exynos_drm.h +++ b/include/uapi/drm/exynos_drm.h @@ -17,6 +17,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /** * User-desired buffer creation information structure. * @@ -362,4 +366,8 @@ struct drm_exynos_ipp_event { __u32 buf_id[EXYNOS_DRM_OPS_MAX]; }; +#if defined(__cplusplus) +} +#endif + #endif /* _UAPI_EXYNOS_DRM_H_ */ From 79e7328db71350e652a963aa6049d13e272a6d24 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 18:59:30 +0100 Subject: [PATCH 06/22] drm/i810: add extern C guard for the UAPI header Signed-off-by: Emil Velikov Acked-by: Daniel Vetter --- include/uapi/drm/i810_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/i810_drm.h b/include/uapi/drm/i810_drm.h index bdb028723ded..6e6cf86b75b0 100644 --- a/include/uapi/drm/i810_drm.h +++ b/include/uapi/drm/i810_drm.h @@ -3,6 +3,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* WARNING: These defines must be the same as what the Xserver uses. * if you change them, you must change the defines in the Xserver. */ @@ -280,4 +284,8 @@ typedef struct _drm_i810_mc { unsigned int last_render; /* Last Render Request */ } drm_i810_mc_t; +#if defined(__cplusplus) +} +#endif + #endif /* _I810_DRM_H_ */ From b1c1f5c400f4c5dfd5405c210fcc9e019b734335 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:00:35 +0100 Subject: [PATCH 07/22] drm/i915: add extern C guard for the UAPI header Cc: Jani Nikula Signed-off-by: Emil Velikov Acked-by: Daniel Vetter --- include/uapi/drm/i915_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h index a5524cc95ff8..c17d63d8b543 100644 --- a/include/uapi/drm/i915_drm.h +++ b/include/uapi/drm/i915_drm.h @@ -29,6 +29,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* Please note that modifications to all structs defined here are * subject to backwards-compatibility constraints. */ @@ -1170,4 +1174,8 @@ struct drm_i915_gem_context_param { __u64 value; }; +#if defined(__cplusplus) +} +#endif + #endif /* _UAPI_I915_DRM_H_ */ From c56e046f17a40571cf2bddd0edaeafa769ffba9a Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:01:39 +0100 Subject: [PATCH 08/22] drm/mga: add extern C guard for the UAPI header Signed-off-by: Emil Velikov --- include/uapi/drm/mga_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/mga_drm.h b/include/uapi/drm/mga_drm.h index fca817009e13..8c4337548ab5 100644 --- a/include/uapi/drm/mga_drm.h +++ b/include/uapi/drm/mga_drm.h @@ -37,6 +37,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* WARNING: If you change any of these defines, make sure to change the * defines in the Xserver file (mga_sarea.h) */ @@ -416,4 +420,8 @@ typedef struct drm_mga_getparam { void __user *value; } drm_mga_getparam_t; +#if defined(__cplusplus) +} +#endif + #endif From a62424e29dc33fdf1cf9efadfbf54deefbcfe7bf Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:03:46 +0100 Subject: [PATCH 09/22] drm/msm: add extern C guard for the UAPI header Signed-off-by: Emil Velikov Acked-by: Rob Clark (over irc) --- include/uapi/drm/msm_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h index 254d3e92d18e..bf19d2cd9078 100644 --- a/include/uapi/drm/msm_drm.h +++ b/include/uapi/drm/msm_drm.h @@ -20,6 +20,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* Please note that modifications to all structs defined here are * subject to backwards-compatibility constraints: * 1) Do not use pointers, use __u64 instead for 32 bit / 64 bit @@ -217,4 +221,8 @@ struct drm_msm_wait_fence { #define DRM_IOCTL_MSM_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SUBMIT, struct drm_msm_gem_submit) #define DRM_IOCTL_MSM_WAIT_FENCE DRM_IOW (DRM_COMMAND_BASE + DRM_MSM_WAIT_FENCE, struct drm_msm_wait_fence) +#if defined(__cplusplus) +} +#endif + #endif /* __MSM_DRM_H__ */ From 8daf6359c48dc42979463f5cd575948b46a8143b Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:05:06 +0100 Subject: [PATCH 10/22] drm/nouveau: add extern C guard for the UAPI header Signed-off-by: Emil Velikov Acked-by: Ben Skeggs --- include/uapi/drm/nouveau_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/nouveau_drm.h b/include/uapi/drm/nouveau_drm.h index 500d82aecbe4..8d2dc05738d8 100644 --- a/include/uapi/drm/nouveau_drm.h +++ b/include/uapi/drm/nouveau_drm.h @@ -29,6 +29,10 @@ #include +#if defined(__cplusplus) +extern "C" { +#endif + #define NOUVEAU_GEM_DOMAIN_CPU (1 << 0) #define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) #define NOUVEAU_GEM_DOMAIN_GART (1 << 2) @@ -141,4 +145,8 @@ struct drm_nouveau_gem_cpu_fini { #define DRM_IOCTL_NOUVEAU_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_FINI, struct drm_nouveau_gem_cpu_fini) #define DRM_IOCTL_NOUVEAU_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_INFO, struct drm_nouveau_gem_info) +#if defined(__cplusplus) +} +#endif + #endif /* __NOUVEAU_DRM_H__ */ From c6734c689a26591fe43946ffa8911f22e7c631c6 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:05:47 +0100 Subject: [PATCH 11/22] drm/nouveau: drop drm/ prefix from include Similar to the rest of the DRM UAPI - these are to be imported unmodified into libdrm. In current form that's impossible. Signed-off-by: Emil Velikov Acked-by: Ben Skeggs --- include/uapi/drm/nouveau_drm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/drm/nouveau_drm.h b/include/uapi/drm/nouveau_drm.h index 8d2dc05738d8..259588a4b61b 100644 --- a/include/uapi/drm/nouveau_drm.h +++ b/include/uapi/drm/nouveau_drm.h @@ -27,7 +27,7 @@ #define DRM_NOUVEAU_EVENT_NVIF 0x80000000 -#include +#include "drm.h" #if defined(__cplusplus) extern "C" { From c92378a06181456c4d8e45a33764c8524c15b99b Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:06:40 +0100 Subject: [PATCH 12/22] drm/omap: add extern C guard for the UAPI header Cc: Laurent Pinchart Signed-off-by: Emil Velikov Acked-by: Tomi Valkeinen --- include/uapi/drm/omap_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/omap_drm.h b/include/uapi/drm/omap_drm.h index 38a3bd847e15..407cb55df6ac 100644 --- a/include/uapi/drm/omap_drm.h +++ b/include/uapi/drm/omap_drm.h @@ -22,6 +22,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* Please note that modifications to all structs defined here are * subject to backwards-compatibility constraints. */ @@ -114,4 +118,8 @@ struct drm_omap_gem_info { #define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW (DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini) #define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info) +#if defined(__cplusplus) +} +#endif + #endif /* __OMAP_DRM_H__ */ From 485c40b467a25a4e376d283c7bc679b6d20caa52 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:09:39 +0100 Subject: [PATCH 13/22] drm/qxl: add extern C guard for the UAPI header Cc: Gerd Hoffmann Cc: Dave Airlie Signed-off-by: Emil Velikov --- include/uapi/drm/qxl_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/qxl_drm.h b/include/uapi/drm/qxl_drm.h index 826615d8e180..7eef42213051 100644 --- a/include/uapi/drm/qxl_drm.h +++ b/include/uapi/drm/qxl_drm.h @@ -26,6 +26,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* Please note that modifications to all structs defined here are * subject to backwards-compatibility constraints. * @@ -147,4 +151,8 @@ struct drm_qxl_alloc_surf { DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF,\ struct drm_qxl_alloc_surf) +#if defined(__cplusplus) +} +#endif + #endif From 99be554c23096ff35fb49d94df730168b1baece3 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:12:25 +0100 Subject: [PATCH 14/22] drm/r128: add extern C guard for the UAPI header Signed-off-by: Emil Velikov --- include/uapi/drm/r128_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/r128_drm.h b/include/uapi/drm/r128_drm.h index 7a44c6500a7e..690e9c62f510 100644 --- a/include/uapi/drm/r128_drm.h +++ b/include/uapi/drm/r128_drm.h @@ -35,6 +35,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* WARNING: If you change any of these defines, make sure to change the * defines in the X server file (r128_sarea.h) */ @@ -325,4 +329,8 @@ typedef struct drm_r128_getparam { void __user *value; } drm_r128_getparam_t; +#if defined(__cplusplus) +} +#endif + #endif From 6db26a941461cc5a544c737cf654c346b2a8da07 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:13:24 +0100 Subject: [PATCH 15/22] drm/radeon: add extern C guard for the UAPI header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Alex Deucher Cc: Christian König Signed-off-by: Emil Velikov --- include/uapi/drm/radeon_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h index ccb9bcd82685..490a59cc4532 100644 --- a/include/uapi/drm/radeon_drm.h +++ b/include/uapi/drm/radeon_drm.h @@ -35,6 +35,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* WARNING: If you change any of these defines, make sure to change the * defines in the X server file (radeon_sarea.h) */ @@ -1067,4 +1071,8 @@ struct drm_radeon_info { #define CIK_TILE_MODE_DEPTH_STENCIL_1D 5 +#if defined(__cplusplus) +} +#endif + #endif From ea526b7f17a4f27202aa368a6ac4668826f75d4a Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:14:34 +0100 Subject: [PATCH 16/22] drm/savage: add extern C guard for the UAPI header Signed-off-by: Emil Velikov --- include/uapi/drm/savage_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/savage_drm.h b/include/uapi/drm/savage_drm.h index 574147489c60..0f6eddef74aa 100644 --- a/include/uapi/drm/savage_drm.h +++ b/include/uapi/drm/savage_drm.h @@ -28,6 +28,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + #ifndef __SAVAGE_SAREA_DEFINES__ #define __SAVAGE_SAREA_DEFINES__ @@ -209,4 +213,8 @@ union drm_savage_cmd_header { } clear1; /* SAVAGE_CMD_CLEAR data */ }; +#if defined(__cplusplus) +} +#endif + #endif From 81dda38710ffe1fb94e755235e60f10d7e63f51b Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Fri, 13 May 2016 13:59:03 +0100 Subject: [PATCH 17/22] drm/sis: add extern C guard for the UAPI header Signed-off-by: Emil Velikov --- include/uapi/drm/sis_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/sis_drm.h b/include/uapi/drm/sis_drm.h index a20d88bc4970..3e3f7e989e0b 100644 --- a/include/uapi/drm/sis_drm.h +++ b/include/uapi/drm/sis_drm.h @@ -29,6 +29,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* SiS specific ioctls */ #define NOT_USED_0_3 #define DRM_SIS_FB_ALLOC 0x04 @@ -66,4 +70,8 @@ typedef struct { unsigned long offset, size; } drm_sis_fb_t; +#if defined(__cplusplus) +} +#endif + #endif /* __SIS_DRM_H__ */ From 7aa8ceeb5709bddd2202f637101b69c81af732c5 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:35:50 +0100 Subject: [PATCH 18/22] drm/tegra: add extern C guard for the UAPI header Cc: Erik Faye-Lund Signed-off-by: Emil Velikov Acked-by: Thierry Reding --- include/uapi/drm/tegra_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/tegra_drm.h b/include/uapi/drm/tegra_drm.h index 27d0b054aed0..d954f8c33321 100644 --- a/include/uapi/drm/tegra_drm.h +++ b/include/uapi/drm/tegra_drm.h @@ -25,6 +25,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define DRM_TEGRA_GEM_CREATE_TILED (1 << 0) #define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1) @@ -198,4 +202,8 @@ struct drm_tegra_gem_get_flags { #define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags) #define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags) +#if defined(__cplusplus) +} +#endif + #endif From 6a982350f892c286c645a6fe0e1da1f869a0c43f Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:36:57 +0100 Subject: [PATCH 19/22] drm/vc4: add extern C guard for the UAPI header Cc: Eric Anholt Signed-off-by: Emil Velikov --- include/uapi/drm/vc4_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h index eeb37e394f13..af12e8a184c8 100644 --- a/include/uapi/drm/vc4_drm.h +++ b/include/uapi/drm/vc4_drm.h @@ -26,6 +26,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define DRM_VC4_SUBMIT_CL 0x00 #define DRM_VC4_WAIT_SEQNO 0x01 #define DRM_VC4_WAIT_BO 0x02 @@ -276,4 +280,8 @@ struct drm_vc4_get_hang_state { __u32 pad[16]; }; +#if defined(__cplusplus) +} +#endif + #endif /* _UAPI_VC4_DRM_H_ */ From b6c2b64223d27ca579cce61fa5ffbf71b3f12a38 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:37:48 +0100 Subject: [PATCH 20/22] drm/via: add extern C guard for the UAPI header Signed-off-by: Emil Velikov --- include/uapi/drm/via_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/via_drm.h b/include/uapi/drm/via_drm.h index fa21ed185520..a1e125d42208 100644 --- a/include/uapi/drm/via_drm.h +++ b/include/uapi/drm/via_drm.h @@ -26,6 +26,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* WARNING: These defines must be the same as what the Xserver uses. * if you change them, you must change the defines in the Xserver. */ @@ -271,4 +275,8 @@ typedef struct drm_via_dmablit { drm_via_blitsync_t sync; } drm_via_dmablit_t; +#if defined(__cplusplus) +} +#endif + #endif /* _VIA_DRM_H_ */ From 3818081565b01f126c1fcb22f810466fa589cf97 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:38:49 +0100 Subject: [PATCH 21/22] drm/virgl: add extern C guard for the UAPI header Cc: Dave Airlie Cc: Gerd Hoffmann Signed-off-by: Emil Velikov --- include/uapi/drm/virtgpu_drm.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/uapi/drm/virtgpu_drm.h b/include/uapi/drm/virtgpu_drm.h index c74f1f90cb37..91a31ffed828 100644 --- a/include/uapi/drm/virtgpu_drm.h +++ b/include/uapi/drm/virtgpu_drm.h @@ -26,6 +26,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + /* Please note that modifications to all structs defined here are * subject to backwards-compatibility constraints. * @@ -163,4 +167,8 @@ struct drm_virtgpu_get_caps { DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GET_CAPS, \ struct drm_virtgpu_get_caps) +#if defined(__cplusplus) +} +#endif + #endif From d3450e009f9038f3c7824f64695fa51ef2474e08 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 7 Apr 2016 19:40:10 +0100 Subject: [PATCH 22/22] drm/vmwgfx: add extern C guard for the UAPI header Cc: Thomas Hellstrom Cc: Brian Paul Signed-off-by: Emil Velikov Acked-by: Sinclair Yeh --- include/uapi/drm/vmwgfx_drm.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/uapi/drm/vmwgfx_drm.h b/include/uapi/drm/vmwgfx_drm.h index 5b68b4d10884..d325a4107916 100644 --- a/include/uapi/drm/vmwgfx_drm.h +++ b/include/uapi/drm/vmwgfx_drm.h @@ -30,6 +30,10 @@ #include "drm.h" +#if defined(__cplusplus) +extern "C" { +#endif + #define DRM_VMW_MAX_SURFACE_FACES 6 #define DRM_VMW_MAX_MIP_LEVELS 24 @@ -1087,4 +1091,9 @@ union drm_vmw_extended_context_arg { enum drm_vmw_extended_context req; struct drm_vmw_context_arg rep; }; + +#if defined(__cplusplus) +} +#endif + #endif