virtual is a protected keyword in C++ and can't be used at all. Ugh.
This aligns the kernel versions of the drm headers with the ones in libdrm.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com --- include/uapi/drm/drm.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index a0ebfe7c9a28..d299c7749091 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -373,7 +373,11 @@ struct drm_buf_pub { */ struct drm_buf_map { int count; /**< Length of the buffer list */ +#ifdef __cplusplus + void *virt; +#else void __user *virtual; /**< Mmap'd area in user-virtual */ +#endif struct drm_buf_pub __user *list; /**< Buffer information */ };
We can't use <drm/*.h> because that upsets the serach paths in libdrm. Also, drop the circular inclusion in drm_mode.h.
v2: Actually change the right headers.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com --- include/uapi/drm/drm.h | 2 +- include/uapi/drm/drm_mode.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index d299c7749091..c7ecc3abff03 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -685,7 +685,7 @@ struct drm_prime_handle { __s32 fd; };
-#include <drm/drm_mode.h> +#include "drm_mode.h"
#define DRM_IOCTL_BASE 'd' #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index c0217434d28d..db106ab01039 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -27,8 +27,6 @@ #ifndef _DRM_MODE_H #define _DRM_MODE_H
-#include "drm.h" - #define DRM_DISPLAY_INFO_LEN 32 #define DRM_CONNECTOR_NAME_LEN 32 #define DRM_DISPLAY_MODE_LEN 32
On 30 March 2016 at 15:19, Daniel Vetter daniel.vetter@ffwll.ch wrote:
We can't use <drm/*.h> because that upsets the serach paths in libdrm. Also, drop the circular inclusion in drm_mode.h.
v2: Actually change the right headers.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com
include/uapi/drm/drm.h | 2 +- include/uapi/drm/drm_mode.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index d299c7749091..c7ecc3abff03 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -685,7 +685,7 @@ struct drm_prime_handle { __s32 fd; };
-#include <drm/drm_mode.h> +#include "drm_mode.h"
#define DRM_IOCTL_BASE 'd' #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index c0217434d28d..db106ab01039 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -27,8 +27,6 @@ #ifndef _DRM_MODE_H #define _DRM_MODE_H
-#include "drm.h"
I'm thinking about the complete inverse actually.
Any program that depends on drm_mode.h but does not include it explicitly is severely broken. On the other hand, we rely on the drm.h to resolve the linux specific types (for non-linux platforms).
Unfortunately I've not looked how much busted userspace there is in either case (this patch vs my suggestion).
-Emil
On Wed, Mar 30, 2016 at 04:05:20PM +0100, Emil Velikov wrote:
On 30 March 2016 at 15:19, Daniel Vetter daniel.vetter@ffwll.ch wrote:
We can't use <drm/*.h> because that upsets the serach paths in libdrm. Also, drop the circular inclusion in drm_mode.h.
v2: Actually change the right headers.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com
include/uapi/drm/drm.h | 2 +- include/uapi/drm/drm_mode.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index d299c7749091..c7ecc3abff03 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -685,7 +685,7 @@ struct drm_prime_handle { __s32 fd; };
-#include <drm/drm_mode.h> +#include "drm_mode.h"
#define DRM_IOCTL_BASE 'd' #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index c0217434d28d..db106ab01039 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -27,8 +27,6 @@ #ifndef _DRM_MODE_H #define _DRM_MODE_H
-#include "drm.h"
I'm thinking about the complete inverse actually.
Any program that depends on drm_mode.h but does not include it explicitly is severely broken. On the other hand, we rely on the drm.h to resolve the linux specific types (for non-linux platforms).
Unfortunately I've not looked how much busted userspace there is in either case (this patch vs my suggestion).
Well I was just blindly aligning the #includes to match what we have right now in libdrm. That's the safest option really. It would be nice to untangle this, but I think it's too late for that now :( -Daniel
On 30 March 2016 at 16:11, Daniel Vetter daniel@ffwll.ch wrote:
On Wed, Mar 30, 2016 at 04:05:20PM +0100, Emil Velikov wrote:
On 30 March 2016 at 15:19, Daniel Vetter daniel.vetter@ffwll.ch wrote:
We can't use <drm/*.h> because that upsets the serach paths in libdrm. Also, drop the circular inclusion in drm_mode.h.
v2: Actually change the right headers.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com
include/uapi/drm/drm.h | 2 +- include/uapi/drm/drm_mode.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index d299c7749091..c7ecc3abff03 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -685,7 +685,7 @@ struct drm_prime_handle { __s32 fd; };
-#include <drm/drm_mode.h> +#include "drm_mode.h"
#define DRM_IOCTL_BASE 'd' #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index c0217434d28d..db106ab01039 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -27,8 +27,6 @@ #ifndef _DRM_MODE_H #define _DRM_MODE_H
-#include "drm.h"
I'm thinking about the complete inverse actually.
Any program that depends on drm_mode.h but does not include it explicitly is severely broken. On the other hand, we rely on the drm.h to resolve the linux specific types (for non-linux platforms).
Unfortunately I've not looked how much busted userspace there is in either case (this patch vs my suggestion).
Well I was just blindly aligning the #includes to match what we have right now in libdrm. That's the safest option really. It would be nice to untangle this, but I think it's too late for that now :(
Sadly that's the case. As I doubt anyone is interested in seeing existing userspace burn (fail to build), so let's keep the drm_mode.h. Although let's also keep the drm.h include - it's a way to of being nice to devs so that they don't need nasty workarounds.
Thanks Emil
We can't use <drm/*.h> because that upsets the serach paths in libdrm. Also, drop the circular inclusion in drm_mode.h.
v2: Actually change the right headers.
v3: Drop the #include removal per Emil's request.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com --- include/uapi/drm/drm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 7d42d105f32a..85ada499574b 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -685,7 +685,7 @@ struct drm_prime_handle { __s32 fd; };
-#include <drm/drm_mode.h> +#include "drm_mode.h"
#define DRM_IOCTL_BASE 'd' #define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
On 30 March 2016 at 16:54, Daniel Vetter daniel.vetter@ffwll.ch wrote:
We can't use <drm/*.h> because that upsets the serach paths in libdrm. Also, drop the circular inclusion in drm_mode.h.
v2: Actually change the right headers.
v3: Drop the #include removal per Emil's request.
Thanks.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com
Reviewed-by: Emil Velikov emil.l.velikov@gmail.com
-Emil
These type defines are officially part of the uapi, but ended up in the wrong headers somehow when we split them all.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com --- include/drm/drm_crtc.h | 10 ---------- include/uapi/drm/drm_mode.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index bc7fbb572155..8cb377c5eb93 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h @@ -45,16 +45,6 @@ struct drm_clip_rect; struct device_node; struct fence;
-#define DRM_MODE_OBJECT_CRTC 0xcccccccc -#define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0 -#define DRM_MODE_OBJECT_ENCODER 0xe0e0e0e0 -#define DRM_MODE_OBJECT_MODE 0xdededede -#define DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0 -#define DRM_MODE_OBJECT_FB 0xfbfbfbfb -#define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb -#define DRM_MODE_OBJECT_PLANE 0xeeeeeeee -#define DRM_MODE_OBJECT_ANY 0 - struct drm_mode_object { uint32_t id; uint32_t type; diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index db106ab01039..8c48c0a558c0 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -318,6 +318,16 @@ struct drm_mode_connector_set_property { __u32 connector_id; };
+#define DRM_MODE_OBJECT_CRTC 0xcccccccc +#define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0 +#define DRM_MODE_OBJECT_ENCODER 0xe0e0e0e0 +#define DRM_MODE_OBJECT_MODE 0xdededede +#define DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0 +#define DRM_MODE_OBJECT_FB 0xfbfbfbfb +#define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb +#define DRM_MODE_OBJECT_PLANE 0xeeeeeeee +#define DRM_MODE_OBJECT_ANY 0 + struct drm_mode_obj_get_properties { __u64 props_ptr; __u64 prop_values_ptr;
On 30 March 2016 at 15:19, Daniel Vetter daniel.vetter@ffwll.ch wrote:
These type defines are officially part of the uapi, but ended up in the wrong headers somehow when we split them all.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com
The way it was done originally (by Paulo) with commit c543188afb7a83e66161c026dc6fd5eb38dc0b63 it seemed deliberate. At the same time the libdrm got a different treatment 8c75703df0fdf65b3851f8eb5822705638decff3. Would be swell Paulo can confirm (re: unintentional or deliberate difference), if he recalls any of this :-)
Barring any objections from Paulo Reviewed-by: Emil Velikov emil.l.velikov@gmail.com
-Emil
2016-03-30 13:07 GMT-03:00 Emil Velikov emil.l.velikov@gmail.com:
On 30 March 2016 at 15:19, Daniel Vetter daniel.vetter@ffwll.ch wrote:
These type defines are officially part of the uapi, but ended up in the wrong headers somehow when we split them all.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com
The way it was done originally (by Paulo) with commit c543188afb7a83e66161c026dc6fd5eb38dc0b63 it seemed deliberate. At the same time the libdrm got a different treatment 8c75703df0fdf65b3851f8eb5822705638decff3. Would be swell Paulo can confirm (re: unintentional or deliberate difference), if he recalls any of this :-)
Barring any objections from Paulo
No objections from Paulo. The include/uapi directory didn't even exist at that time, and I guess I was just trying to make things work, without any specific coding philosophy in mind.
Reviewed-by: Emil Velikov emil.l.velikov@gmail.com
-Emil _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
On Wed, Mar 30, 2016 at 02:55:17PM -0300, Paulo Zanoni wrote:
2016-03-30 13:07 GMT-03:00 Emil Velikov emil.l.velikov@gmail.com:
On 30 March 2016 at 15:19, Daniel Vetter daniel.vetter@ffwll.ch wrote:
These type defines are officially part of the uapi, but ended up in the wrong headers somehow when we split them all.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com
The way it was done originally (by Paulo) with commit c543188afb7a83e66161c026dc6fd5eb38dc0b63 it seemed deliberate. At the same time the libdrm got a different treatment 8c75703df0fdf65b3851f8eb5822705638decff3. Would be swell Paulo can confirm (re: unintentional or deliberate difference), if he recalls any of this :-)
Barring any objections from Paulo
No objections from Paulo. The include/uapi directory didn't even exist at that time, and I guess I was just trying to make things work, without any specific coding philosophy in mind.
Yeah, I suspect that this was actually fumbled in the uapi split-up somehow ... -Daniel
make headers_install can't handle fancy conditions, so let's simplify things for it a bit.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com --- include/uapi/drm/drm.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index c7ecc3abff03..3b56285a7e2a 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -36,7 +36,13 @@ #ifndef _DRM_H_ #define _DRM_H_
-#if defined(__KERNEL__) || defined(__linux__) +#if defined(__KERNEL__) + +#include <linux/types.h> +#include <asm/ioctl.h> +typedef unsigned int drm_handle_t; + +#elif defined(__linux__)
#include <linux/types.h> #include <asm/ioctl.h>
This ports the below libdrm commit to the kernel
commit 0f4452bb51306024fbf4cbf77d8baab20cefba67 Author: Daniel Kurtz djkurtz@chromium.org Date: Mon Aug 26 23:39:16 2013 +0800
libdrm: Make some drm headers compatible with gcc -std=c89 -pedantic
The following minor changes were needed to these headers: * Convert // comments to /* */ * No , after final member of enum
With these changes, these header files can be included by a program that is built with gcc options: -std=c89 -Werror -pedantic
Signed-off-by: Daniel Kurtz djkurtz@chromium.org Signed-off-by: Eric Anholt eric@anholt.net Reviewed-by: Eric Anholt eric@anholt.net
Signed-off-by: Daniel Vetter daniel.vetter@intel.com --- include/uapi/drm/drm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index 3b56285a7e2a..8b41297038aa 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -187,7 +187,7 @@ enum drm_map_type { _DRM_SHM = 2, /**< shared, cached */ _DRM_AGP = 3, /**< AGP/GART */ _DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */ - _DRM_CONSISTENT = 5, /**< Consistent memory for PCI DMA */ + _DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */ };
/** @@ -441,7 +441,7 @@ struct drm_draw { * DRM_IOCTL_UPDATE_DRAW ioctl argument type. */ typedef enum { - DRM_DRAWABLE_CLIPRECTS, + DRM_DRAWABLE_CLIPRECTS } drm_drawable_info_type_t;
struct drm_update_draw {
On 30 March 2016 at 15:42, Daniel Vetter daniel.vetter@ffwll.ch wrote:
This ports the below libdrm commit to the kernel
commit 0f4452bb51306024fbf4cbf77d8baab20cefba67 Author: Daniel Kurtz djkurtz@chromium.org Date: Mon Aug 26 23:39:16 2013 +0800
libdrm: Make some drm headers compatible with gcc -std=c89 -pedantic The following minor changes were needed to these headers: * Convert // comments to /* */ * No , after final member of enum With these changes, these header files can be included by a program that is built with gcc options: -std=c89 -Werror -pedantic Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter daniel.vetter@intel.com
Yes, please :-)
Reviewed-by: Emil Velikov emil.l.velikov@gmail.com
-Emil
On Wed, Mar 30, 2016 at 09:06:33PM +0100, Emil Velikov wrote:
On 30 March 2016 at 15:42, Daniel Vetter daniel.vetter@ffwll.ch wrote:
This ports the below libdrm commit to the kernel
commit 0f4452bb51306024fbf4cbf77d8baab20cefba67 Author: Daniel Kurtz djkurtz@chromium.org Date: Mon Aug 26 23:39:16 2013 +0800
libdrm: Make some drm headers compatible with gcc -std=c89 -pedantic The following minor changes were needed to these headers: * Convert // comments to /* */ * No , after final member of enum With these changes, these header files can be included by a program that is built with gcc options: -std=c89 -Werror -pedantic Signed-off-by: Daniel Kurtz <djkurtz@chromium.org> Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Daniel Vetter daniel.vetter@intel.com
Yes, please :-)
Reviewed-by: Emil Velikov emil.l.velikov@gmail.com
Also applied, thanks for your review. -Daniel
On 30 March 2016 at 15:42, Daniel Vetter daniel.vetter@ffwll.ch wrote:
make headers_install can't handle fancy conditions, so let's simplify things for it a bit.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com
include/uapi/drm/drm.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index c7ecc3abff03..3b56285a7e2a 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -36,7 +36,13 @@ #ifndef _DRM_H_ #define _DRM_H_
-#if defined(__KERNEL__) || defined(__linux__) +#if defined(__KERNEL__)
+#include <linux/types.h> +#include <asm/ioctl.h> +typedef unsigned int drm_handle_t;
+#elif defined(__linux__)
Bit dubious how that used to work, and that the program fails with the original, yet handled "elif defined..." correctly.
Regardless, Reviewed-by: Emil Velikov emil.l.velikov@gmail.com
-Emil
On Wed, Mar 30, 2016 at 04:56:17PM +0100, Emil Velikov wrote:
On 30 March 2016 at 15:42, Daniel Vetter daniel.vetter@ffwll.ch wrote:
make headers_install can't handle fancy conditions, so let's simplify things for it a bit.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com
include/uapi/drm/drm.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index c7ecc3abff03..3b56285a7e2a 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -36,7 +36,13 @@ #ifndef _DRM_H_ #define _DRM_H_
-#if defined(__KERNEL__) || defined(__linux__) +#if defined(__KERNEL__)
+#include <linux/types.h> +#include <asm/ioctl.h> +typedef unsigned int drm_handle_t;
+#elif defined(__linux__)
Bit dubious how that used to work, and that the program fails with the original, yet handled "elif defined..." correctly.
I didn't dare looking into the horror show the script is - still charred from looking too closely at kerneldoc ;-)
Regardless, Reviewed-by: Emil Velikov emil.l.velikov@gmail.com
Thanks for the review, all expect the last one (to make them pendantic compliant, still missing r-b on that) applied to drm-misc. -Daniel
virtual is a protected keyword in C++ and can't be used at all. Ugh.
This aligns the kernel versions of the drm headers with the ones in libdrm.
v2: Also annote with __user, as request by Emil&Ilia.
Cc: Ilia Mirkin imirkin@alum.mit.edu Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com --- include/uapi/drm/drm.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index a0ebfe7c9a28..7d42d105f32a 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -373,7 +373,11 @@ struct drm_buf_pub { */ struct drm_buf_map { int count; /**< Length of the buffer list */ +#ifdef __cplusplus + void __user *virt; +#else void __user *virtual; /**< Mmap'd area in user-virtual */ +#endif struct drm_buf_pub __user *list; /**< Buffer information */ };
On 30 March 2016 at 16:12, Daniel Vetter daniel.vetter@ffwll.ch wrote:
virtual is a protected keyword in C++ and can't be used at all. Ugh.
This aligns the kernel versions of the drm headers with the ones in libdrm.
v2: Also annote with __user, as request by Emil&Ilia.
Reviewed-by: Emil Velikov emil.l.velikov@gmail.com
-Emil
On Wed, 30 Mar 2016 16:19:42 +0200 Daniel Vetter daniel.vetter@ffwll.ch wrote:
virtual is a protected keyword in C++ and can't be used at all. Ugh.
This aligns the kernel versions of the drm headers with the ones in libdrm.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com
include/uapi/drm/drm.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index a0ebfe7c9a28..d299c7749091 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -373,7 +373,11 @@ struct drm_buf_pub { */ struct drm_buf_map { int count; /**< Length of the buffer list */ +#ifdef __cplusplus
- void *virt;
+#else void __user *virtual; /**< Mmap'd area in user-virtual */ +#endif struct drm_buf_pub __user *list; /**< Buffer information */ };
Why not simply rename the field ?
On 6 April 2016 at 16:58, Gabriel Laskar gabriel@lse.epita.fr wrote:
On Wed, 30 Mar 2016 16:19:42 +0200 Daniel Vetter daniel.vetter@ffwll.ch wrote:
virtual is a protected keyword in C++ and can't be used at all. Ugh.
This aligns the kernel versions of the drm headers with the ones in libdrm.
Cc: Emil Velikov emil.l.velikov@gmail.com Signed-off-by: Daniel Vetter daniel.vetter@intel.com
include/uapi/drm/drm.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/include/uapi/drm/drm.h b/include/uapi/drm/drm.h index a0ebfe7c9a28..d299c7749091 100644 --- a/include/uapi/drm/drm.h +++ b/include/uapi/drm/drm.h @@ -373,7 +373,11 @@ struct drm_buf_pub { */ struct drm_buf_map { int count; /**< Length of the buffer list */ +#ifdef __cplusplus
void *virt;
+#else void __user *virtual; /**< Mmap'd area in user-virtual */ +#endif struct drm_buf_pub __user *list; /**< Buffer information */ };
Why not simply rename the field ?
It will break existing users. Some of which haven't been updated/maintained in a long while.
-Emil
dri-devel@lists.freedesktop.org