[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v6 07/10] ui/gtk: Don't disable scanout when display is refreshed
From: |
Dmitry Osipenko |
Subject: |
[PATCH v6 07/10] ui/gtk: Don't disable scanout when display is refreshed |
Date: |
Sun, 26 Jan 2025 23:11:18 +0300 |
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.
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.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 f7a428c86a8d..0d1547d63ad0 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 2c9a0db42571..53d81124f211 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));
}
}
--
2.47.1
- [PATCH v6 00/10] Support virtio-gpu DRM native context, Dmitry Osipenko, 2025/01/26
- [PATCH v6 01/10] ui/sdl2: Restore original context after new context creation, Dmitry Osipenko, 2025/01/26
- [PATCH v6 02/10] ui/sdl2: Implement dpy dmabuf functions, Dmitry Osipenko, 2025/01/26
- [PATCH v6 03/10] virtio-gpu: Handle virgl fence creation errors, Dmitry Osipenko, 2025/01/26
- [PATCH v6 04/10] virtio-gpu: Support asynchronous fencing, Dmitry Osipenko, 2025/01/26
- [PATCH v6 05/10] virtio-gpu: Support DRM native context, Dmitry Osipenko, 2025/01/26
- [PATCH v6 06/10] ui/sdl2: Don't disable scanout when display is refreshed, Dmitry Osipenko, 2025/01/26
- [PATCH v6 07/10] ui/gtk: Don't disable scanout when display is refreshed,
Dmitry Osipenko <=
- [PATCH v6 08/10] docs/system: virtio-gpu: Add link to Mesa VirGL doc, Dmitry Osipenko, 2025/01/26
- [PATCH v6 09/10] docs/system: virtio-gpu: Update Venus link, Dmitry Osipenko, 2025/01/26
- [PATCH v6 10/10] docs/system: virtio-gpu: Document host/guest requirements, Dmitry Osipenko, 2025/01/26
- Re: [PATCH v6 10/10] docs/system: virtio-gpu: Document host/guest requirements, Gurchetan Singh, 2025/01/28
- Re: [PATCH v6 00/10] Support virtio-gpu DRM native context, Alex Bennée, 2025/01/27