diff mbox series

[v3,03/26] dmabuf: add y0_top, pass it to spice

Message ID 20180618161729.334-4-marcandre.lureau@redhat.com
State New
Headers show
Series vhost-user for input & GPU | expand

Commit Message

Marc-André Lureau June 18, 2018, 4:17 p.m. UTC
Some scanouts during boot are top-down without this.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/ui/console.h | 1 +
 ui/spice-display.c   | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

Comments

Gerd Hoffmann June 19, 2018, 6:21 a.m. UTC | #1
On Mon, Jun 18, 2018 at 06:17:06PM +0200, Marc-André Lureau wrote:
> Some scanouts during boot are top-down without this.
> 
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
>  include/ui/console.h | 1 +
>  ui/spice-display.c   | 3 ++-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/include/ui/console.h b/include/ui/console.h
> index 981b519dde..fb969caf70 100644
> --- a/include/ui/console.h
> +++ b/include/ui/console.h
> @@ -186,6 +186,7 @@ struct QemuDmaBuf {
>      uint32_t  stride;
>      uint32_t  fourcc;
>      uint32_t  texture;
> +    bool      y0_top;
>  };
>  
>  typedef struct DisplayChangeListenerOps {

Looks incomplete, who sets y0_top?

Also: send the bugfixes (patches 1-6 ?) separate, so they can be merged
already while the input + gpu details are hashed out?

cheers,
  Gerd
Marc-André Lureau June 19, 2018, 9:05 a.m. UTC | #2
Hi

On Tue, Jun 19, 2018 at 8:21 AM, Gerd Hoffmann <kraxel@redhat.com> wrote:
> On Mon, Jun 18, 2018 at 06:17:06PM +0200, Marc-André Lureau wrote:
>> Some scanouts during boot are top-down without this.
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>>  include/ui/console.h | 1 +
>>  ui/spice-display.c   | 3 ++-
>>  2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/ui/console.h b/include/ui/console.h
>> index 981b519dde..fb969caf70 100644
>> --- a/include/ui/console.h
>> +++ b/include/ui/console.h
>> @@ -186,6 +186,7 @@ struct QemuDmaBuf {
>>      uint32_t  stride;
>>      uint32_t  fourcc;
>>      uint32_t  texture;
>> +    bool      y0_top;
>>  };
>>
>>  typedef struct DisplayChangeListenerOps {
>
> Looks incomplete, who sets y0_top?
>
> Also: send the bugfixes (patches 1-6 ?) separate, so they can be merged
> already while the input + gpu details are hashed out?

That makes sending / managing seperate series more complicated. You
need to reference some other series for reviewers, patchew etc,

It's easier if the first / reviewed patches of the series are picked.
But that may involve separate maintainers, I'll ping some of them.

thanks
Marc-André Lureau June 19, 2018, 10:21 a.m. UTC | #3
Hi

On Tue, Jun 19, 2018 at 8:21 AM, Gerd Hoffmann <kraxel@redhat.com> wrote:
> On Mon, Jun 18, 2018 at 06:17:06PM +0200, Marc-André Lureau wrote:
>> Some scanouts during boot are top-down without this.
>>
>> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> ---
>>  include/ui/console.h | 1 +
>>  ui/spice-display.c   | 3 ++-
>>  2 files changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/include/ui/console.h b/include/ui/console.h
>> index 981b519dde..fb969caf70 100644
>> --- a/include/ui/console.h
>> +++ b/include/ui/console.h
>> @@ -186,6 +186,7 @@ struct QemuDmaBuf {
>>      uint32_t  stride;
>>      uint32_t  fourcc;
>>      uint32_t  texture;
>> +    bool      y0_top;
>>  };
>>
>>  typedef struct DisplayChangeListenerOps {
>
> Looks incomplete, who sets y0_top?

It is set from VHOST_USER_GPU_DMABUF_SCANOUT code path in the last patch.

In current qemu code base, only vfio/display uses dmabuf API. But the
VFIO query interface doesn't provide or need that detail.
diff mbox series

Patch

diff --git a/include/ui/console.h b/include/ui/console.h
index 981b519dde..fb969caf70 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -186,6 +186,7 @@  struct QemuDmaBuf {
     uint32_t  stride;
     uint32_t  fourcc;
     uint32_t  texture;
+    bool      y0_top;
 };
 
 typedef struct DisplayChangeListenerOps {
diff --git a/ui/spice-display.c b/ui/spice-display.c
index fe734821dd..81f08a85bc 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -1048,7 +1048,8 @@  static void qemu_spice_gl_update(DisplayChangeListener *dcl,
             /* note: spice server will close the fd, so hand over a dup */
             spice_qxl_gl_scanout(&ssd->qxl, dup(dmabuf->fd),
                                  dmabuf->width, dmabuf->height,
-                                 dmabuf->stride, dmabuf->fourcc, false);
+                                 dmabuf->stride, dmabuf->fourcc,
+                                 dmabuf->y0_top);
         }
         qemu_spice_gl_monitor_config(ssd, 0, 0, dmabuf->width, dmabuf->height);
         ssd->guest_dmabuf_refresh = false;