From: Dongwon Kim <dongwon.kim@intel.com>
To: qemu-devel@nongnu.org
Cc: "Dongwon Kim" <dongwon.kim@intel.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Vivek Kasireddy" <vivek.kasireddy@intel.com>
Subject: [PATCH] ui/gtk: flush display pipeline before saving vmstate when blob=true
Date: Mon, 4 Dec 2023 18:40:51 +0000 [thread overview]
Message-ID: <20231204184051.16873-1-dongwon.kim@intel.com> (raw)
If the guest state is paused before it gets a response for the current
scanout frame submission (resource-flush), it won't start submitting
new frames after being restored as it still waits for the old response,
which is accepted as a scanout render done signal. So it's needed to
unblock the current scanout render pipeline before the run state is
changed to make sure the guest receives the response for the current
frame submission.
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
---
ui/gtk.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
index 810d7fc796..0f6237dd2f 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -678,6 +678,18 @@ static const DisplayGLCtxOps egl_ctx_ops = {
static void gd_change_runstate(void *opaque, bool running, RunState state)
{
GtkDisplayState *s = opaque;
+ int i;
+
+ if (state == RUN_STATE_SAVE_VM) {
+ for (i = 0; i < s->nb_vcs; i++) {
+ VirtualConsole *vc = &s->vc[i];
+
+ if (vc->gfx.guest_fb.dmabuf) {
+ /* force flushing current scanout blob rendering process */
+ gd_hw_gl_flushed(vc);
+ }
+ }
+ }
gd_update_caption(s);
}
--
2.34.1
next reply other threads:[~2023-12-05 2:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-04 18:40 Dongwon Kim [this message]
2023-12-05 7:14 ` [PATCH] ui/gtk: flush display pipeline before saving vmstate when blob=true Marc-André Lureau
2023-12-05 22:05 ` Kim, Dongwon
2023-12-06 7:02 ` Marc-André Lureau
2023-12-13 20:24 ` [PATCH 1/3] " Dongwon Kim
2023-12-13 20:24 ` [PATCH 2/3] ui/gtk: unblock pipeline only if fence hasn't been signaled yet Dongwon Kim
2023-12-15 8:36 ` Marc-André Lureau
2023-12-15 12:49 ` BALATON Zoltan
2023-12-28 18:40 ` Kim, Dongwon
2023-12-13 20:24 ` [PATCH 3/3] virtio-gpu: first surface update with blob scanout after resumed Dongwon Kim
2024-03-05 12:56 ` Marc-André Lureau
2024-03-05 22:22 ` [PATCH 1/2] ui/gtk: flush display pipeline before saving vmstate when blob=true dongwon.kim
2024-03-05 22:22 ` [PATCH 2/2] virtio-gpu: first surface update with blob scanout after resumed dongwon.kim
2024-03-06 8:42 ` Marc-André Lureau
2023-12-15 8:33 ` [PATCH 1/3] ui/gtk: flush display pipeline before saving vmstate when blob=true Marc-André Lureau
2023-12-29 7:28 ` Kasireddy, Vivek
2023-12-29 19:22 ` Kim, Dongwon
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=20231204184051.16873-1-dongwon.kim@intel.com \
--to=dongwon.kim@intel.com \
--cc=marcandre.lureau@redhat.com \
--cc=qemu-devel@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).