All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/24] drm: add extern C guard for the UAPI headers
@ 2016-04-21 20:17 Emil Velikov
  2016-04-21 20:17 ` [PATCH 01/24] drm/amdgpu: add extern C guard for the UAPI header Emil Velikov
                   ` (25 more replies)
  0 siblings, 26 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel
  Cc: emil.l.velikov, David Howells, Laurent Pinchart, Daniel Vetter,
	Thomas Hellstrom, Tomi Valkeinen, Brian Paul, Ben Skeggs,
	Russell King, Dave Airlie, Andrzej Hajda, Michel Dänzer,
	Alex Deucher, Christian König

[Re-sending to the correct mailing list. Apologies if you've seen it already]

Hi all, David Howells

Dave Airlie pointed out that "polluting" the headers in a manner as seen 
with this series might not be too wise. David H, can we hear your view 
on the topic ?

Note that these headers are meant to be used by more than just Linux 
(various BSD and Solaris come to mind), making things more complicated.


The change:


As some of you may know there are some subtle distinctions between C and 
C++ structs/enums, thus one should wrap/annotate them roughly like below.


...
#if defined(__cplusplus)
extern "C" {
#endif

struct foo {
    int bar;
    ...
};

...

#if defined(__cplusplus)
}
#endif


In order to work around the lack of these users can wrap the header 
inclusion in the same way. For example:


...
#if defined(__cplusplus)
extern "C" {
#endif

#include <i915_drm.h>

#if defined(__cplusplus)
}
#endif


Yet we should avoid this approach, as it might cause issues [1] [2] [3]. 
Thus here is a series which systematically updates all the UAPI headers 
in one go.

I would prefer if we get this merged in one go. Daniel, is it possible 
to go through drm-misc ? The series is already based on it.

Maintainers, does this sound reasonable, can we get a few acks ?


Thanks
Emil

[1] http://developers.redhat.com/blog/2016/02/29/why-cstdlib-is-more-complicated-than-you-might-think/
[2] https://isocpp.org/wiki/faq/mixing-c-and-cpp
[3] http://www.oracle.com/technetwork/articles/servers-storage-dev/mixingcandcpluspluscode-305840.html

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Brian Paul <brianp@vmware.com>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Erik Faye-Lund <kusmabite@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Michel Dänzer <michel.daenzer@amd.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>


Emil Velikov (24):
  drm/amdgpu: add extern C guard for the UAPI header
  drm/armada: add extern C guard for the UAPI header
  drm: add extern C guard for the UAPI headers
  drm/etnaviv: add extern C guard for the UAPI header
  drm/exynos: add extern C guard for the UAPI header
  drm/i810: add extern C guard for the UAPI header
  drm/i915: add extern C guard for the UAPI header
  drm/mga: add extern C guard for the UAPI header
  drm/msm: add extern C guard for the UAPI header
  drm/nouveau: add extern C guard for the UAPI header
  drm/nouveau: drop drm/ prefix from include
  drm/omap: add extern C guard for the UAPI header
  drm/qxl: add extern C guard for the UAPI header
  drm/qxl: remove XXX comment from the UAPI header
  drm/r128: add extern C guard for the UAPI header
  drm/radeon: add extern C guard for the UAPI header
  drm/savage: add extern C guard for the UAPI header
  drm/sis: add extern C guard for the UAPI header
  drm/sis: add missing include drm.h for the UAPI header
  drm/tegra: add extern C guard for the UAPI header
  drm/vc4: add extern C guard for the UAPI header
  drm/via: add extern C guard for the UAPI header
  drm/virgl: add extern C guard for the UAPI header
  drm/vmwgfx: add extern C guard for the UAPI header

 include/uapi/drm/amdgpu_drm.h  |  8 ++++++++
 include/uapi/drm/armada_drm.h  |  8 ++++++++
 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 ++++++++
 include/uapi/drm/etnaviv_drm.h |  8 ++++++++
 include/uapi/drm/exynos_drm.h  |  8 ++++++++
 include/uapi/drm/i810_drm.h    |  8 ++++++++
 include/uapi/drm/i915_drm.h    |  8 ++++++++
 include/uapi/drm/mga_drm.h     |  8 ++++++++
 include/uapi/drm/msm_drm.h     |  8 ++++++++
 include/uapi/drm/nouveau_drm.h | 10 +++++++++-
 include/uapi/drm/omap_drm.h    |  8 ++++++++
 include/uapi/drm/qxl_drm.h     |  9 ++++++++-
 include/uapi/drm/r128_drm.h    |  8 ++++++++
 include/uapi/drm/radeon_drm.h  |  8 ++++++++
 include/uapi/drm/savage_drm.h  |  8 ++++++++
 include/uapi/drm/sis_drm.h     | 10 ++++++++++
 include/uapi/drm/tegra_drm.h   |  8 ++++++++
 include/uapi/drm/vc4_drm.h     |  8 ++++++++
 include/uapi/drm/via_drm.h     |  8 ++++++++
 include/uapi/drm/virtgpu_drm.h |  8 ++++++++
 include/uapi/drm/vmwgfx_drm.h  |  9 +++++++++
 24 files changed, 204 insertions(+), 2 deletions(-)

-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 01/24] drm/amdgpu: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 02/24] drm/armada: " Emil Velikov
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Alex Deucher, emil.l.velikov, Christian König

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 453a76a..cdecf87 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
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 02/24] drm/armada: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
  2016-04-21 20:17 ` [PATCH 01/24] drm/amdgpu: add extern C guard for the UAPI header Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 03/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Russell King, emil.l.velikov

Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 6de7f01..72e326f 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
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 03/24] drm: add extern C guard for the UAPI headers
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
  2016-04-21 20:17 ` [PATCH 01/24] drm/amdgpu: add extern C guard for the UAPI header Emil Velikov
  2016-04-21 20:17 ` [PATCH 02/24] drm/armada: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 04/24] drm/etnaviv: add extern C guard for the UAPI header Emil Velikov
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 3683250..452675f 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 4d8da69..a5890bf 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 7a7856e0..a4c5378 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
@@ -621,4 +625,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 1d1a858..a951ced 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_ */
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 04/24] drm/etnaviv: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (2 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 03/24] drm: add extern C guard for the UAPI headers Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-27 15:13   ` Christian Gmeiner
  2016-04-21 20:17 ` [PATCH 05/24] drm/exynos: " Emil Velikov
                   ` (21 subsequent siblings)
  25 siblings, 1 reply; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Russell King, emil.l.velikov

Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 f95e1c4..2584c1c 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__ */
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 05/24] drm/exynos: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (3 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 04/24] drm/etnaviv: add extern C guard for the UAPI header Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 06/24] drm/i810: " Emil Velikov
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Andrzej Hajda, emil.l.velikov

Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Inki Dae <inki.dae@samsung.com>

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

