qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ui/gtk: flush display pipeline before saving vmstate when blob=true
@ 2023-12-04 18:40 Dongwon Kim
  2023-12-05  7:14 ` Marc-André Lureau
  2023-12-13 20:24 ` [PATCH 1/3] " Dongwon Kim
  0 siblings, 2 replies; 17+ messages in thread
From: Dongwon Kim @ 2023-12-04 18:40 UTC (permalink / raw)
  To: qemu-devel; +Cc: Dongwon Kim, Marc-André Lureau, Vivek Kasireddy

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



^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2024-03-06  8:44 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-04 18:40 [PATCH] ui/gtk: flush display pipeline before saving vmstate when blob=true Dongwon Kim
2023-12-05  7:14 ` 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

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).