[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 3/8] ui/gtk: graphic_hw_gl_flushed after closing dmabuf->fence_fd
From: |
Gerd Hoffmann |
Subject: |
[PULL 3/8] ui/gtk: graphic_hw_gl_flushed after closing dmabuf->fence_fd |
Date: |
Mon, 22 Nov 2021 13:40:10 +0100 |
From: Dongwon Kim <dongwon.kim@intel.com>
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>
---
ui/gtk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index dc4a1491f0ce..428f02f2dfe1 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) **/
--
2.33.1
- [PULL 0/8] Fixes 20211122 patches, Gerd Hoffmann, 2021/11/22
- [PULL 1/8] ui: fix incorrect scaling on highdpi with gtk/opengl, Gerd Hoffmann, 2021/11/22
- [PULL 3/8] ui/gtk: graphic_hw_gl_flushed after closing dmabuf->fence_fd,
Gerd Hoffmann <=
- [PULL 2/8] ui: fix incorrect pointer position on highdpi with gtk, Gerd Hoffmann, 2021/11/22
- [PULL 5/8] migration: fix dump-vmstate with modules, Gerd Hoffmann, 2021/11/22
- [PULL 4/8] ui/vnc-clipboard: fix adding notifier twice, Gerd Hoffmann, 2021/11/22
- [PULL 7/8] microvm: add missing g_free() call, Gerd Hoffmann, 2021/11/22
- [PULL 6/8] hw/i386/microvm: Reduce annoying debug message in dt_setup_microvm(), Gerd Hoffmann, 2021/11/22
- [PULL 8/8] microvm: check g_file_set_contents() return value, Gerd Hoffmann, 2021/11/22
- Re: [PULL 0/8] Fixes 20211122 patches, Richard Henderson, 2021/11/22