---

Inki,

Can we please have someone from the Exynos/Samsung look into the
following:
 - A follow up on patch cbf0aceff85 "drm/exynos: use arch independent
types in uapi header"
 - Use the same licence for both libdrm and kernel version of
exynos_drm.h - ideally X11/MIT.

No rush, just making sure that it doesn't fall through the cracks.

Thanks
Emil
---
 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 3947c2e..cb3e9f9 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_ */
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 06/24] drm/i810: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (4 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 05/24] drm/exynos: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-22  8:36   ` Daniel Vetter
  2016-04-21 20:17 ` [PATCH 07/24] drm/i915: " Emil Velikov
                   ` (19 subsequent siblings)
  25 siblings, 1 reply; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, emil.l.velikov

Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

---

Daniel,

Based on earlier chat that his file has never been used by userspace,
should we just move it for internal usage (to include/drm) ?

Regards,
Emil
---
 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 bdb0287..6e6cf86 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_ */
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 07/24] drm/i915: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (5 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 06/24] drm/i810: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 08/24] drm/mga: " Emil Velikov
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, emil.l.velikov

Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 a5524cc..c17d63d 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_ */
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 08/24] drm/mga: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (6 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 07/24] drm/i915: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 09/24] drm/msm: " Emil Velikov
                   ` (17 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 fca8170..8c43375 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
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 09/24] drm/msm: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (7 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 08/24] drm/mga: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 10/24] drm/nouveau: " Emil Velikov
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Cc: Rob Clark <robdclark@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 254d3e9..bf19d2c 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__ */
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 10/24] drm/nouveau: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (8 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 09/24] drm/msm: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 11/24] drm/nouveau: drop drm/ prefix from include Emil Velikov
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov, Ben Skeggs

Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 500d82a..8d2dc05 100644
--- a/include/uapi/drm/nouveau_drm.h
+++ b/include/uapi/drm/nouveau_drm.h
@@ -29,6 +29,10 @@
 
 #include <drm/drm.h>
 
+#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__ */
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 11/24] drm/nouveau: drop drm/ prefix from include
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (9 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 10/24] drm/nouveau: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 12/24] drm/omap: add extern C guard for the UAPI header Emil Velikov
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov, Ben Skeggs

Similar to the rest of the DRM UAPI - these are to be imported
unmodified into libdrm. In current form that's impossible.

Cc: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 8d2dc05..259588a 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 <drm/drm.h>
+#include "drm.h"
 
 #if defined(__cplusplus)
 extern "C" {
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 12/24] drm/omap: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (10 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 11/24] drm/nouveau: drop drm/ prefix from include Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-28  8:18   ` Tomi Valkeinen
  2016-04-21 20:17 ` [PATCH 13/24] drm/qxl: " Emil Velikov
                   ` (13 subsequent siblings)
  25 siblings, 1 reply; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Tomi Valkeinen, emil.l.velikov, Laurent Pinchart

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 38a3bd8..407cb55 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__ */
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 13/24] drm/qxl: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (11 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 12/24] drm/omap: add extern C guard for the UAPI header Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 14/24] drm/qxl: remove XXX comment from " Emil Velikov
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Dave Airlie, emil.l.velikov

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 4d1e326..cd99da0 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.
  *
@@ -148,4 +152,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
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 14/24] drm/qxl: remove XXX comment from the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (12 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 13/24] drm/qxl: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 15/24] drm/r128: add extern C guard for " Emil Velikov
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Dave Airlie, emil.l.velikov

One cannot rename the struct at this point, so might as well remove the
comment.

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 include/uapi/drm/qxl_drm.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/uapi/drm/qxl_drm.h b/include/uapi/drm/qxl_drm.h
index cd99da0..7eef422 100644
--- a/include/uapi/drm/qxl_drm.h
+++ b/include/uapi/drm/qxl_drm.h
@@ -88,7 +88,6 @@ struct drm_qxl_command {
 	__u32                pad;
 };
 
-/* XXX: call it drm_qxl_commands? */
 struct drm_qxl_execbuffer {
 	__u32		flags;		/* for future use */
 	__u32		commands_num;
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 15/24] drm/r128: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (13 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 14/24] drm/qxl: remove XXX comment from " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 16/24] drm/radeon: " Emil Velikov
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 7a44c65..690e9c6 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
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 16/24] drm/radeon: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (14 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 15/24] drm/r128: add extern C guard for " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 17/24] drm/savage: " Emil Velikov
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Alex Deucher, emil.l.velikov, Christian König

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 ccb9bcd..490a59c 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
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 17/24] drm/savage: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (15 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 16/24] drm/radeon: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 18/24] drm/sis: " Emil Velikov
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 5741474..0f6edde 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
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 18/24] drm/sis: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (16 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 17/24] drm/savage: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 19/24] drm/sis: add missing include drm.h " Emil Velikov
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 374858c..3f7d8ca 100644
--- a/include/uapi/drm/sis_drm.h
+++ b/include/uapi/drm/sis_drm.h
@@ -27,6 +27,10 @@
 #ifndef __SIS_DRM_H__
 #define __SIS_DRM_H__
 
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
 /* SiS specific ioctls */
 #define NOT_USED_0_3
 #define DRM_SIS_FB_ALLOC	0x04
@@ -64,4 +68,8 @@ typedef struct {
 	unsigned long offset, size;
 } drm_sis_fb_t;
 
+#if defined(__cplusplus)
+}
+#endif
+
 #endif				/* __SIS_DRM_H__ */
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 19/24] drm/sis: add missing include drm.h for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (17 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 18/24] drm/sis: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-22  8:37   ` Daniel Vetter
  2016-04-21 20:17 ` [PATCH 20/24] drm/tegra: add extern C guard " Emil Velikov
                   ` (6 subsequent siblings)
  25 siblings, 1 reply; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 include/uapi/drm/sis_drm.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/uapi/drm/sis_drm.h b/include/uapi/drm/sis_drm.h
