* [RFC PATCH-for-6.2] ui/gtk-egl: Fix build failure when libgbm is not available
@ 2021-11-08 8:31 Philippe Mathieu-Daudé
2021-11-08 8:33 ` Laurent Vivier
2021-11-08 8:43 ` Paolo Bonzini
0 siblings, 2 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-11-08 8:31 UTC (permalink / raw)
To: qemu-devel
Cc: Dongwon Kim, Mark Cave-Ayland, Laurent Vivier, Vivek Kasireddy,
Gerd Hoffmann, Philippe Mathieu-Daudé
Since commit 4872a023a59 ("ui/gtk-egl: guest fb texture needs
to be regenerated when reinitializing egl") we get on Ubuntu
18.04.4 LTS and Debian Buster (oldstable):
$ ../configure --enable-virglrenderer
[...]
ui/gtk-egl.c: In function 'gd_egl_refresh':
ui/gtk-egl.c:159:13: error: implicit declaration of function 'egl_dmabuf_release_texture' [-Werror=implicit-function-declaration]
159 | 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]
ui/gtk-egl.c:159:13: error: nested extern declaration of 'egl_dmabuf_release_texture' [-Werror=nested-externs]
Fix by restricting the egl_dmabuf_release_texture() call to the
availability of the generic buffer management library (libgbm).
Fixes: 4872a023a593e6519b272a
Cc: Dongwon Kim <dongwon.kim@intel.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reported-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
ui/gtk-egl.c | 2 ++
1 file changed, 2 insertions(+)
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
@@ -155,10 +155,12 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds);
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
}
graphic_hw_update(dcl->con);
--
2.31.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [RFC PATCH-for-6.2] ui/gtk-egl: Fix build failure when libgbm is not available
2021-11-08 8:31 [RFC PATCH-for-6.2] ui/gtk-egl: Fix build failure when libgbm is not available Philippe Mathieu-Daudé
@ 2021-11-08 8:33 ` Laurent Vivier
2021-11-08 8:43 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Laurent Vivier @ 2021-11-08 8:33 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Mark Cave-Ayland, Vivek Kasireddy, Gerd Hoffmann, Dongwon Kim
Le 08/11/2021 à 09:31, Philippe Mathieu-Daudé a écrit :
> Since commit 4872a023a59 ("ui/gtk-egl: guest fb texture needs
> to be regenerated when reinitializing egl") we get on Ubuntu
> 18.04.4 LTS and Debian Buster (oldstable):
>
> $ ../configure --enable-virglrenderer
> [...]
> ui/gtk-egl.c: In function 'gd_egl_refresh':
> ui/gtk-egl.c:159:13: error: implicit declaration of function 'egl_dmabuf_release_texture' [-Werror=implicit-function-declaration]
> 159 | 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]
> ui/gtk-egl.c:159:13: error: nested extern declaration of 'egl_dmabuf_release_texture' [-Werror=nested-externs]
>
> Fix by restricting the egl_dmabuf_release_texture() call to the
> availability of the generic buffer management library (libgbm).
>
> Fixes: 4872a023a593e6519b272a
> Cc: Dongwon Kim <dongwon.kim@intel.com>
> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
> Reported-by: Laurent Vivier <laurent@vivier.eu>
> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> ui/gtk-egl.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> 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
> @@ -155,10 +155,12 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
> surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds);
> 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
> }
>
> graphic_hw_update(dcl->con);
>
On Fedora 34 too.
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Tested-by: Laurent Vivier <laurent@vivier.eu>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [RFC PATCH-for-6.2] ui/gtk-egl: Fix build failure when libgbm is not available
2021-11-08 8:31 [RFC PATCH-for-6.2] ui/gtk-egl: Fix build failure when libgbm is not available Philippe Mathieu-Daudé
2021-11-08 8:33 ` Laurent Vivier
@ 2021-11-08 8:43 ` Paolo Bonzini
1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2021-11-08 8:43 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel
Cc: Vivek Kasireddy, Gerd Hoffmann, Mark Cave-Ayland, Dongwon Kim,
Laurent Vivier
On 11/8/21 09:31, Philippe Mathieu-Daudé wrote:
> Since commit 4872a023a59 ("ui/gtk-egl: guest fb texture needs
> to be regenerated when reinitializing egl") we get on Ubuntu
> 18.04.4 LTS and Debian Buster (oldstable):
>
> $ ../configure --enable-virglrenderer
> [...]
> ui/gtk-egl.c: In function 'gd_egl_refresh':
> ui/gtk-egl.c:159:13: error: implicit declaration of function 'egl_dmabuf_release_texture' [-Werror=implicit-function-declaration]
> 159 | 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]
> ui/gtk-egl.c:159:13: error: nested extern declaration of 'egl_dmabuf_release_texture' [-Werror=nested-externs]
>
> Fix by restricting the egl_dmabuf_release_texture() call to the
> availability of the generic buffer management library (libgbm).
Matches other uses of the variable; queued the patch, thanks.
Paolo
> Fixes: 4872a023a593e6519b272a
> Cc: Dongwon Kim <dongwon.kim@intel.com>
> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
> Reported-by: Laurent Vivier <laurent@vivier.eu>
> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> ui/gtk-egl.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> 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
> @@ -155,10 +155,12 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
> surface_gl_destroy_texture(vc->gfx.gls, vc->gfx.ds);
> 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
> }
>
> graphic_hw_update(dcl->con);
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-11-08 8:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 8:31 [RFC PATCH-for-6.2] ui/gtk-egl: Fix build failure when libgbm is not available Philippe Mathieu-Daudé
2021-11-08 8:33 ` Laurent Vivier
2021-11-08 8:43 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).