Re: [PATCH] virtgpu: Update kernel header

2019-04-01 Thread Gurchetan Singh
On Mon, Mar 4, 2019 at 12:26 AM Robert Foss 
wrote:

> Hey Gurchetan,
>
> Thanks for sending this in!
>
> Reviewed-by: Robert Foss 
>
>
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 
> > ---
> >   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 \
> >
>
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] virtgpu: Update kernel header

2019-03-04 Thread Robert Foss

Hey Gurchetan,

Thanks for sending this in!

Reviewed-by: Robert Foss 

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 
---
  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 \



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

[PATCH] virtgpu: Update kernel header

2019-02-27 Thread Gurchetan Singh
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 
---
 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_IN0x01
+#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 \
-- 
2.20.1

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

[PATCH] virtgpu: Update kernel header

2019-02-27 Thread Gurchetan Singh
Generated using make headers_install.

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

Signed-off-by: Gurchetan Singh 
---
 include/drm/virtgpu_drm.h | 15 ---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/include/drm/virtgpu_drm.h b/include/drm/virtgpu_drm.h
index 9a781f06..acb21912 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_IN0x01
+#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,16 +61,18 @@ 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 */
 #define VIRTGPU_PARAM_CAPSET_QUERY_FIX 2 /* do we have the capset fix */
+#define VIRTGPU_PARAM_NO_TRANSFER  3 /* have VIRTIO_GPU_F_NO_TRANSFER */
+#define VIRTGPU_PARAM_HOST_COHERENT4 /* have VIRTIO_GPU_F_HOST_COHERENT */
 
 struct drm_virtgpu_getparam {
__u64 param;
@@ -137,7 +146,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 \
-- 
2.20.1

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