index 3f7d8ca..3e3f7e9 100644
--- a/include/uapi/drm/sis_drm.h
+++ b/include/uapi/drm/sis_drm.h
@@ -27,6 +27,8 @@
 #ifndef __SIS_DRM_H__
 #define __SIS_DRM_H__
 
+#include "drm.h"
+
 #if defined(__cplusplus)
 extern "C" {
 #endif
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 20/24] drm/tegra: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (18 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 19/24] drm/sis: add missing include drm.h " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-22 12:02   ` Thierry Reding
  2016-04-21 20:17 ` [PATCH 21/24] drm/vc4: " Emil Velikov
                   ` (5 subsequent siblings)
  25 siblings, 1 reply; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Cc: Erik Faye-Lund <kusmabite@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 27d0b05..d954f8c 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
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 21/24] drm/vc4: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (19 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 20/24] drm/tegra: add extern C guard " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 22/24] drm/via: " Emil Velikov
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 eeb37e3..af12e8a 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_ */
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 22/24] drm/via: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (20 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 21/24] drm/vc4: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 23/24] drm/virgl: " Emil Velikov
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: emil.l.velikov

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 fa21ed1..a1e125d 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_ */
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 23/24] drm/virgl: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (21 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 22/24] drm/via: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-21 20:17 ` [PATCH 24/24] drm/vmwgfx: " Emil Velikov
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Dave Airlie, emil.l.velikov

Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 c74f1f9..91a31ff 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
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* [PATCH 24/24] drm/vmwgfx: add extern C guard for the UAPI header
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (22 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 23/24] drm/virgl: " Emil Velikov
@ 2016-04-21 20:17 ` Emil Velikov
  2016-04-22  8:34 ` [PATCH 00/24] drm: add extern C guard for the UAPI headers Daniel Vetter
  2016-04-27  9:47 ` Russell King - ARM Linux
  25 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 20:17 UTC (permalink / raw)
  To: dri-devel; +Cc: Brian Paul, Thomas Hellstrom, emil.l.velikov

Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Brian Paul <brianp@vmware.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
 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 5b68b4d..d325a41 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
-- 
2.6.2

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 42+ messages in thread

* Re: [PATCH 00/24] drm: add extern C guard for the UAPI headers
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (23 preceding siblings ...)
  2016-04-21 20:17 ` [PATCH 24/24] drm/vmwgfx: " Emil Velikov
@ 2016-04-22  8:34 ` Daniel Vetter
  2016-04-27  9:47 ` Russell King - ARM Linux
  25 siblings, 0 replies; 42+ messages in thread
From: Daniel Vetter @ 2016-04-22  8:34 UTC (permalink / raw)
  To: Emil Velikov
  Cc: Thomas Hellstrom, Dave Airlie, Michel Dänzer, dri-devel,
	David Howells, Andrzej Hajda, Tomi Valkeinen, Brian Paul,
	Laurent Pinchart, Russell King, Alex Deucher, Daniel Vetter,
	Christian König, Ben Skeggs

On Thu, Apr 21, 2016 at 09:17:13PM +0100, Emil Velikov wrote:
> [Re-sending to the correct mailing list. Apologies if you've seen it already]
> 
> Hi all, David Howells
> 
> Dave Airlie pointed out that "polluting" the headers in a manner as seen 
> with this series might not be too wise. David H, can we hear your view 
> on the topic ?
> 
> Note that these headers are meant to be used by more than just Linux 
> (various BSD and Solaris come to mind), making things more complicated.
> 
> 
> The change:
> 
> 
> As some of you may know there are some subtle distinctions between C and 
> C++ structs/enums, thus one should wrap/annotate them roughly like below.
> 
> 
> ...
> #if defined(__cplusplus)
> extern "C" {
> #endif
> 
> struct foo {
>     int bar;
>     ...
> };
> 
> ...
> 
> #if defined(__cplusplus)
> }
> #endif
> 
> 
> In order to work around the lack of these users can wrap the header 
> inclusion in the same way. For example:
> 
> 
> ...
> #if defined(__cplusplus)
> extern "C" {
> #endif
> 
> #include <i915_drm.h>
> 
> #if defined(__cplusplus)
> }
> #endif
> 
> 
> Yet we should avoid this approach, as it might cause issues [1] [2] [3]. 
> Thus here is a series which systematically updates all the UAPI headers 
> in one go.
> 
> I would prefer if we get this merged in one go. Daniel, is it possible 
> to go through drm-misc ? The series is already based on it.
> 
> Maintainers, does this sound reasonable, can we get a few acks ?

Ack on the concept. I really want that new uapi flows from the kernel,
anything we can do to make conversion to headers suitable for libdrm fully
automatic has my approval - currently we have headaches with divergent
evolution sometimes.

I want this.
-Daniel

> 
> 
> Thanks
> Emil
> 
> [1] http://developers.redhat.com/blog/2016/02/29/why-cstdlib-is-more-complicated-than-you-might-think/
> [2] https://isocpp.org/wiki/faq/mixing-c-and-cpp
> [3] http://www.oracle.com/technetwork/articles/servers-storage-dev/mixingcandcpluspluscode-305840.html
> 
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Cc: Andrzej Hajda <a.hajda@samsung.com>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Cc: Brian Paul <brianp@vmware.com>
> Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
> Cc: Dave Airlie <airlied@redhat.com>
> Cc: David Howells <dhowells@redhat.com>
> Cc: Eric Anholt <eric@anholt.net>
> Cc: Erik Faye-Lund <kusmabite@gmail.com>
> Cc: Gerd Hoffmann <kraxel@redhat.com>
> Cc: Inki Dae <inki.dae@samsung.com>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Cc: Michel Dänzer <michel.daenzer@amd.com>
> Cc: Rob Clark <robdclark@gmail.com>
> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: Sinclair Yeh <syeh@vmware.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Thomas Hellstrom <thellstrom@vmware.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> 
> 
> Emil Velikov (24):
>   drm/amdgpu: add extern C guard for the UAPI header
>   drm/armada: add extern C guard for the UAPI header
>   drm: add extern C guard for the UAPI headers
>   drm/etnaviv: add extern C guard for the UAPI header
>   drm/exynos: add extern C guard for the UAPI header
>   drm/i810: add extern C guard for the UAPI header
>   drm/i915: add extern C guard for the UAPI header
>   drm/mga: add extern C guard for the UAPI header
>   drm/msm: add extern C guard for the UAPI header
>   drm/nouveau: add extern C guard for the UAPI header
>   drm/nouveau: drop drm/ prefix from include
>   drm/omap: add extern C guard for the UAPI header
>   drm/qxl: add extern C guard for the UAPI header
>   drm/qxl: remove XXX comment from the UAPI header
>   drm/r128: add extern C guard for the UAPI header
>   drm/radeon: add extern C guard for the UAPI header
>   drm/savage: add extern C guard for the UAPI header
>   drm/sis: add extern C guard for the UAPI header
>   drm/sis: add missing include drm.h for the UAPI header
>   drm/tegra: add extern C guard for the UAPI header
>   drm/vc4: add extern C guard for the UAPI header
>   drm/via: add extern C guard for the UAPI header
>   drm/virgl: add extern C guard for the UAPI header
>   drm/vmwgfx: add extern C guard for the UAPI header
> 
>  include/uapi/drm/amdgpu_drm.h  |  8 ++++++++
>  include/uapi/drm/armada_drm.h  |  8 ++++++++
>  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 ++++++++
>  include/uapi/drm/etnaviv_drm.h |  8 ++++++++
>  include/uapi/drm/exynos_drm.h  |  8 ++++++++
>  include/uapi/drm/i810_drm.h    |  8 ++++++++
>  include/uapi/drm/i915_drm.h    |  8 ++++++++
>  include/uapi/drm/mga_drm.h     |  8 ++++++++
>  include/uapi/drm/msm_drm.h     |  8 ++++++++
>  include/uapi/drm/nouveau_drm.h | 10 +++++++++-
>  include/uapi/drm/omap_drm.h    |  8 ++++++++
>  include/uapi/drm/qxl_drm.h     |  9 ++++++++-
>  include/uapi/drm/r128_drm.h    |  8 ++++++++
>  include/uapi/drm/radeon_drm.h  |  8 ++++++++
>  include/uapi/drm/savage_drm.h  |  8 ++++++++
>  include/uapi/drm/sis_drm.h     | 10 ++++++++++
>  include/uapi/drm/tegra_drm.h   |  8 ++++++++
>  include/uapi/drm/vc4_drm.h     |  8 ++++++++
>  include/uapi/drm/via_drm.h     |  8 ++++++++
>  include/uapi/drm/virtgpu_drm.h |  8 ++++++++
>  include/uapi/drm/vmwgfx_drm.h  |  9 +++++++++
>  24 files changed, 204 insertions(+), 2 deletions(-)
> 
> -- 
> 2.6.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 06/24] drm/i810: add extern C guard for the UAPI header
  2016-04-21 20:17 ` [PATCH 06/24] drm/i810: " Emil Velikov
