From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Dongwon Kim" <dongwon.kim@intel.com>,
"Dmitry Osipenko" <dmitry.osipenko@collabora.com>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Vivek Kasireddy" <vivek.kasireddy@intel.com>,
qemu-stable@nongnu.org
Subject: [PULL 05/11] ui/gtk-gl-area: Remove extra draw call in refresh
Date: Mon, 20 Oct 2025 11:41:43 +0100 [thread overview]
Message-ID: <20251020104149.4034124-6-alex.bennee@linaro.org> (raw)
In-Reply-To: <20251020104149.4034124-1-alex.bennee@linaro.org>
From: Dongwon Kim <dongwon.kim@intel.com>
This partially reverts commit 77bf310084dad38b3a2badf01766c659056f1cf2
which causes some guest display corruption when gtk-gl-area
is used for GTK rendering (e.g. Wayland Compositor) possibly due to
simulataneous accesses on the guest frame buffer by host compositor
and the guest.
Fixes: 77bf310084 ("ui/gtk: Draw guest frame at refresh cycle")
Reported-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reported-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Message-Id: <20250214170813.2234754-1-dongwon.kim@intel.com>
Message-ID: <20250603110204.838117-12-alex.bennee@linaro.org>
Cc: qemu-stable@nongnu.org
Message-ID: <20251016150357.876415-6-alex.bennee@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
diff --git a/ui/gtk-gl-area.c b/ui/gtk-gl-area.c
index 05fc38096ec..cd86022d264 100644
--- a/ui/gtk-gl-area.c
+++ b/ui/gtk-gl-area.c
@@ -165,7 +165,22 @@ void gd_gl_area_refresh(DisplayChangeListener *dcl)
if (vc->gfx.guest_fb.dmabuf &&
qemu_dmabuf_get_draw_submitted(vc->gfx.guest_fb.dmabuf)) {
- gd_gl_area_draw(vc);
+ /*
+ * gd_egl_refresh() calls gd_egl_draw() if a DMA-BUF draw has already
+ * been submitted, but this function does not call gd_gl_area_draw() in
+ * such a case due to display corruption.
+ *
+ * Calling gd_gl_area_draw() is necessary to prevent a situation where
+ * there is a scheduled draw event but it won't happen bacause the window
+ * is currently in inactive state (minimized or tabified). If draw is not
+ * done for a long time, gl_block timeout and/or fence timeout (on the
+ * guest) will happen eventually.
+ *
+ * However, it is found that calling gd_gl_area_draw() here causes guest
+ * display corruption on a Wayland Compositor. The display corruption is
+ * more serious than the possible fence timeout so gd_gl_area_draw() is
+ * omitted for now.
+ */
return;
}
--
2.47.3
next prev parent reply other threads:[~2025-10-20 10:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-20 10:41 [PULL 00/11] maintainer updates (gitlab, check-tcg, virtio-gpu, plugins, docs) Alex Bennée
2025-10-20 10:41 ` [PULL 01/11] gitlab: use template for ubuntu-24.04-aarch64 jobs Alex Bennée
2025-10-20 10:41 ` [PULL 02/11] gitlab: drop aarch32 runner and associated bits Alex Bennée
2025-10-20 10:41 ` [PULL 03/11] tests/tcg/multiarch/linux/linux-test: Don't try to test atime update Alex Bennée
2025-10-20 10:41 ` [PULL 04/11] Support per-head resolutions with virtio-gpu Alex Bennée
2025-10-20 11:55 ` Markus Armbruster
2025-10-20 12:46 ` Alex Bennée
2025-10-20 10:41 ` Alex Bennée [this message]
2025-10-20 10:41 ` [PULL 06/11] hw/display: add blob map/unmap trace events Alex Bennée
2025-10-20 10:41 ` [PULL 07/11] contrib/plugins/uftrace_symbols.py: generate debug files to map symbols to source Alex Bennée
2025-10-20 10:41 ` [PULL 08/11] docs/system: split VirtIO devices from the rest Alex Bennée
2025-10-20 10:41 ` [PULL 09/11] docs/system: unify the naming style for VirtIO devices Alex Bennée
2025-10-20 10:41 ` [PULL 10/11] docs/system: drop vhost-user-rng docs Alex Bennée
2025-10-20 10:41 ` [PULL 11/11] docs/system: merge vhost-user-input into vhost-user-contrib Alex Bennée
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=20251020104149.4034124-6-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=dmitry.osipenko@collabora.com \
--cc=dongwon.kim@intel.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
--cc=vivek.kasireddy@intel.com \
/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).