[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1 2/5] ui: Add a helper to wait on a dmabuf sync object
From: |
Vivek Kasireddy |
Subject: |
[PATCH v1 2/5] ui: Add a helper to wait on a dmabuf sync object |
Date: |
Mon, 7 Jun 2021 16:25:27 -0700 |
This will be called by virtio-gpu in the subsequent patches.
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
---
include/ui/console.h | 5 +++++
ui/console.c | 10 ++++++++++
2 files changed, 15 insertions(+)
diff --git a/include/ui/console.h b/include/ui/console.h
index b30b63976a..c3dca61c31 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -240,6 +240,9 @@ typedef struct DisplayChangeListenerOps {
/* optional */
void (*dpy_gl_release_dmabuf)(DisplayChangeListener *dcl,
QemuDmaBuf *dmabuf);
+ /* optional */
+ void (*dpy_gl_wait_dmabuf)(DisplayChangeListener *dcl,
+ QemuDmaBuf *dmabuf);
/* required if GL */
void (*dpy_gl_update)(DisplayChangeListener *dcl,
uint32_t x, uint32_t y, uint32_t w, uint32_t h);
@@ -312,6 +315,8 @@ void dpy_gl_cursor_position(QemuConsole *con,
uint32_t pos_x, uint32_t pos_y);
void dpy_gl_release_dmabuf(QemuConsole *con,
QemuDmaBuf *dmabuf);
+void dpy_gl_wait_dmabuf(QemuConsole *con,
+ QemuDmaBuf *dmabuf);
void dpy_gl_update(QemuConsole *con,
uint32_t x, uint32_t y, uint32_t w, uint32_t h);
diff --git a/ui/console.c b/ui/console.c
index 2de5f4105b..b0abfd2246 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1917,6 +1917,16 @@ void dpy_gl_release_dmabuf(QemuConsole *con,
}
}
+void dpy_gl_wait_dmabuf(QemuConsole *con,
+ QemuDmaBuf *dmabuf)
+{
+ assert(con->gl);
+
+ if (con->gl->ops->dpy_gl_wait_dmabuf) {
+ con->gl->ops->dpy_gl_wait_dmabuf(con->gl, dmabuf);
+ }
+}
+
void dpy_gl_update(QemuConsole *con,
uint32_t x, uint32_t y, uint32_t w, uint32_t h)
{
--
2.30.2
- [PATCH v1 0/5] virtio-gpu: Add implicit (and default) sync mechanism for blobs, Vivek Kasireddy, 2021/06/07
- [PATCH v1 2/5] ui: Add a helper to wait on a dmabuf sync object,
Vivek Kasireddy <=
- [PATCH v1 5/5] virtio-gpu: Make resource_flush wait on the sync object for blobs, Vivek Kasireddy, 2021/06/07
- [PATCH v1 3/5] ui/egl: Add egl helpers to help with synchronization, Vivek Kasireddy, 2021/06/07
- [PATCH v1 4/5] ui: Create sync objects only for blobs, Vivek Kasireddy, 2021/06/07
- [PATCH v1 1/5] ui/gtk: Create a common release_dmabuf helper, Vivek Kasireddy, 2021/06/07
- Re: [PATCH v1 0/5] virtio-gpu: Add implicit (and default) sync mechanism for blobs, no-reply, 2021/06/09