@ 2016-04-22  8:36   ` Daniel Vetter
  0 siblings, 0 replies; 42+ messages in thread
From: Daniel Vetter @ 2016-04-22  8:36 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Daniel Vetter, dri-devel

On Thu, Apr 21, 2016 at 09:17:19PM +0100, Emil Velikov wrote:
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> 
> ---
> 
> Daniel,
> 
> Based on earlier chat that his file has never been used by userspace,
> should we just move it for internal usage (to include/drm) ?

The userspace that cares has its own private copy (with different names
even), and this is definitely uapi. I think it should stay in
include/uapi, and maybe for simplicity we simply include it in the set of
headers delivered by libdrm? It certainly doesn't hurt to do so I think.

Ack on this patch, and ack on updating libdrm with it.
-Daniel

> 
> Regards,
> Emil
> ---
>  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 bdb0287..6e6cf86 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_ */
> -- 
> 2.6.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 19/24] drm/sis: add missing include drm.h for the UAPI header
  2016-04-21 20:17 ` [PATCH 19/24] drm/sis: add missing include drm.h " Emil Velikov
@ 2016-04-22  8:37   ` Daniel Vetter
  2016-04-26 23:37     ` Dave Airlie
  0 siblings, 1 reply; 42+ messages in thread
From: Daniel Vetter @ 2016-04-22  8:37 UTC (permalink / raw)
  To: Emil Velikov; +Cc: dri-devel

On Thu, Apr 21, 2016 at 09:17:32PM +0100, Emil Velikov wrote:
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

If the extern C stuff falls through, maybe we want to pull this one out
ahead?
-Daniel

> ---
>  include/uapi/drm/sis_drm.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/include/uapi/drm/sis_drm.h b/include/uapi/drm/sis_drm.h
> index 3f7d8ca..3e3f7e9 100644
> --- a/include/uapi/drm/sis_drm.h
> +++ b/include/uapi/drm/sis_drm.h
> @@ -27,6 +27,8 @@
>  #ifndef __SIS_DRM_H__
>  #define __SIS_DRM_H__
>  
> +#include "drm.h"
> +
>  #if defined(__cplusplus)
>  extern "C" {
>  #endif
> -- 
> 2.6.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 20/24] drm/tegra: add extern C guard for the UAPI header
  2016-04-21 20:17 ` [PATCH 20/24] drm/tegra: add extern C guard " Emil Velikov
@ 2016-04-22 12:02   ` Thierry Reding
  0 siblings, 0 replies; 42+ messages in thread
From: Thierry Reding @ 2016-04-22 12:02 UTC (permalink / raw)
  To: Emil Velikov; +Cc: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 343 bytes --]

