qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Akihiko Odaki <akihiko.odaki@daynix.com>
To: "Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Cc: Gert Wollny <gert.wollny@collabora.com>,
	qemu-devel@nongnu.org,
	Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Subject: Re: [PATCH v1 2/2] ui/gtk: Don't disable scanout when display is refreshed
Date: Tue, 8 Oct 2024 03:15:27 +0900	[thread overview]
Message-ID: <94909191-a1de-4be7-bbf1-0056fd8b2887@daynix.com> (raw)
In-Reply-To: <20241006234353.3201037-3-dmitry.osipenko@collabora.com>

On 2024/10/07 8:43, Dmitry Osipenko wrote:
> Display refreshment is invoked by a timer and it erroneously disables
> the active scanout if it happens to be invoked after scanout has been
> enabled. This offending scanout-disable race condition with a timer
> can be easily hit when Qemu runs with a disabled vsync by using SDL or
> GTK displays (with vblank_mode=0 for GTK). Refreshment of display's
> content shouldn't disable the active display. Fix it by keeping the
> scanout's state unchanged when display is redrawn.
> 
> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>

Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>

> ---
>   ui/gtk-egl.c     | 1 -
>   ui/gtk-gl-area.c | 1 -
>   2 files changed, 2 deletions(-)
> 
> diff --git a/ui/gtk-egl.c b/ui/gtk-egl.c
> index 9831c10e1bd5..6b85a51c4284 100644
> --- a/ui/gtk-egl.c
> +++ b/ui/gtk-egl.c
> @@ -179,7 +179,6 @@ void gd_egl_refresh(DisplayChangeListener *dcl)
>   
>       if (vc->gfx.glupdates) {
>           vc->gfx.glupdates = 0;
> -        gtk_egl_set_scanout_mode(vc, false);
>           gd_egl_draw(vc);
>       }
>   }
> diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
> index b628b354510d..b00817abc011 100644
> --- a/ui/gtk-gl-area.c
> +++ b/ui/gtk-gl-area.c
> @@ -148,7 +148,6 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
>   
>       if (vc->gfx.glupdates) {
>           vc->gfx.glupdates = 0;
> -        gtk_gl_area_set_scanout_mode(vc, false);
>           gtk_gl_area_queue_render(GTK_GL_AREA(vc->gfx.drawing_area));
>       }
>   }



  reply	other threads:[~2024-10-07 18:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-06 23:43 [PATCH v1 0/2] GTK/SDL fixes for a black screen displayed by virtio-gpu Dmitry Osipenko
2024-10-06 23:43 ` [PATCH v1 1/2] ui/sdl2: Don't disable scanout when display is refreshed Dmitry Osipenko
2024-10-07 18:15   ` Akihiko Odaki
2024-10-07 19:17     ` Bernhard Beschow
2024-11-18 16:24     ` Dmitry Osipenko
2024-10-06 23:43 ` [PATCH v1 2/2] ui/gtk: " Dmitry Osipenko
2024-10-07 18:15   ` Akihiko Odaki [this message]
2024-10-07 19:26 ` [PATCH v1 0/2] GTK/SDL fixes for a black screen displayed by virtio-gpu Michael Tokarev
2024-10-07 20:19   ` Dmitry Osipenko
2024-10-07 20:48     ` Michael Tokarev
2024-10-07 20:59       ` Dmitry Osipenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=94909191-a1de-4be7-bbf1-0056fd8b2887@daynix.com \
    --to=akihiko.odaki@daynix.com \
    --cc=alex.bennee@linaro.org \
    --cc=dmitry.osipenko@collabora.com \
    --cc=gert.wollny@collabora.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=philmd@linaro.org \
    --cc=pierre-eric.pelloux-prayer@amd.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).