[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 12/33] ui/gtk: making dmabuf NULL when it's released.
From: |
marcandre . lureau |
Subject: |
[PULL 12/33] ui/gtk: making dmabuf NULL when it's released. |
Date: |
Tue, 27 Jun 2023 15:02:09 +0200 |
From: Dongwon Kim <dongwon.kim@intel.com>
Set vc->gfx.guest_fb.dmabuf to NULL to prevent any further access
to it after the dmabuf is released.
v2: move declaration of vc inside ifdef
Cc: Gerd Hoffmann <kraxel@redhat.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>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20230627005316.5627-1-dongwon.kim@intel.com>
---
ui/gtk.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
index e09e164482..8ba41c8f13 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -583,7 +583,12 @@ static void gd_gl_release_dmabuf(DisplayChangeListener
*dcl,
QemuDmaBuf *dmabuf)
{
#ifdef CONFIG_GBM
+ VirtualConsole *vc = container_of(dcl, VirtualConsole, gfx.dcl);
+
egl_dmabuf_release_texture(dmabuf);
+ if (vc->gfx.guest_fb.dmabuf == dmabuf) {
+ vc->gfx.guest_fb.dmabuf = NULL;
+ }
#endif
}
--
2.41.0
- [PULL 00/33] UI patches, marcandre . lureau, 2023/06/27
- [PULL 08/33] virtio-gpu: Make non-gl display updates work again when blob=true, marcandre . lureau, 2023/06/27
- [PULL 02/33] egl: no need to lookup EGL functions manually, marcandre . lureau, 2023/06/27
- [PULL 06/33] ui/touch: Move event handling to a common helper, marcandre . lureau, 2023/06/27
- [PULL 05/33] chardev/char-win-stdio: Support VT sequences on Windows 11 host, marcandre . lureau, 2023/06/27
- [PULL 04/33] virtio-gpu: Optimize 2D resource data transfer, marcandre . lureau, 2023/06/27
- [PULL 03/33] ui/sdl2: OpenGL window context, marcandre . lureau, 2023/06/27
- [PULL 07/33] ui/dbus: Expose a touch device interface, marcandre . lureau, 2023/06/27
- [PULL 01/33] ui: return NULL when getting cursor without a console, marcandre . lureau, 2023/06/27
- [PULL 15/33] ui/dbus: compile without gio/gunixfdlist.h, marcandre . lureau, 2023/06/27
- [PULL 12/33] ui/gtk: making dmabuf NULL when it's released.,
marcandre . lureau <=
- [PULL 09/33] virtio-gpu-udmabuf: create udmabuf for blob even when iov_cnt == 1, marcandre . lureau, 2023/06/27
- [PULL 18/33] qtest: add qtest_pid(), marcandre . lureau, 2023/06/27
- [PULL 16/33] scripts: add a XML preprocessor script, marcandre . lureau, 2023/06/27
- [PULL 14/33] ui/egl: fix make_context_current() callback return value, marcandre . lureau, 2023/06/27
- [PULL 13/33] ui/egl: export qemu_egl_get_error_string(), marcandre . lureau, 2023/06/27
- [PULL 19/33] tests: make dbus-display-test work on win32, marcandre . lureau, 2023/06/27
- [PULL 23/33] ui/dbus: use shared memory when possible on win32, marcandre . lureau, 2023/06/27
- [PULL 24/33] ui: add egl-headless support on win32, marcandre . lureau, 2023/06/27
- [PULL 22/33] virtio-gpu/win32: allocate shareable 2d resources/images, marcandre . lureau, 2023/06/27
- [PULL 11/33] virtio-gpu: OUT_OF_MEMORY if failing to create udmabuf, marcandre . lureau, 2023/06/27