[PULL 0/6] Vga 20210910 patches

Gerd Hoffmann posted 6 patches 2 years, 7 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210910131709.3681492-1-kraxel@redhat.com
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>
include/ui/console.h            |  3 +++
include/ui/egl-helpers.h        |  3 +++
include/ui/gtk.h                |  5 ++--
hw/display/qxl.c                |  2 +-
hw/display/virtio-gpu-udmabuf.c |  1 +
hw/display/virtio-gpu.c         | 32 ++++++++++++++++++++++--
ui/egl-helpers.c                | 26 ++++++++++++++++++++
ui/gtk-egl.c                    | 43 +++++++++++++++++++++++++++------
ui/gtk-gl-area.c                | 20 +++++++++++++++
ui/gtk.c                        | 26 ++++++++++++++++++--
10 files changed, 146 insertions(+), 15 deletions(-)
[PULL 0/6] Vga 20210910 patches
Posted by Gerd Hoffmann 2 years, 7 months ago
The following changes since commit bd662023e683850c085e98c8ff8297142c2dd9f2:

  Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210908' into staging (2021-09-08 11:06:17 +0100)

are available in the Git repository at:

  git://git.kraxel.org/qemu tags/vga-20210910-pull-request

for you to fetch changes up to 6335c0b56819a5d1219ea84a11a732d0861542db:

  qxl: fix pre-save logic (2021-09-10 12:23:12 +0200)

----------------------------------------------------------------
virtio-gpu + ui: fence syncronization.
qxl: unbreak live migration.

----------------------------------------------------------------

Gerd Hoffmann (1):
  qxl: fix pre-save logic

Vivek Kasireddy (5):
  ui/gtk: Create a common release_dmabuf helper
  ui/egl: Add egl helpers to help with synchronization
  ui: Create sync objects and fences only for blobs
  ui/gtk-egl: Wait for the draw signal for dmabuf blobs
  virtio-gpu: Add gl_flushed callback

 include/ui/console.h            |  3 +++
 include/ui/egl-helpers.h        |  3 +++
 include/ui/gtk.h                |  5 ++--
 hw/display/qxl.c                |  2 +-
 hw/display/virtio-gpu-udmabuf.c |  1 +
 hw/display/virtio-gpu.c         | 32 ++++++++++++++++++++++--
 ui/egl-helpers.c                | 26 ++++++++++++++++++++
 ui/gtk-egl.c                    | 43 +++++++++++++++++++++++++++------
 ui/gtk-gl-area.c                | 20 +++++++++++++++
 ui/gtk.c                        | 26 ++++++++++++++++++--
 10 files changed, 146 insertions(+), 15 deletions(-)

-- 
2.31.1



Re: [PULL 0/6] Vga 20210910 patches
Posted by Peter Maydell 2 years, 7 months ago
On Fri, 10 Sept 2021 at 14:19, Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> The following changes since commit bd662023e683850c085e98c8ff8297142c2dd9f2:
>
>   Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210908' into staging (2021-09-08 11:06:17 +0100)
>
> are available in the Git repository at:
>
>   git://git.kraxel.org/qemu tags/vga-20210910-pull-request
>
> for you to fetch changes up to 6335c0b56819a5d1219ea84a11a732d0861542db:
>
>   qxl: fix pre-save logic (2021-09-10 12:23:12 +0200)
>
> ----------------------------------------------------------------
> virtio-gpu + ui: fence syncronization.
> qxl: unbreak live migration.
>
> ----------------------------------------------------------------

Hi; this fails to build on the ppc64 system:

../../ui/egl-helpers.c:79:6: error: no previous prototype for
'egl_dmabuf_create_sync' [-Werror=missing-prototypes]
   79 | void egl_dmabuf_create_sync(QemuDmaBuf *dmabuf)
      |      ^~~~~~~~~~~~~~~~~~~~~~
../../ui/egl-helpers.c:95:6: error: no previous prototype for
'egl_dmabuf_create_fence' [-Werror=missing-prototypes]
   95 | void egl_dmabuf_create_fence(QemuDmaBuf *dmabuf)
      |      ^~~~~~~~~~~~~~~~~~~~~~~


The prototype is hidden behind CONFIG_GBM, but the definition is not.

Then the callsites fail:

../../ui/gtk-gl-area.c: In function 'gd_gl_area_draw':
../../ui/gtk-gl-area.c:77:9: error: implicit declaration of function
'egl_dmabuf_create_sync' [-Werror=implicit-function-declaration]
   77 |         egl_dmabuf_create_sync(dmabuf);
      |         ^~~~~~~~~~~~~~~~~~~~~~
../../ui/gtk-gl-area.c:77:9: error: nested extern declaration of
'egl_dmabuf_create_sync' [-Werror=nested-externs]
../../ui/gtk-gl-area.c:81:9: error: implicit declaration of function
'egl_dmabuf_create_fence' [-Werror=implicit-function-declaration]
   81 |         egl_dmabuf_create_fence(dmabuf);
      |         ^~~~~~~~~~~~~~~~~~~~~~~