On Thu, Apr 21, 2016 at 09:17:33PM +0100, Emil Velikov wrote:
> Cc: Erik Faye-Lund <kusmabite@gmail.com>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> ---
>  include/uapi/drm/tegra_drm.h | 8 ++++++++
>  1 file changed, 8 insertions(+)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 19/24] drm/sis: add missing include drm.h for the UAPI header
  2016-04-22  8:37   ` Daniel Vetter
@ 2016-04-26 23:37     ` Dave Airlie
  2016-04-27 21:36       ` Emil Velikov
  0 siblings, 1 reply; 42+ messages in thread
From: Dave Airlie @ 2016-04-26 23:37 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Emil Velikov, dri-devel

On 22 April 2016 at 18:37, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Thu, Apr 21, 2016 at 09:17:32PM +0100, Emil Velikov wrote:
>> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>
> If the extern C stuff falls through, maybe we want to pull this one out
> ahead?

I've pulled this and the qxl one into -next as I was driving past.

Dave.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 00/24] drm: add extern C guard for the UAPI headers
  2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
                   ` (24 preceding siblings ...)
  2016-04-22  8:34 ` [PATCH 00/24] drm: add extern C guard for the UAPI headers Daniel Vetter
@ 2016-04-27  9:47 ` Russell King - ARM Linux
  2016-04-27 21:45   ` Emil Velikov
  25 siblings, 1 reply; 42+ messages in thread
From: Russell King - ARM Linux @ 2016-04-27  9:47 UTC (permalink / raw)
  To: Emil Velikov
  Cc: dri-devel, David Howells, Laurent Pinchart, Daniel Vetter,
	Thomas Hellstrom, Tomi Valkeinen, Brian Paul, Ben Skeggs,
	Dave Airlie, Andrzej Hajda, Michel Dänzer, Alex Deucher,
	Christian König

On Thu, Apr 21, 2016 at 09:17:13PM +0100, Emil Velikov wrote:
> Dave Airlie pointed out that "polluting" the headers in a manner as seen 
> with this series might not be too wise. David H, can we hear your view 
> on the topic ?

For armada and etnaviv, it seems sensible, so I'd be happy to see the
change go in if it means less work for others.

Hence, for patch 2 and 4,

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 04/24] drm/etnaviv: add extern C guard for the UAPI header
  2016-04-21 20:17 ` [PATCH 04/24] drm/etnaviv: add extern C guard for the UAPI header Emil Velikov
@ 2016-04-27 15:13   ` Christian Gmeiner
  0 siblings, 0 replies; 42+ messages in thread
From: Christian Gmeiner @ 2016-04-27 15:13 UTC (permalink / raw)
  To: Emil Velikov; +Cc: Russell King, DRI mailing list

2016-04-21 22:17 GMT+02:00 Emil Velikov <emil.l.velikov@gmail.com>:
> Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> Cc: Lucas Stach <l.stach@pengutronix.de>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

Acked-by: Christian Gmeiner <christian.gmeiner@gmail.com>

> ---
>  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 f95e1c4..2584c1c 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__ */
> --
> 2.6.2
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 19/24] drm/sis: add missing include drm.h for the UAPI header
  2016-04-26 23:37     ` Dave Airlie
@ 2016-04-27 21:36       ` Emil Velikov
  0 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-27 21:36 UTC (permalink / raw)
  To: Dave Airlie; +Cc: dri-devel

On 27 April 2016 at 00:37, Dave Airlie <airlied@gmail.com> wrote:
> On 22 April 2016 at 18:37, Daniel Vetter <daniel@ffwll.ch> wrote:
>> On Thu, Apr 21, 2016 at 09:17:32PM +0100, Emil Velikov wrote:
>>> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
>>
>> If the extern C stuff falls through, maybe we want to pull this one out
>> ahead?
>
> I've pulled this and the qxl one into -next as I was driving past.
>
Nice one. Thanks Dave.

-Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 00/24] drm: add extern C guard for the UAPI headers
  2016-04-27  9:47 ` Russell King - ARM Linux
@ 2016-04-27 21:45   ` Emil Velikov
  2016-04-27 21:57     ` Dave Airlie
                       ` (2 more replies)
  0 siblings, 3 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-27 21:45 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: ML dri-devel, David Howells, Laurent Pinchart, Daniel Vetter,
	Thomas Hellstrom, Tomi Valkeinen, Brian Paul, Ben Skeggs,
	Dave Airlie, Andrzej Hajda, Michel Dänzer, Alex Deucher,
	Christian König

On 27 April 2016 at 10:47, Russell King - ARM Linux
<linux@arm.linux.org.uk> wrote:
> On Thu, Apr 21, 2016 at 09:17:13PM +0100, Emil Velikov wrote:
>> Dave Airlie pointed out that "polluting" the headers in a manner as seen
>> with this series might not be too wise. David H, can we hear your view
>> on the topic ?
>
> For armada and etnaviv, it seems sensible, so I'd be happy to see the
> change go in if it means less work for others.
>
> Hence, for patch 2 and 4,
>
> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
>
Thank you Russel !


Dave, David H,

So far we've got 6 (if we count the one Rob gave over IRC) acks on the topic.

How do we proceed with this - would you like me to elaborate more on
the topic, do you see some serious downfalls with the proposal ? [And
yes I agree that tweaking the generator scripts to produce these might
be better but that's a bit out of my reach atm]

If you are OK should we merge the series via drm-next or danvet's
drm-misc ? ... once I we hear from a few more people of course -
mainly AMD and Ben.

Regards,
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 00/24] drm: add extern C guard for the UAPI headers
  2016-04-27 21:45   ` Emil Velikov
@ 2016-04-27 21:57     ` Dave Airlie
  2016-04-27 22:40       ` Emil Velikov
  2016-04-28 13:19     ` Alex Deucher
  2016-04-28 14:11     ` Russell King - ARM Linux
  2 siblings, 1 reply; 42+ messages in thread
From: Dave Airlie @ 2016-04-27 21:57 UTC (permalink / raw)
  To: Emil Velikov
  Cc: Thomas Hellstrom, Russell King - ARM Linux, Michel Dänzer,
	ML dri-devel, David Howells, Andrzej Hajda, Tomi Valkeinen,
	Brian Paul, Laurent Pinchart, Dave Airlie, Alex Deucher,
	Daniel Vetter, Christian König, Ben Skeggs

On 28 April 2016 at 07:45, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> On 27 April 2016 at 10:47, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
>> On Thu, Apr 21, 2016 at 09:17:13PM +0100, Emil Velikov wrote:
>>> Dave Airlie pointed out that "polluting" the headers in a manner as seen
>>> with this series might not be too wise. David H, can we hear your view
>>> on the topic ?
>>
>> For armada and etnaviv, it seems sensible, so I'd be happy to see the
>> change go in if it means less work for others.
>>
>> Hence, for patch 2 and 4,
>>
>> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
>>
> Thank you Russel !
>
>
> Dave, David H,
>
> So far we've got 6 (if we count the one Rob gave over IRC) acks on the topic.
>
> How do we proceed with this - would you like me to elaborate more on
> the topic, do you see some serious downfalls with the proposal ? [And
> yes I agree that tweaking the generator scripts to produce these might
> be better but that's a bit out of my reach atm]
>
> If you are OK should we merge the series via drm-next or danvet's
> drm-misc ? ... once I we hear from a few more people of course -
> mainly AMD and Ben.
>

I still think this should be all or nothing, I don't see why the drm headers
are special here. So I'd still prefer the kernel add this to all uapi headers
when it generates them rather than us manually adding it to all of them,
and forgetting when we add new ones.

Dave.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 00/24] drm: add extern C guard for the UAPI headers
  2016-04-27 21:57     ` Dave Airlie
@ 2016-04-27 22:40       ` Emil Velikov
  0 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-27 22:40 UTC (permalink / raw)
  To: Dave Airlie
  Cc: Thomas Hellstrom, Russell King - ARM Linux, Michel Dänzer,
	ML dri-devel, David Howells, Andrzej Hajda, Tomi Valkeinen,
	Brian Paul, Laurent Pinchart, Dave Airlie, Alex Deucher,
	Daniel Vetter, Christian König, Ben Skeggs

