2015-11-30 14:11:13

by Gabriel Laskar

[permalink] [raw]
Subject: [PATCH 01/20] drm: use __u{32,64} instead of uint{32,64}_t in virtgpu_drm.h

Signed-off-by: Gabriel Laskar <[email protected]>
CC: Emil Velikov <[email protected]>
CC: Mikko Rapeli <[email protected]>

---
include/uapi/drm/virtgpu_drm.h | 98 +++++++++++++++++++++---------------------
1 file changed, 49 insertions(+), 49 deletions(-)

diff --git a/include/uapi/drm/virtgpu_drm.h b/include/uapi/drm/virtgpu_drm.h
index fc9e2d6..4bcfbe6 100644
--- a/include/uapi/drm/virtgpu_drm.h
+++ b/include/uapi/drm/virtgpu_drm.h
@@ -30,7 +30,7 @@
/* Please note that modifications to all structs defined here are
* subject to backwards-compatibility constraints.
*
- * Do not use pointers, use uint64_t instead for 32 bit / 64 bit user/kernel
+ * Do not use pointers, use __u64 instead for 32 bit / 64 bit user/kernel
* compatibility Keep fields aligned to their size
*/

@@ -45,88 +45,88 @@
#define DRM_VIRTGPU_GET_CAPS 0x09

struct drm_virtgpu_map {
- uint64_t offset; /* use for mmap system call */
- uint32_t handle;
- uint32_t pad;
+ __u64 offset; /* use for mmap system call */
+ __u32 handle;
+ __u32 pad;
};

struct drm_virtgpu_execbuffer {
- uint32_t flags; /* for future use */
- uint32_t size;
- uint64_t command; /* void* */
- uint64_t bo_handles;
- uint32_t num_bo_handles;
- uint32_t pad;
+ __u32 flags; /* for future use */
+ __u32 size;
+ __u64 command; /* void* */
+ __u64 bo_handles;
+ __u32 num_bo_handles;
+ __u32 pad;
};

#define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */

struct drm_virtgpu_getparam {
- uint64_t param;
- uint64_t value;
+ __u64 param;
+ __u64 value;
};

/* NO_BO flags? NO resource flag? */
/* resource flag for y_0_top */
struct drm_virtgpu_resource_create {
- uint32_t target;
- uint32_t format;
- uint32_t bind;
- uint32_t width;
- uint32_t height;
- uint32_t depth;
- uint32_t array_size;
- uint32_t last_level;
- uint32_t nr_samples;
- uint32_t flags;
- uint32_t bo_handle; /* if this is set - recreate a new resource attached to this bo ? */
- uint32_t res_handle; /* returned by kernel */
- uint32_t size; /* validate transfer in the host */
- uint32_t stride; /* validate transfer in the host */
+ __u32 target;
+ __u32 format;
+ __u32 bind;
+ __u32 width;
+ __u32 height;
+ __u32 depth;
+ __u32 array_size;
+ __u32 last_level;
+ __u32 nr_samples;
+ __u32 flags;
+ __u32 bo_handle; /* if this is set - recreate a new resource attached to this bo ? */
+ __u32 res_handle; /* returned by kernel */
+ __u32 size; /* validate transfer in the host */
+ __u32 stride; /* validate transfer in the host */
};

struct drm_virtgpu_resource_info {
- uint32_t bo_handle;
- uint32_t res_handle;
- uint32_t size;
- uint32_t stride;
+ __u32 bo_handle;
+ __u32 res_handle;
+ __u32 size;
+ __u32 stride;
};

struct drm_virtgpu_3d_box {
- uint32_t x;
- uint32_t y;
- uint32_t z;
- uint32_t w;
- uint32_t h;
- uint32_t d;
+ __u32 x;
+ __u32 y;
+ __u32 z;
+ __u32 w;
+ __u32 h;
+ __u32 d;
};

struct drm_virtgpu_3d_transfer_to_host {
- uint32_t bo_handle;
+ __u32 bo_handle;
struct drm_virtgpu_3d_box box;
- uint32_t level;
- uint32_t offset;
+ __u32 level;
+ __u32 offset;
};

