On 11/5/21 19:26, Philippe Mathieu-Daudé wrote: > On 11/5/21 18:13, Richard Henderson wrote: >> On 11/5/21 7:30 AM, Gerd Hoffmann wrote: >>> The following changes since commit >>> b1fd92137e4d485adeec8e9f292f928ff335b76c: >>> >>> Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' >>> into staging (2021-11-03 13:07:30 -0400) >>> >>> are available in the Git repository at: >>> >>> git://git.kraxel.org/qemu tags/egl-20211105-pull-request >>> >>> for you to fetch changes up to 1350ff156b25be65c599ecca9957ce6726c6d383: >>> >>> ui/gtk-egl: blitting partial guest fb to the proper scanout surface >>> (2021-11-05 12:29:44 +0100) >>> >>> ---------------------------------------------------------------- >>> gtk: a collection of egl fixes. >>> >>> ---------------------------------------------------------------- >>> >>> Dongwon Kim (6): >>> virtio-gpu: splitting one extended mode guest fb into n-scanouts >>> ui/gtk-egl: un-tab and re-tab should destroy egl surface and context >>> ui/gtk-egl: make sure the right context is set as the current >>> ui/gtk-egl: guest fb texture needs to be regenerated when >>> reinitializing egl >>> ui/gtk: gd_draw_event returns FALSE when no cairo surface is bound >>> ui/gtk-egl: blitting partial guest fb to the proper scanout surface >>> >>> include/hw/virtio/virtio-gpu.h | 5 +++-- >>> include/ui/console.h | 4 ++++ >>> hw/display/virtio-gpu-udmabuf-stubs.c | 3 ++- >>> hw/display/virtio-gpu-udmabuf.c | 22 ++++++++++++++-------- >>> hw/display/virtio-gpu.c | 4 ++-- >>> ui/egl-helpers.c | 25 +++++++++++++++++++++---- >>> ui/gtk-egl.c | 10 ++++++++++ >>> ui/gtk.c | 23 +++++++++++++++++++++++ >>> 8 files changed, 79 insertions(+), 17 deletions(-) >> >> Applied, thanks. > > Ubuntu 18.04.4 LTS: > > ui/gtk-egl.c:159:13: error: implicit declaration of function > 'egl_dmabuf_release_texture' is invalid in C99 > [-Werror,-Wimplicit-function-declaration] > egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf); > ^ > ui/gtk-egl.c:159:13: error: this function declaration is not a prototype > [-Werror,-Wstrict-prototypes] > 2 errors generated. > > https://app.travis-ci.com/gitlab/qemu-project/qemu/builds/241272737 >
This seems to fix but I have no clue whether it is correct: -- >8 -- diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c index f2026e4b5c9..45cb67712df 100644 --- a/ui/gtk-egl.c +++ b/ui/gtk-egl.c @@ -156,8 +156,10 @@ void gd_egl_refresh(DisplayChangeListener *dcl) surface_gl_create_texture(vc->gfx.gls, vc->gfx.ds); } +#ifdef CONFIG_GBM if (vc->gfx.guest_fb.dmabuf) { egl_dmabuf_release_texture(vc->gfx.guest_fb.dmabuf); gd_egl_scanout_dmabuf(dcl, vc->gfx.guest_fb.dmabuf); } +#endif } ---