../../ui/gtk-gl-area.c:81:9: error: nested extern declaration of
'egl_dmabuf_create_fence' [-Werror=nested-externs]


../../ui/gtk-egl.c: In function 'gd_egl_draw':
../../ui/gtk-egl.c:100:9: error: implicit declaration of function
'egl_dmabuf_create_fence' [-Werror=implicit-function-declaration]
  100 |         egl_dmabuf_create_fence(dmabuf);
      |         ^~~~~~~~~~~~~~~~~~~~~~~
../../ui/gtk-egl.c:100:9: error: nested extern declaration of
'egl_dmabuf_create_fence' [-Werror=nested-externs]
../../ui/gtk-egl.c: In function 'gd_egl_scanout_flush':
../../ui/gtk-egl.c:301:9: error: implicit declaration of function
'egl_dmabuf_create_sync' [-Werror=implicit-function-declaration]
  301 |         egl_dmabuf_create_sync(vc->gfx.guest_fb.dmabuf);
      |         ^~~~~~~~~~~~~~~~~~~~~~
../../ui/gtk-egl.c:301:9: error: nested extern declaration of
'egl_dmabuf_create_sync' [-Werror=nested-externs]


You can probably repro this on any system which has the opengl
libraries installed but not libgbm.

-- PMM

Re: [PULL 0/6] Vga 20210910 patches
Posted by Gerd Hoffmann 2 years, 7 months ago
On Fri, Sep 10, 2021 at 05:52:55PM +0100, Peter Maydell wrote:
> On Fri, 10 Sept 2021 at 14:19, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> > The following changes since commit bd662023e683850c085e98c8ff8297142c2dd9f2:
> >
> >   Merge remote-tracking branch 'remotes/mcayland/tags/qemu-openbios-20210908' into staging (2021-09-08 11:06:17 +0100)
> >
> > are available in the Git repository at:
> >
> >   git://git.kraxel.org/qemu tags/vga-20210910-pull-request
> >
> > for you to fetch changes up to 6335c0b56819a5d1219ea84a11a732d0861542db:
> >
> >   qxl: fix pre-save logic (2021-09-10 12:23:12 +0200)
> >
> > ----------------------------------------------------------------
> > virtio-gpu + ui: fence syncronization.
> > qxl: unbreak live migration.
> >
> > ----------------------------------------------------------------
> 
> Hi; this fails to build on the ppc64 system:
> 
> ../../ui/egl-helpers.c:79:6: error: no previous prototype for
> 'egl_dmabuf_create_sync' [-Werror=missing-prototypes]
>    79 | void egl_dmabuf_create_sync(QemuDmaBuf *dmabuf)
>       |      ^~~~~~~~~~~~~~~~~~~~~~
> ../../ui/egl-helpers.c:95:6: error: no previous prototype for
> 'egl_dmabuf_create_fence' [-Werror=missing-prototypes]
>    95 | void egl_dmabuf_create_fence(QemuDmaBuf *dmabuf)
>       |      ^~~~~~~~~~~~~~~~~~~~~~~
> 
> 
> The prototype is hidden behind CONFIG_GBM, but the definition is not.
> 
> Then the callsites fail:
> 
> ../../ui/gtk-gl-area.c: In function 'gd_gl_area_draw':
> ../../ui/gtk-gl-area.c:77:9: error: implicit declaration of function
> 'egl_dmabuf_create_sync' [-Werror=implicit-function-declaration]
>    77 |         egl_dmabuf_create_sync(dmabuf);
>       |         ^~~~~~~~~~~~~~~~~~~~~~
> ../../ui/gtk-gl-area.c:77:9: error: nested extern declaration of
> 'egl_dmabuf_create_sync' [-Werror=nested-externs]
> ../../ui/gtk-gl-area.c:81:9: error: implicit declaration of function
> 'egl_dmabuf_create_fence' [-Werror=implicit-function-declaration]
>    81 |         egl_dmabuf_create_fence(dmabuf);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~
> ../../ui/gtk-gl-area.c:81:9: error: nested extern declaration of
> 'egl_dmabuf_create_fence' [-Werror=nested-externs]
> 
> 
> ../../ui/gtk-egl.c: In function 'gd_egl_draw':
> ../../ui/gtk-egl.c:100:9: error: implicit declaration of function
> 'egl_dmabuf_create_fence' [-Werror=implicit-function-declaration]
>   100 |         egl_dmabuf_create_fence(dmabuf);
>       |         ^~~~~~~~~~~~~~~~~~~~~~~
> ../../ui/gtk-egl.c:100:9: error: nested extern declaration of
> 'egl_dmabuf_create_fence' [-Werror=nested-externs]
> ../../ui/gtk-egl.c: In function 'gd_egl_scanout_flush':
> ../../ui/gtk-egl.c:301:9: error: implicit declaration of function
> 'egl_dmabuf_create_sync' [-Werror=implicit-function-declaration]
>   301 |         egl_dmabuf_create_sync(vc->gfx.guest_fb.dmabuf);
>       |         ^~~~~~~~~~~~~~~~~~~~~~
> ../../ui/gtk-egl.c:301:9: error: nested extern declaration of
> 'egl_dmabuf_create_sync' [-Werror=nested-externs]
> 
> 
> You can probably repro this on any system which has the opengl
> libraries installed but not libgbm.

