* [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path
@ 2023-11-11 10:40 Volker Rümelin
2023-11-11 12:50 ` Volker Rümelin
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Volker Rümelin @ 2023-11-11 10:40 UTC (permalink / raw)
To: Gerd Hoffmann, Marc-André Lureau
Cc: Michael Tokarev, qemu-devel, qemu-stable
Commit 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing
scanout") introduced a regression when QEMU is running with a
virtio-gpu-gl-device on a host under X11. After the guest has
initialized the virtio-gpu-gl-device, the guest screen only
shows "Display output is not active.".
Commit 6f189a08c1 moved all function calls in
gd_egl_scanout_texture() to a code path which is only called
once after gd_egl_init() succeeds in gd_egl_scanout_texture().
Move all function calls in gd_egl_scanout_texture() back to
the regular code path so they get always called if one of the
gd_egl_init() calls was successful.
Fixes: 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing scanout")
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
---
ui/gtk-egl.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
index cd2f176502..3af5ac5bcf 100644
--- a/ui/gtk-egl.c
+++ b/ui/gtk-egl.c
@@ -249,14 +249,14 @@ void gd_egl_scanout_texture(DisplayChangeListener *dcl,
if (!vc->gfx.esurface) {
return;
}
+ }
- eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
- vc->gfx.esurface, vc->gfx.ectx);
+ eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
+ vc->gfx.esurface, vc->gfx.ectx);
- gtk_egl_set_scanout_mode(vc, true);
- egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
- backing_id, false);
- }
+ gtk_egl_set_scanout_mode(vc, true);
+ egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
+ backing_id, false);
}
void gd_egl_scanout_dmabuf(DisplayChangeListener *dcl,
--
2.35.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path
2023-11-11 10:40 [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path Volker Rümelin
@ 2023-11-11 12:50 ` Volker Rümelin
2023-11-13 8:26 ` Marc-André Lureau
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Volker Rümelin @ 2023-11-11 12:50 UTC (permalink / raw)
To: Gerd Hoffmann, Marc-André Lureau
Cc: Antonio Caggiano, Michael Tokarev, qemu-devel, qemu-stable
Cc: Antonio
> Commit 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing
> scanout") introduced a regression when QEMU is running with a
> virtio-gpu-gl-device on a host under X11. After the guest has
> initialized the virtio-gpu-gl-device, the guest screen only
> shows "Display output is not active.".
>
> Commit 6f189a08c1 moved all function calls in
> gd_egl_scanout_texture() to a code path which is only called
> once after gd_egl_init() succeeds in gd_egl_scanout_texture().
> Move all function calls in gd_egl_scanout_texture() back to
> the regular code path so they get always called if one of the
> gd_egl_init() calls was successful.
>
> Fixes: 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing scanout")
> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
> ---
> ui/gtk-egl.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
> index cd2f176502..3af5ac5bcf 100644
> --- a/ui/gtk-egl.c
> +++ b/ui/gtk-egl.c
> @@ -249,14 +249,14 @@ void gd_egl_scanout_texture(DisplayChangeListener *dcl,
> if (!vc->gfx.esurface) {
> return;
> }
> + }
>
> - eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
> - vc->gfx.esurface, vc->gfx.ectx);
> + eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
> + vc->gfx.esurface, vc->gfx.ectx);
>
> - gtk_egl_set_scanout_mode(vc, true);
> - egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
> - backing_id, false);
> - }
> + gtk_egl_set_scanout_mode(vc, true);
> + egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
> + backing_id, false);
> }
>
> void gd_egl_scanout_dmabuf(DisplayChangeListener *dcl,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path
2023-11-11 10:40 [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path Volker Rümelin
2023-11-11 12:50 ` Volker Rümelin
@ 2023-11-13 8:26 ` Marc-André Lureau
2023-12-03 16:37 ` Volker Rümelin
2023-11-13 9:53 ` Antonio Caggiano
2023-11-24 6:26 ` Michael Tokarev
3 siblings, 1 reply; 6+ messages in thread
From: Marc-André Lureau @ 2023-11-13 8:26 UTC (permalink / raw)
To: Volker Rümelin
Cc: Gerd Hoffmann, Michael Tokarev, qemu-devel, qemu-stable
Hi
On Sat, Nov 11, 2023 at 2:40 PM Volker Rümelin <vr_qemu@t-online.de> wrote:
>
> Commit 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing
> scanout") introduced a regression when QEMU is running with a
> virtio-gpu-gl-device on a host under X11. After the guest has
> initialized the virtio-gpu-gl-device, the guest screen only
> shows "Display output is not active.".
>
> Commit 6f189a08c1 moved all function calls in
> gd_egl_scanout_texture() to a code path which is only called
> once after gd_egl_init() succeeds in gd_egl_scanout_texture().
> Move all function calls in gd_egl_scanout_texture() back to
> the regular code path so they get always called if one of the
> gd_egl_init() calls was successful.
>
> Fixes: 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing scanout")
> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> ui/gtk-egl.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
> index cd2f176502..3af5ac5bcf 100644
> --- a/ui/gtk-egl.c
> +++ b/ui/gtk-egl.c
> @@ -249,14 +249,14 @@ void gd_egl_scanout_texture(DisplayChangeListener *dcl,
> if (!vc->gfx.esurface) {
> return;
> }
> + }
>
> - eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
> - vc->gfx.esurface, vc->gfx.ectx);
> + eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
> + vc->gfx.esurface, vc->gfx.ectx);
>
> - gtk_egl_set_scanout_mode(vc, true);
> - egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
> - backing_id, false);
> - }
> + gtk_egl_set_scanout_mode(vc, true);
> + egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
> + backing_id, false);
> }
>
> void gd_egl_scanout_dmabuf(DisplayChangeListener *dcl,
> --
> 2.35.3
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path
2023-11-11 10:40 [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path Volker Rümelin
2023-11-11 12:50 ` Volker Rümelin
2023-11-13 8:26 ` Marc-André Lureau
@ 2023-11-13 9:53 ` Antonio Caggiano
2023-11-24 6:26 ` Michael Tokarev
3 siblings, 0 replies; 6+ messages in thread
From: Antonio Caggiano @ 2023-11-13 9:53 UTC (permalink / raw)
To: qemu-devel
Hi Volker,
Thank you for finding this!
On 11/11/2023 11:40, Volker Rümelin wrote:
> Commit 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing
> scanout") introduced a regression when QEMU is running with a
> virtio-gpu-gl-device on a host under X11. After the guest has
> initialized the virtio-gpu-gl-device, the guest screen only
> shows "Display output is not active.".
>
> Commit 6f189a08c1 moved all function calls in
> gd_egl_scanout_texture() to a code path which is only called
> once after gd_egl_init() succeeds in gd_egl_scanout_texture().
> Move all function calls in gd_egl_scanout_texture() back to
> the regular code path so they get always called if one of the
> gd_egl_init() calls was successful.
>
> Fixes: 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing scanout")
> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Reviewed by: Antonio Caggiano <quic_acaggian@quicinc.com>
> ---
> ui/gtk-egl.c | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
> index cd2f176502..3af5ac5bcf 100644
> --- a/ui/gtk-egl.c
> +++ b/ui/gtk-egl.c
> @@ -249,14 +249,14 @@ void gd_egl_scanout_texture(DisplayChangeListener *dcl,
> if (!vc->gfx.esurface) {
> return;
> }
> + }
>
> - eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
> - vc->gfx.esurface, vc->gfx.ectx);
> + eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
> + vc->gfx.esurface, vc->gfx.ectx);
>
> - gtk_egl_set_scanout_mode(vc, true);
> - egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
> - backing_id, false);
> - }
> + gtk_egl_set_scanout_mode(vc, true);
> + egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
> + backing_id, false);
> }
>
> void gd_egl_scanout_dmabuf(DisplayChangeListener *dcl,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path
2023-11-11 10:40 [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path Volker Rümelin
` (2 preceding siblings ...)
2023-11-13 9:53 ` Antonio Caggiano
@ 2023-11-24 6:26 ` Michael Tokarev
3 siblings, 0 replies; 6+ messages in thread
From: Michael Tokarev @ 2023-11-24 6:26 UTC (permalink / raw)
To: Volker Rümelin, Gerd Hoffmann, Marc-André Lureau
Cc: qemu-devel, qemu-stable
11.11.2023 13:40, Volker Rümelin wrote:
> Commit 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing
> scanout") introduced a regression when QEMU is running with a
> virtio-gpu-gl-device on a host under X11. After the guest has
> initialized the virtio-gpu-gl-device, the guest screen only
> shows "Display output is not active.".
>
> Commit 6f189a08c1 moved all function calls in
> gd_egl_scanout_texture() to a code path which is only called
> once after gd_egl_init() succeeds in gd_egl_scanout_texture().
> Move all function calls in gd_egl_scanout_texture() back to
> the regular code path so they get always called if one of the
> gd_egl_init() calls was successful.
>
> Fixes:
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path
2023-11-13 8:26 ` Marc-André Lureau
@ 2023-12-03 16:37 ` Volker Rümelin
0 siblings, 0 replies; 6+ messages in thread
From: Volker Rümelin @ 2023-12-03 16:37 UTC (permalink / raw)
To: Marc-André Lureau
Cc: Gerd Hoffmann, Antonio Caggiano, Michael Tokarev, qemu-devel,
qemu-stable
Am 13.11.23 um 09:26 schrieb Marc-André Lureau:
> Hi
>
> On Sat, Nov 11, 2023 at 2:40 PM Volker Rümelin <vr_qemu@t-online.de> wrote:
>> Commit 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing
>> scanout") introduced a regression when QEMU is running with a
>> virtio-gpu-gl-device on a host under X11. After the guest has
>> initialized the virtio-gpu-gl-device, the guest screen only
>> shows "Display output is not active.".
>>
>> Commit 6f189a08c1 moved all function calls in
>> gd_egl_scanout_texture() to a code path which is only called
>> once after gd_egl_init() succeeds in gd_egl_scanout_texture().
>> Move all function calls in gd_egl_scanout_texture() back to
>> the regular code path so they get always called if one of the
>> gd_egl_init() calls was successful.
>>
>> Fixes: 6f189a08c1 ("ui/gtk-egl: Check EGLSurface before doing scanout")
>> Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Hi Marc-André,
as the de facto maintainer of the ui directory, could you please send a
pull request for this patch for 8.2-rc3?
With best regards,
Volker
>> ---
>> ui/gtk-egl.c | 12 ++++++------
>> 1 file changed, 6 insertions(+), 6 deletions(-)
>>
>> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
>> index cd2f176502..3af5ac5bcf 100644
>> --- a/ui/gtk-egl.c
>> +++ b/ui/gtk-egl.c
>> @@ -249,14 +249,14 @@ void gd_egl_scanout_texture(DisplayChangeListener *dcl,
>> if (!vc->gfx.esurface) {
>> return;
>> }
>> + }
>>
>> - eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
>> - vc->gfx.esurface, vc->gfx.ectx);
>> + eglMakeCurrent(qemu_egl_display, vc->gfx.esurface,
>> + vc->gfx.esurface, vc->gfx.ectx);
>>
>> - gtk_egl_set_scanout_mode(vc, true);
>> - egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
>> - backing_id, false);
>> - }
>> + gtk_egl_set_scanout_mode(vc, true);
>> + egl_fb_setup_for_tex(&vc->gfx.guest_fb, backing_width, backing_height,
>> + backing_id, false);
>> }
>>
>> void gd_egl_scanout_dmabuf(DisplayChangeListener *dcl,
>> --
>> 2.35.3
>>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-12-03 16:38 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-11 10:40 [PATCH for 8.2] ui/gtk-egl: move function calls back to regular code path Volker Rümelin
2023-11-11 12:50 ` Volker Rümelin
2023-11-13 8:26 ` Marc-André Lureau
2023-12-03 16:37 ` Volker Rümelin
2023-11-13 9:53 ` Antonio Caggiano
2023-11-24 6:26 ` Michael Tokarev
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).