On 27 April 2016 at 22:57, Dave Airlie <airlied@gmail.com> wrote:
> On 28 April 2016 at 07:45, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>> On 27 April 2016 at 10:47, Russell King - ARM Linux
>> <linux@arm.linux.org.uk> wrote:
>>> On Thu, Apr 21, 2016 at 09:17:13PM +0100, Emil Velikov wrote:
>>>> Dave Airlie pointed out that "polluting" the headers in a manner as seen
>>>> with this series might not be too wise. David H, can we hear your view
>>>> on the topic ?
>>>
>>> For armada and etnaviv, it seems sensible, so I'd be happy to see the
>>> change go in if it means less work for others.
>>>
>>> Hence, for patch 2 and 4,
>>>
>>> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
>>>
>> Thank you Russel !
>>
>>
>> Dave, David H,
>>
>> So far we've got 6 (if we count the one Rob gave over IRC) acks on the topic.
>>
>> How do we proceed with this - would you like me to elaborate more on
>> the topic, do you see some serious downfalls with the proposal ? [And
>> yes I agree that tweaking the generator scripts to produce these might
>> be better but that's a bit out of my reach atm]
>>
>> If you are OK should we merge the series via drm-next or danvet's
>> drm-misc ? ... once I we hear from a few more people of course -
>> mainly AMD and Ben.
>>
>
> I still think this should be all or nothing, I don't see why the drm headers
> are special here. So I'd still prefer the kernel add this to all uapi headers
> when it generates them rather than us manually adding it to all of them,
> and forgetting when we add new ones.
>
If you want to pursue and beat the logic into `make headers_install'
do by all means. That will be amazing.
Until that lands can we get this workaround in ? There are a handful
other tweaks that I would love to crack on with.

Like beating some sense into the DDX(en), X and a few others to stop
using the legacy DRM codepaths.

Fwiw I can vouch that on DRM side things won't end up out of
date/sync. As you can see I've been even prompt in nagging people
about MAINTAINERS entries and controversial (?) DRM UAPI changes ;-)


Thanks
Emil
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 12/24] drm/omap: add extern C guard for the UAPI header
  2016-04-21 20:17 ` [PATCH 12/24] drm/omap: add extern C guard for the UAPI header Emil Velikov
@ 2016-04-28  8:18   ` Tomi Valkeinen
  0 siblings, 0 replies; 42+ messages in thread
From: Tomi Valkeinen @ 2016-04-28  8:18 UTC (permalink / raw)
  To: Emil Velikov, dri-devel; +Cc: Laurent Pinchart


[-- Attachment #1.1.1: Type: text/plain, Size: 1163 bytes --]


On 21/04/16 23:17, Emil Velikov wrote:
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
> ---
>  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 38a3bd8..407cb55 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__ */
> 

Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

 Tomi


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 00/24] drm: add extern C guard for the UAPI headers
  2016-04-27 21:45   ` Emil Velikov
  2016-04-27 21:57     ` Dave Airlie
@ 2016-04-28 13:19     ` Alex Deucher
  2016-04-28 22:58       ` Ben Skeggs
  2016-04-28 14:11     ` Russell King - ARM Linux
  2 siblings, 1 reply; 42+ messages in thread
From: Alex Deucher @ 2016-04-28 13:19 UTC (permalink / raw)
  To: Emil Velikov
  Cc: Thomas Hellstrom, Russell King - ARM Linux, Michel Dänzer,
	ML dri-devel, David Howells, Andrzej Hajda, Tomi Valkeinen,
	Brian Paul, Laurent Pinchart, Dave Airlie, Alex Deucher,
	Daniel Vetter, Christian König, Ben Skeggs

On Wed, Apr 27, 2016 at 5:45 PM, Emil Velikov <emil.l.velikov@gmail.com> wrote:
> On 27 April 2016 at 10:47, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
>> On Thu, Apr 21, 2016 at 09:17:13PM +0100, Emil Velikov wrote:
>>> Dave Airlie pointed out that "polluting" the headers in a manner as seen
>>> with this series might not be too wise. David H, can we hear your view
>>> on the topic ?
>>
>> For armada and etnaviv, it seems sensible, so I'd be happy to see the
>> change go in if it means less work for others.
>>
>> Hence, for patch 2 and 4,
>>
>> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
>>
> Thank you Russel !
>
>
> Dave, David H,
>
> So far we've got 6 (if we count the one Rob gave over IRC) acks on the topic.
>
> How do we proceed with this - would you like me to elaborate more on
> the topic, do you see some serious downfalls with the proposal ? [And
> yes I agree that tweaking the generator scripts to produce these might
> be better but that's a bit out of my reach atm]
>
> If you are OK should we merge the series via drm-next or danvet's
> drm-misc ? ... once I we hear from a few more people of course -
> mainly AMD and Ben.

No objections here.

Alex


>
> Regards,
> Emil
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 00/24] drm: add extern C guard for the UAPI headers
  2016-04-27 21:45   ` Emil Velikov
  2016-04-27 21:57     ` Dave Airlie
  2016-04-28 13:19     ` Alex Deucher
@ 2016-04-28 14:11     ` Russell King - ARM Linux
  2 siblings, 0 replies; 42+ messages in thread
From: Russell King - ARM Linux @ 2016-04-28 14:11 UTC (permalink / raw)
  To: Emil Velikov
  Cc: ML dri-devel, David Howells, Laurent Pinchart, Daniel Vetter,
	Thomas Hellstrom, Tomi Valkeinen, Brian Paul, Ben Skeggs,
	Dave Airlie, Andrzej Hajda, Michel Dänzer, Alex Deucher,
	Christian König

On Wed, Apr 27, 2016 at 10:45:54PM +0100, Emil Velikov wrote:
> On 27 April 2016 at 10:47, Russell King - ARM Linux
> <linux@arm.linux.org.uk> wrote:
> > On Thu, Apr 21, 2016 at 09:17:13PM +0100, Emil Velikov wrote:
> >> Dave Airlie pointed out that "polluting" the headers in a manner as seen
> >> with this series might not be too wise. David H, can we hear your view
> >> on the topic ?
> >
> > For armada and etnaviv, it seems sensible, so I'd be happy to see the
> > change go in if it means less work for others.
> >
> > Hence, for patch 2 and 4,
> >
> > Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
> >
> Thank you Russel !

While I was away on a long weekend, I was talking to a TV programme
editor who occasionally suffers from his name being spelt incorrectly
in TV credits.  Like me, he feels that this is very disrespectful.

Please take more care when spelling names.

-- 
RMK's Patch system: http://www.arm.linux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 00/24] drm: add extern C guard for the UAPI headers
  2016-04-28 13:19     ` Alex Deucher
@ 2016-04-28 22:58       ` Ben Skeggs
  0 siblings, 0 replies; 42+ messages in thread
From: Ben Skeggs @ 2016-04-28 22:58 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1753 bytes --]