Vivek?  Can you have a look please?

thanks,
  Gerd


RE: [PULL 0/6] Vga 20210910 patches
Posted by Kasireddy, Vivek 2 years, 7 months ago
Hi Gerd, Peter,

> 
> On Fri, Sep 10, 2021 at 05:52:55PM +0100, Peter Maydell wrote:
> > On Fri, 10 Sept 2021 at 14:19, Gerd Hoffmann <kraxel@redhat.com> wrote:
> > >
> > > The following changes since commit bd662023e683850c085e98c8ff8297142c2dd9f2:
> > >
> > >   Merge remote-tracking branch
> > > 'remotes/mcayland/tags/qemu-openbios-20210908' into staging
> > > (2021-09-08 11:06:17 +0100)
> > >
> > > are available in the Git repository at:
> > >
> > >   git://git.kraxel.org/qemu tags/vga-20210910-pull-request
> > >
> > > for you to fetch changes up to 6335c0b56819a5d1219ea84a11a732d0861542db:
> > >
> > >   qxl: fix pre-save logic (2021-09-10 12:23:12 +0200)
> > >
> > > ----------------------------------------------------------------
> > > virtio-gpu + ui: fence syncronization.
> > > qxl: unbreak live migration.
> > >
> > > ----------------------------------------------------------------
> >
> > Hi; this fails to build on the ppc64 system:
> >
> > ../../ui/egl-helpers.c:79:6: error: no previous prototype for
> > 'egl_dmabuf_create_sync' [-Werror=missing-prototypes]
> >    79 | void egl_dmabuf_create_sync(QemuDmaBuf *dmabuf)
> >       |      ^~~~~~~~~~~~~~~~~~~~~~
> > ../../ui/egl-helpers.c:95:6: error: no previous prototype for
> > 'egl_dmabuf_create_fence' [-Werror=missing-prototypes]
> >    95 | void egl_dmabuf_create_fence(QemuDmaBuf *dmabuf)
> >       |      ^~~~~~~~~~~~~~~~~~~~~~~
> >
> >
> > The prototype is hidden behind CONFIG_GBM, but the definition is not.
> >
> > Then the callsites fail:
> >
> > ../../ui/gtk-gl-area.c: In function 'gd_gl_area_draw':
> > ../../ui/gtk-gl-area.c:77:9: error: implicit declaration of function
> > 'egl_dmabuf_create_sync' [-Werror=implicit-function-declaration]
> >    77 |         egl_dmabuf_create_sync(dmabuf);
> >       |         ^~~~~~~~~~~~~~~~~~~~~~
> > ../../ui/gtk-gl-area.c:77:9: error: nested extern declaration of
> > 'egl_dmabuf_create_sync' [-Werror=nested-externs]
> > ../../ui/gtk-gl-area.c:81:9: error: implicit declaration of function
> > 'egl_dmabuf_create_fence' [-Werror=implicit-function-declaration]
> >    81 |         egl_dmabuf_create_fence(dmabuf);
> >       |         ^~~~~~~~~~~~~~~~~~~~~~~
> > ../../ui/gtk-gl-area.c:81:9: error: nested extern declaration of
> > 'egl_dmabuf_create_fence' [-Werror=nested-externs]
> >
> >
> > ../../ui/gtk-egl.c: In function 'gd_egl_draw':
> > ../../ui/gtk-egl.c:100:9: error: implicit declaration of function
> > 'egl_dmabuf_create_fence' [-Werror=implicit-function-declaration]
> >   100 |         egl_dmabuf_create_fence(dmabuf);
> >       |         ^~~~~~~~~~~~~~~~~~~~~~~
> > ../../ui/gtk-egl.c:100:9: error: nested extern declaration of
> > 'egl_dmabuf_create_fence' [-Werror=nested-externs]
> > ../../ui/gtk-egl.c: In function 'gd_egl_scanout_flush':
> > ../../ui/gtk-egl.c:301:9: error: implicit declaration of function
> > 'egl_dmabuf_create_sync' [-Werror=implicit-function-declaration]
> >   301 |         egl_dmabuf_create_sync(vc->gfx.guest_fb.dmabuf);
> >       |         ^~~~~~~~~~~~~~~~~~~~~~
> > ../../ui/gtk-egl.c:301:9: error: nested extern declaration of
> > 'egl_dmabuf_create_sync' [-Werror=nested-externs]
> >
> >
> > You can probably repro this on any system which has the opengl
> > libraries installed but not libgbm.
> 
> Vivek?  Can you have a look please?
[Kasireddy, Vivek] I sent a v6 that fixes these compilation errors:
https://lists.nongnu.org/archive/html/qemu-devel/2021-09/msg03859.html

Compile tested the patches with and without GBM.

Thanks,
Vivek