virtgpu: Update kernel header
diff mbox series

Message ID 20190228005237.2149-1-gurchetansingh@chromium.org
State New
Headers show
Series
  • virtgpu: Update kernel header
Related show

Commit Message

Gurchetan Singh Feb. 28, 2019, 12:52 a.m. UTC
Generated using make headers_install.

This brings in the in/out fence support for explicit
synchronization.

v2: don't use experimental kernel branch

Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
---
 include/drm/virtgpu_drm.h | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

Comments

Robert Foss March 4, 2019, 8:25 a.m. UTC | #1
Hey Gurchetan,

Thanks for sending this in!

Reviewed-by: Robert Foss <robert.foss@collabora.com>

On 2/28/19 1:52 AM, Gurchetan Singh wrote:
> Generated using make headers_install.
> 
> This brings in the in/out fence support for explicit
> synchronization.
> 
> v2: don't use experimental kernel branch
> 
> Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
> ---
>   include/drm/virtgpu_drm.h | 13 ++++++++++---
>   1 file changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/include/drm/virtgpu_drm.h b/include/drm/virtgpu_drm.h
> index 9a781f06..f06a789f 100644
> --- a/include/drm/virtgpu_drm.h
> +++ b/include/drm/virtgpu_drm.h
> @@ -47,6 +47,13 @@ extern "C" {
>   #define DRM_VIRTGPU_WAIT     0x08
>   #define DRM_VIRTGPU_GET_CAPS  0x09
>   
> +#define VIRTGPU_EXECBUF_FENCE_FD_IN	0x01
> +#define VIRTGPU_EXECBUF_FENCE_FD_OUT	0x02
> +#define VIRTGPU_EXECBUF_FLAGS  (\
> +		VIRTGPU_EXECBUF_FENCE_FD_IN |\
> +		VIRTGPU_EXECBUF_FENCE_FD_OUT |\
> +		0)
> +
>   struct drm_virtgpu_map {
>   	__u64 offset; /* use for mmap system call */
>   	__u32 handle;
> @@ -54,12 +61,12 @@ struct drm_virtgpu_map {
>   };
>   
>   struct drm_virtgpu_execbuffer {
> -	__u32		flags;		/* for future use */
> +	__u32 flags;
>   	__u32 size;
>   	__u64 command; /* void* */
>   	__u64 bo_handles;
>   	__u32 num_bo_handles;
> -	__u32 pad;
> +	__s32 fence_fd; /* in/out fence fd (see VIRTGPU_EXECBUF_FENCE_FD_IN/OUT) */
>   };
>   
>   #define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */
> @@ -137,7 +144,7 @@ struct drm_virtgpu_get_caps {
>   	DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map)
>   
>   #define DRM_IOCTL_VIRTGPU_EXECBUFFER \
> -	DRM_IOW(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\
> +	DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\
>   		struct drm_virtgpu_execbuffer)
>   
>   #define DRM_IOCTL_VIRTGPU_GETPARAM \
>
Gurchetan Singh April 1, 2019, 11:01 p.m. UTC | #2
On Mon, Mar 4, 2019 at 12:26 AM Robert Foss <robert.foss@collabora.com>
wrote:

> Hey Gurchetan,
>
> Thanks for sending this in!
>
> Reviewed-by: Robert Foss <robert.foss@collabora.com>
>
>
Thanks for the review!  Ping committers for merge ...



> On 2/28/19 1:52 AM, Gurchetan Singh wrote:
> > Generated using make headers_install.
> >
> > This brings in the in/out fence support for explicit
> > synchronization.
> >
> > v2: don't use experimental kernel branch
> >
> > Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org>
> > ---
> >   include/drm/virtgpu_drm.h | 13 ++++++++++---
> >   1 file changed, 10 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/drm/virtgpu_drm.h b/include/drm/virtgpu_drm.h
> > index 9a781f06..f06a789f 100644
> > --- a/include/drm/virtgpu_drm.h
> > +++ b/include/drm/virtgpu_drm.h
> > @@ -47,6 +47,13 @@ extern "C" {
> >   #define DRM_VIRTGPU_WAIT     0x08
> >   #define DRM_VIRTGPU_GET_CAPS  0x09
> >
> > +#define VIRTGPU_EXECBUF_FENCE_FD_IN  0x01
> > +#define VIRTGPU_EXECBUF_FENCE_FD_OUT 0x02
> > +#define VIRTGPU_EXECBUF_FLAGS  (\
> > +             VIRTGPU_EXECBUF_FENCE_FD_IN |\
> > +             VIRTGPU_EXECBUF_FENCE_FD_OUT |\
> > +             0)
> > +
> >   struct drm_virtgpu_map {
> >       __u64 offset; /* use for mmap system call */
> >       __u32 handle;
> > @@ -54,12 +61,12 @@ struct drm_virtgpu_map {
> >   };
> >
> >   struct drm_virtgpu_execbuffer {
> > -     __u32           flags;          /* for future use */
> > +     __u32 flags;
> >       __u32 size;
> >       __u64 command; /* void* */
> >       __u64 bo_handles;
> >       __u32 num_bo_handles;
> > -     __u32 pad;
> > +     __s32 fence_fd; /* in/out fence fd (see
> VIRTGPU_EXECBUF_FENCE_FD_IN/OUT) */
> >   };
> >
> >   #define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the
> hw */
> > @@ -137,7 +144,7 @@ struct drm_virtgpu_get_caps {
> >       DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct
> drm_virtgpu_map)
> >
> >   #define DRM_IOCTL_VIRTGPU_EXECBUFFER \
> > -     DRM_IOW(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\
> > +     DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\
> >               struct drm_virtgpu_execbuffer)
> >
> >   #define DRM_IOCTL_VIRTGPU_GETPARAM \
> >
>
<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Mar 4, 2019 at 12:26 AM Robert Foss &lt;<a href="mailto:robert.foss@collabora.com">robert.foss@collabora.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hey Gurchetan,<br>
<br>
Thanks for sending this in!<br>
<br>
Reviewed-by: Robert Foss &lt;<a href="mailto:robert.foss@collabora.com" target="_blank">robert.foss@collabora.com</a>&gt;<br>
<br></blockquote><div><br></div><div>Thanks for the review!  Ping committers for merge ...</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On 2/28/19 1:52 AM, Gurchetan Singh wrote:<br>
&gt; Generated using make headers_install.<br>
&gt; <br>
&gt; This brings in the in/out fence support for explicit<br>
&gt; synchronization.<br>
&gt; <br>
&gt; v2: don&#39;t use experimental kernel branch<br>
&gt; <br>
&gt; Signed-off-by: Gurchetan Singh &lt;<a href="mailto:gurchetansingh@chromium.org" target="_blank">gurchetansingh@chromium.org</a>&gt;<br>
&gt; ---<br>
&gt;   include/drm/virtgpu_drm.h | 13 ++++++++++---<br>
&gt;   1 file changed, 10 insertions(+), 3 deletions(-)<br>
&gt; <br>
&gt; diff --git a/include/drm/virtgpu_drm.h b/include/drm/virtgpu_drm.h<br>
&gt; index 9a781f06..f06a789f 100644<br>
&gt; --- a/include/drm/virtgpu_drm.h<br>
&gt; +++ b/include/drm/virtgpu_drm.h<br>
&gt; @@ -47,6 +47,13 @@ extern &quot;C&quot; {<br>
&gt;   #define DRM_VIRTGPU_WAIT     0x08<br>
&gt;   #define DRM_VIRTGPU_GET_CAPS  0x09<br>
&gt;   <br>
&gt; +#define VIRTGPU_EXECBUF_FENCE_FD_IN  0x01<br>
&gt; +#define VIRTGPU_EXECBUF_FENCE_FD_OUT 0x02<br>
&gt; +#define VIRTGPU_EXECBUF_FLAGS  (\<br>
&gt; +             VIRTGPU_EXECBUF_FENCE_FD_IN |\<br>
&gt; +             VIRTGPU_EXECBUF_FENCE_FD_OUT |\<br>
&gt; +             0)<br>
&gt; +<br>
&gt;   struct drm_virtgpu_map {<br>
&gt;       __u64 offset; /* use for mmap system call */<br>
&gt;       __u32 handle;<br>
&gt; @@ -54,12 +61,12 @@ struct drm_virtgpu_map {<br>
&gt;   };<br>
&gt;   <br>
&gt;   struct drm_virtgpu_execbuffer {<br>
&gt; -     __u32           flags;          /* for future use */<br>
&gt; +     __u32 flags;<br>
&gt;       __u32 size;<br>
&gt;       __u64 command; /* void* */<br>
&gt;       __u64 bo_handles;<br>
&gt;       __u32 num_bo_handles;<br>
&gt; -     __u32 pad;<br>
&gt; +     __s32 fence_fd; /* in/out fence fd (see VIRTGPU_EXECBUF_FENCE_FD_IN/OUT) */<br>
&gt;   };<br>
&gt;   <br>
&gt;   #define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */<br>
&gt; @@ -137,7 +144,7 @@ struct drm_virtgpu_get_caps {<br>
&gt;       DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map)<br>
&gt;   <br>
&gt;   #define DRM_IOCTL_VIRTGPU_EXECBUFFER \<br>
&gt; -     DRM_IOW(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\<br>
&gt; +     DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\<br>
&gt;               struct drm_virtgpu_execbuffer)<br>
&gt;   <br>
&gt;   #define DRM_IOCTL_VIRTGPU_GETPARAM \<br>
&gt; <br>
</blockquote></div></div>

Patch
diff mbox series

diff --git a/include/drm/virtgpu_drm.h b/include/drm/virtgpu_drm.h
index 9a781f06..f06a789f 100644
--- a/include/drm/virtgpu_drm.h
+++ b/include/drm/virtgpu_drm.h
@@ -47,6 +47,13 @@  extern "C" {
 #define DRM_VIRTGPU_WAIT     0x08
 #define DRM_VIRTGPU_GET_CAPS  0x09
 
+#define VIRTGPU_EXECBUF_FENCE_FD_IN	0x01
+#define VIRTGPU_EXECBUF_FENCE_FD_OUT	0x02
+#define VIRTGPU_EXECBUF_FLAGS  (\
+		VIRTGPU_EXECBUF_FENCE_FD_IN |\
+		VIRTGPU_EXECBUF_FENCE_FD_OUT |\
+		0)
+
 struct drm_virtgpu_map {
 	__u64 offset; /* use for mmap system call */
 	__u32 handle;
@@ -54,12 +61,12 @@  struct drm_virtgpu_map {
 };
 
 struct drm_virtgpu_execbuffer {
-	__u32		flags;		/* for future use */
+	__u32 flags;
 	__u32 size;
 	__u64 command; /* void* */
 	__u64 bo_handles;
 	__u32 num_bo_handles;
-	__u32 pad;
+	__s32 fence_fd; /* in/out fence fd (see VIRTGPU_EXECBUF_FENCE_FD_IN/OUT) */
 };
 
 #define VIRTGPU_PARAM_3D_FEATURES 1 /* do we have 3D features in the hw */
@@ -137,7 +144,7 @@  struct drm_virtgpu_get_caps {
 	DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map)
 
 #define DRM_IOCTL_VIRTGPU_EXECBUFFER \
-	DRM_IOW(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\
+	DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER,\
 		struct drm_virtgpu_execbuffer)
 
 #define DRM_IOCTL_VIRTGPU_GETPARAM \