On 04/28/2016 11:19 PM, Alex Deucher wrote:
> On Wed, Apr 27, 2016 at 5:45 PM, Emil Velikov <emil.l.velikov@gmail.com> wrote:
>> On 27 April 2016 at 10:47, Russell King - ARM Linux
>> <linux@arm.linux.org.uk> wrote:
>>> On Thu, Apr 21, 2016 at 09:17:13PM +0100, Emil Velikov wrote:
>>>> Dave Airlie pointed out that "polluting" the headers in a manner as seen
>>>> with this series might not be too wise. David H, can we hear your view
>>>> on the topic ?
>>>
>>> For armada and etnaviv, it seems sensible, so I'd be happy to see the
>>> change go in if it means less work for others.
>>>
>>> Hence, for patch 2 and 4,
>>>
>>> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
>>>
>> Thank you Russel !
>>
>>
>> Dave, David H,
>>
>> So far we've got 6 (if we count the one Rob gave over IRC) acks on the topic.
>>
>> How do we proceed with this - would you like me to elaborate more on
>> the topic, do you see some serious downfalls with the proposal ? [And
>> yes I agree that tweaking the generator scripts to produce these might
>> be better but that's a bit out of my reach atm]
>>
>> If you are OK should we merge the series via drm-next or danvet's
>> drm-misc ? ... once I we hear from a few more people of course -
>> mainly AMD and Ben.
> 
> No objections here.
Acked-by: Ben Skeggs <bskeggs@redhat.com>

> 
> Alex
> 
> 
>>
>> Regards,
>> Emil
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
> 


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 42+ messages in thread

* Re: [PATCH 00/24] drm: add extern C guard for the UAPI headers
       [not found] ` <1461267765-10785-1-git-send-email-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2016-04-21 19:49   ` Emil Velikov
  0 siblings, 0 replies; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 19:49 UTC (permalink / raw)
  To: ML nouveau
  Cc: Erik Faye-Lund, Emil Velikov, Eric Anholt, Laurent Pinchart,
	Daniel Vetter, Thomas Hellstrom, Sinclair Yeh, Tomi Valkeinen,
	Brian Paul, Ben Skeggs, Russell King, Jani Nikula, Inki Dae,
	Christian Gmeiner, Dave Airlie, Gerd Hoffmann, Andrzej Hajda,
	Michel Dänzer, Rob Clark, Alex Deucher,
	Christian König, Lucas Stach

Oops seems like I got my wires shorted and this ended up on the wrong list.
It was aimed at dri-devel@ but landed in nouveau@

Apologies for the noise/spam.

Emil
_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 42+ messages in thread

* [PATCH 00/24] drm: add extern C guard for the UAPI headers
@ 2016-04-21 19:42 Emil Velikov
       [not found] ` <1461267765-10785-1-git-send-email-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 42+ messages in thread
From: Emil Velikov @ 2016-04-21 19:42 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Erik Faye-Lund, emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w,
	Eric Anholt, Laurent Pinchart, Daniel Vetter, Thomas Hellstrom,
	Sinclair Yeh, Tomi Valkeinen, Brian Paul, Ben Skeggs,
	Russell King, Jani Nikula, Inki Dae, Christian Gmeiner,
	Dave Airlie, Gerd Hoffmann, Andrzej Hajda, Michel Dänzer,
	Rob Clark, Alex Deucher, Christian König, Lucas Stach

Hi all,

As some of you may know there some subtle distinction between C and C++ 
structs, thus one should wrap/annotate them roughly like below.


...
#if defined(__cplusplus)
extern "C" {
#endif

struct foo {
    int bar;
    ...
};

...

#if defined(__cplusplus)
}
#endif


In order to work around the lack of these users can wrap the header 
inclusion in the same way. For example:


...
#if defined(__cplusplus)
extern "C" {
#endif

#include <i915_drm.h>

#if defined(__cplusplus)
}
#endif


Yet we should avoid this approach, as it might cause issues [1] [2] [3]. 
Thus here is a series which systematically updates all the UAPI headers 
in one go.

I would prefer if we get this merged in one go. Daniel, is it possible 
to go through drm-misc ? The series is already based on it.

Maintainers, does this sound reasonable, can we get a few acks ?


Thanks
Emil

[1] http://developers.redhat.com/blog/2016/02/29/why-cstdlib-is-more-complicated-than-you-might-think/
[2] https://isocpp.org/wiki/faq/mixing-c-and-cpp
[3] http://www.oracle.com/technetwork/articles/servers-storage-dev/mixingcandcpluspluscode-305840.html

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: Brian Paul <brianp@vmware.com>
Cc: Christian Gmeiner <christian.gmeiner@gmail.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Eric Anholt <eric@anholt.net>
Cc: Erik Faye-Lund <kusmabite@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Inki Dae <inki.dae@samsung.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Michel Dänzer <michel.daenzer@amd.com>
Cc: Rob Clark <robdclark@gmail.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Sinclair Yeh <syeh@vmware.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>


Emil Velikov (24):
  drm/amdgpu: add extern C guard for the UAPI header
  drm/armada: add extern C guard for the UAPI header
  drm: add extern C guard for the UAPI headers
  drm/etnaviv: add extern C guard for the UAPI header
  drm/exynos: add extern C guard for the UAPI header
  drm/i810: add extern C guard for the UAPI header
  drm/i915: add extern C guard for the UAPI header
  drm/mga: add extern C guard for the UAPI header
  drm/msm: add extern C guard for the UAPI header
  drm/nouveau: add extern C guard for the UAPI header
  drm/nouveau: drop drm/ prefix from include
  drm/omap: add extern C guard for the UAPI header
  drm/qxl: add extern C guard for the UAPI header
  drm/qxl: remove XXX comment from the UAPI header
  drm/r128: add extern C guard for the UAPI header
  drm/radeon: add extern C guard for the UAPI header
  drm/savage: add extern C guard for the UAPI header
  drm/sis: add extern C guard for the UAPI header
  drm/sis: add missing include drm.h for the UAPI header
  drm/tegra: add extern C guard for the UAPI header
  drm/vc4: add extern C guard for the UAPI header
  drm/via: add extern C guard for the UAPI header
  drm/virgl: add extern C guard for the UAPI header
  drm/vmwgfx: add extern C guard for the UAPI header

 include/uapi/drm/amdgpu_drm.h  |  8 ++++++++
 include/uapi/drm/armada_drm.h  |  8 ++++++++
 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 ++++++++
 include/uapi/drm/etnaviv_drm.h |  8 ++++++++
 include/uapi/drm/exynos_drm.h  |  8 ++++++++
 include/uapi/drm/i810_drm.h    |  8 ++++++++
 include/uapi/drm/i915_drm.h    |  8 ++++++++
 include/uapi/drm/mga_drm.h     |  8 ++++++++
 include/uapi/drm/msm_drm.h     |  8 ++++++++
 include/uapi/drm/nouveau_drm.h | 10 +++++++++-
 include/uapi/drm/omap_drm.h    |  8 ++++++++
 include/uapi/drm/qxl_drm.h     |  9 ++++++++-
 include/uapi/drm/r128_drm.h    |  8 ++++++++
 include/uapi/drm/radeon_drm.h  |  8 ++++++++
 include/uapi/drm/savage_drm.h  |  8 ++++++++
 include/uapi/drm/sis_drm.h     | 10 ++++++++++
 include/uapi/drm/tegra_drm.h   |  8 ++++++++
 include/uapi/drm/vc4_drm.h     |  8 ++++++++
 include/uapi/drm/via_drm.h     |  8 ++++++++
 include/uapi/drm/virtgpu_drm.h |  8 ++++++++
 include/uapi/drm/vmwgfx_drm.h  |  9 +++++++++
 24 files changed, 204 insertions(+), 2 deletions(-)

-- 
2.6.2

_______________________________________________
Nouveau mailing list
Nouveau@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2016-04-28 22:56 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-21 20:17 [PATCH 00/24] drm: add extern C guard for the UAPI headers Emil Velikov
2016-04-21 20:17 ` [PATCH 01/24] drm/amdgpu: add extern C guard for the UAPI header Emil Velikov
2016-04-21 20:17 ` [PATCH 02/24] drm/armada: " Emil Velikov
2016-04-21 20:17 ` [PATCH 03/24] drm: add extern C guard for the UAPI headers Emil Velikov
2016-04-21 20:17 ` [PATCH 04/24] drm/etnaviv: add extern C guard for the UAPI header Emil Velikov
2016-04-27 15:13   ` Christian Gmeiner
2016-04-21 20:17 ` [PATCH 05/24] drm/exynos: " Emil Velikov
2016-04-21 20:17 ` [PATCH 06/24] drm/i810: " Emil Velikov
2016-04-22  8:36   ` Daniel Vetter
2016-04-21 20:17 ` [PATCH 07/24] drm/i915: " Emil Velikov
2016-04-21 20:17 ` [PATCH 08/24] drm/mga: " Emil Velikov
2016-04-21 20:17 ` [PATCH 09/24] drm/msm: " Emil Velikov
2016-04-21 20:17 ` [PATCH 10/24] drm/nouveau: " Emil Velikov
2016-04-21 20:17 ` [PATCH 11/24] drm/nouveau: drop drm/ prefix from include Emil Velikov
2016-04-21 20:17 ` [PATCH 12/24] drm/omap: add extern C guard for the UAPI header Emil Velikov
2016-04-28  8:18   ` Tomi Valkeinen
2016-04-21 20:17 ` [PATCH 13/24] drm/qxl: " Emil Velikov
2016-04-21 20:17 ` [PATCH 14/24] drm/qxl: remove XXX comment from " Emil Velikov
2016-04-21 20:17 ` [PATCH 15/24] drm/r128: add extern C guard for " Emil Velikov
2016-04-21 20:17 ` [PATCH 16/24] drm/radeon: " Emil Velikov
2016-04-21 20:17 ` [PATCH 17/24] drm/savage: " Emil Velikov
2016-04-21 20:17 ` [PATCH 18/24] drm/sis: " Emil Velikov
2016-04-21 20:17 ` [PATCH 19/24] drm/sis: add missing include drm.h " Emil Velikov
2016-04-22  8:37   ` Daniel Vetter
2016-04-26 23:37     ` Dave Airlie
2016-04-27 21:36       ` Emil Velikov
2016-04-21 20:17 ` [PATCH 20/24] drm/tegra: add extern C guard " Emil Velikov
2016-04-22 12:02   ` Thierry Reding
2016-04-21 20:17 ` [PATCH 21/24] drm/vc4: " Emil Velikov
2016-04-21 20:17 ` [PATCH 22/24] drm/via: " Emil Velikov
2016-04-21 20:17 ` [PATCH 23/24] drm/virgl: " Emil Velikov
2016-04-21 20:17 ` [PATCH 24/24] drm/vmwgfx: " Emil Velikov
2016-04-22  8:34 ` [PATCH 00/24] drm: add extern C guard for the UAPI headers Daniel Vetter
2016-04-27  9:47 ` Russell King - ARM Linux
2016-04-27 21:45   ` Emil Velikov
2016-04-27 21:57     ` Dave Airlie
2016-04-27 22:40       ` Emil Velikov
2016-04-28 13:19     ` Alex Deucher
2016-04-28 22:58       ` Ben Skeggs
2016-04-28 14:11     ` Russell King - ARM Linux
  -- strict thread matches above, loose matches on Subject: below --
2016-04-21 19:42 Emil Velikov
     [not found] ` <1461267765-10785-1-git-send-email-emil.l.velikov-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-04-21 19:49   ` Emil Velikov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.