aboutsummaryrefslogtreecommitdiff
path: root/ui/gtk.c
diff options
context:
space:
mode:
authorDongwon Kim <dongwon.kim@intel.com>2021-11-21 09:22:37 -0800
committerGerd Hoffmann <kraxel@redhat.com>2021-11-22 11:14:28 +0100
commitc3abdb2faff62e3ded21bf8c3ef493ed70785623 (patch)
tree1bdc1d63cc006454be2c88e3152080783a042bc1 /ui/gtk.c
parentf14aab420c58b57e07189d6d9e6d3fbfab4761a6 (diff)
ui/gtk: graphic_hw_gl_flushed after closing dmabuf->fence_fd
The dmabuf often becomes invalid right after unblocking pipeline and graphic_hw_gl_flushed in case a new scanout blob is submitted because the dmabuf associated with the current guest scanout is freed after swapping. So both graphic_hw_gl_block and graphic_hw_gl_flushed should be executed after closing fence_fd for the current dmabuf. Cc: Gerd Hoffmann <kraxel@redhat.com> Cc: Vivek Kasireddy <vivek.kasireddy@intel.com> Signed-off-by: Dongwon Kim <dongwon.kim@intel.com> Message-Id: <20211121172237.14937-1-dongwon.kim@intel.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r--ui/gtk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index dc4a1491f0..428f02f2df 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -589,11 +589,11 @@ void gd_hw_gl_flushed(void *vcon)
VirtualConsole *vc = vcon;
QemuDmaBuf *dmabuf = vc->gfx.guest_fb.dmabuf;
- graphic_hw_gl_block(vc->gfx.dcl.con, false);
- graphic_hw_gl_flushed(vc->gfx.dcl.con);
qemu_set_fd_handler(dmabuf->fence_fd, NULL, NULL, NULL);
close(dmabuf->fence_fd);
dmabuf->fence_fd = -1;
+ graphic_hw_gl_block(vc->gfx.dcl.con, false);
+ graphic_hw_gl_flushed(vc->gfx.dcl.con);
}
/** DisplayState Callbacks (opengl version) **/