struct drm_virtgpu_3d_transfer_from_host {
- uint32_t bo_handle;
+ __u32 bo_handle;
struct drm_virtgpu_3d_box box;
- uint32_t level;
- uint32_t offset;
+ __u32 level;
+ __u32 offset;
};

#define VIRTGPU_WAIT_NOWAIT 1 /* like it */
struct drm_virtgpu_3d_wait {
- uint32_t handle; /* 0 is an invalid handle */
- uint32_t flags;
+ __u32 handle; /* 0 is an invalid handle */
+ __u32 flags;
};

struct drm_virtgpu_get_caps {
- uint32_t cap_set_id;
- uint32_t cap_set_ver;
- uint64_t addr;
- uint32_t size;
- uint32_t pad;
+ __u32 cap_set_id;
+ __u32 cap_set_ver;
+ __u64 addr;
+ __u32 size;
+ __u32 pad;
};

#define DRM_IOCTL_VIRTGPU_MAP \
--
2.6.2


2015-12-04 14:22:40

by Emil Velikov

[permalink] [raw]
Subject: Re: [PATCH 01/20] drm: use __u{32,64} instead of uint{32,64}_t in virtgpu_drm.h

On 30 November 2015 at 14:10, Gabriel Laskar <[email protected]> wrote:
> Signed-off-by: Gabriel Laskar <[email protected]>
> CC: Emil Velikov <[email protected]>
> CC: Mikko Rapeli <[email protected]>
>
> ---
> include/uapi/drm/virtgpu_drm.h | 98 +++++++++++++++++++++---------------------
> 1 file changed, 49 insertions(+), 49 deletions(-)
>
For the series
Reviewed-by: Emil Velikov <[email protected]>

Dave would you have any comments wrt this and the remainder of Mikko's
series ? Alternatively what can we do to get those merged (would you
like a branch/pull request) ?

Thanks
Emil

2015-12-05 21:03:55

by Dave Airlie

[permalink] [raw]
Subject: Re: [PATCH 01/20] drm: use __u{32,64} instead of uint{32,64}_t in virtgpu_drm.h

On 5 December 2015 at 00:22, Emil Velikov <[email protected]> wrote:
> On 30 November 2015 at 14:10, Gabriel Laskar <[email protected]> wrote:
>> Signed-off-by: Gabriel Laskar <[email protected]>
>> CC: Emil Velikov <[email protected]>
>> CC: Mikko Rapeli <[email protected]>
>>
>> ---
>> include/uapi/drm/virtgpu_drm.h | 98 +++++++++++++++++++++---------------------
>> 1 file changed, 49 insertions(+), 49 deletions(-)
>>
> For the series
> Reviewed-by: Emil Velikov <[email protected]>
>
> Dave would you have any comments wrt this and the remainder of Mikko's
> series ? Alternatively what can we do to get those merged (would you
> like a branch/pull request) ?

Yeah a git pull for these would be good, it's about all I can do to
care about them.

Dave.

2015-12-07 13:29:43

by Emil Velikov

[permalink] [raw]
Subject: Re: [PATCH 01/20] drm: use __u{32,64} instead of uint{32,64}_t in virtgpu_drm.h

On 5 December 2015 at 21:03, Dave Airlie <[email protected]> wrote:
> On 5 December 2015 at 00:22, Emil Velikov <[email protected]> wrote:
>> On 30 November 2015 at 14:10, Gabriel Laskar <[email protected]> wrote:
>>> Signed-off-by: Gabriel Laskar <[email protected]>
>>> CC: Emil Velikov <[email protected]>
>>> CC: Mikko Rapeli <[email protected]>
>>>
>>> ---
>>> include/uapi/drm/virtgpu_drm.h | 98 +++++++++++++++++++++---------------------
>>> 1 file changed, 49 insertions(+), 49 deletions(-)
>>>
>> For the series
>> Reviewed-by: Emil Velikov <[email protected]>
>>
>> Dave would you have any comments wrt this and the remainder of Mikko's
>> series ? Alternatively what can we do to get those merged (would you
>> like a branch/pull request) ?
>
> Yeah a git pull for these would be good, it's about all I can do to
> care about them.
>
>From your earlier reply I got the impression that you'll pick Mikko's
work. Either way, glad to see some progress on the topic.

Mikko, Gabriel,

Will you guys be so kind to send pull requests or shall I ?

Thanks
Emil

2015-12-07 13:46:05

by Mikko Rapeli

[permalink] [raw]
Subject: Re: [PATCH 01/20] drm: use __u{32,64} instead of uint{32,64}_t in virtgpu_drm.h

On Mon, Dec 07, 2015 at 01:29:41PM +0000, Emil Velikov wrote:
> On 5 December 2015 at 21:03, Dave Airlie <[email protected]> wrote:
> > On 5 December 2015 at 00:22, Emil Velikov <[email protected]> wrote:
> >> On 30 November 2015 at 14:10, Gabriel Laskar <[email protected]> wrote:
> >>> Signed-off-by: Gabriel Laskar <[email protected]>
> >>> CC: Emil Velikov <[email protected]>
> >>> CC: Mikko Rapeli <[email protected]>
> >>>
> >>> ---
> >>> include/uapi/drm/virtgpu_drm.h | 98 +++++++++++++++++++++---------------------
> >>> 1 file changed, 49 insertions(+), 49 deletions(-)
> >>>
> >> For the series
> >> Reviewed-by: Emil Velikov <[email protected]>
> >>
> >> Dave would you have any comments wrt this and the remainder of Mikko's
> >> series ? Alternatively what can we do to get those merged (would you
> >> like a branch/pull request) ?
> >
> > Yeah a git pull for these would be good, it's about all I can do to
> > care about them.
> >
> >From your earlier reply I got the impression that you'll pick Mikko's
> work. Either way, glad to see some progress on the topic.
>
> Mikko, Gabriel,
>
> Will you guys be so kind to send pull requests or shall I ?

Go a head and send one. I guess you are talking about the drm specific
patches.

I tested Gabriel's changes too and found one more userspace compilation
problem from the now exported AMD header.

You can pick my patches from emails or latest draft is at
https://github.com/mcfrisk/linux/tree/headers_test_v05

I'm following Linus'es tree and dropping changes which get merged from my
development branch.

-Mikko

2015-12-09 13:56:11

by Gabriel Laskar

[permalink] [raw]
Subject: Re: [PATCH 01/20] drm: use __u{32,64} instead of uint{32,64}_t in virtgpu_drm.h

On Mon, 7 Dec 2015 13:29:41 +0000
Emil Velikov <[email protected]> wrote:

> On 5 December 2015 at 21:03, Dave Airlie <[email protected]> wrote:
> > On 5 December 2015 at 00:22, Emil Velikov <[email protected]> wrote:
> >> On 30 November 2015 at 14:10, Gabriel Laskar <[email protected]> wrote:
> >>> Signed-off-by: Gabriel Laskar <[email protected]>
> >>> CC: Emil Velikov <[email protected]>
> >>> CC: Mikko Rapeli <[email protected]>
> >>>
> >>> ---
> >>> include/uapi/drm/virtgpu_drm.h | 98 +++++++++++++++++++++---------------------
> >>> 1 file changed, 49 insertions(+), 49 deletions(-)
> >>>
> >> For the series
> >> Reviewed-by: Emil Velikov <[email protected]>
> >>
> >> Dave would you have any comments wrt this and the remainder of Mikko's
> >> series ? Alternatively what can we do to get those merged (would you
> >> like a branch/pull request) ?
> >
> > Yeah a git pull for these would be good, it's about all I can do to
> > care about them.
> >
> From your earlier reply I got the impression that you'll pick Mikko's
> work. Either way, glad to see some progress on the topic.
>
> Mikko, Gabriel,
>
> Will you guys be so kind to send pull requests or shall I ?

I can send a pull request with the changes from mikko and mine.

--
Gabriel Laskar