qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/8] virtio-gpu: Add a default synchronization mechanism for blobs
@ 2021-06-10 22:48 Vivek Kasireddy
  2021-06-10 22:48 ` [PATCH v2 1/8] ui/gtk: Create a common release_dmabuf helper Vivek Kasireddy
                   ` (8 more replies)
  0 siblings, 9 replies; 14+ messages in thread
From: Vivek Kasireddy @ 2021-06-10 22:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: Dongwon Kim, Tina Zhang, Vivek Kasireddy, Gerd Hoffmann

When the Guest and Host are using Blob resources, there is a chance
that they may use the underlying storage associated with a Blob at
the same time leading to glitches such as flickering or tearing.
To prevent these from happening, the Host needs to ensure that it
waits until its Blit is completed by the Host GPU before letting
the Guest reuse the Blob.

This should be the default behavior regardless of the type of Guest
that is using Blob resources but would be particularly useful for 
Guests that are using frontbuffer rendering such as Linux with X
or Windows 10, etc.

The way it works is the Guest includes a fence as part of 
resource_flush and waits for it to be signalled. The Host will
queue a repaint request and signal the fence after it completes
waiting on the sync object associated with the Blit.

v2:
- Added more description in the cover letter
- Removed the wait from resource_flush and included it in
  a gl_flushed() callback

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>
Cc: Tina Zhang <tina.zhang@intel.com>

Vivek Kasireddy (8):
  ui/gtk: Create a common release_dmabuf helper
  ui/egl: Add egl helpers to help with synchronization
  ui: Add a helper to wait on a dmabuf sync object
  ui/gtk: Implement wait_dmabuf function
  ui: Create sync objects only for blobs
  ui/gtk-egl: Wait for the draw signal for dmabuf blobs
  virtio-gpu: Add dmabuf helpers for synchronization
  virtio-gpu: Add gl_flushed callback

 hw/display/virtio-gpu-udmabuf.c | 30 ++++++++++++++++++++++
 hw/display/virtio-gpu.c         | 44 ++++++++++++++++++++++++++++++++-
 include/hw/virtio/virtio-gpu.h  |  2 ++
 include/ui/console.h            |  8 ++++++
 include/ui/egl-helpers.h        |  4 +++
 include/ui/gtk.h                |  4 +--
 stubs/virtio-gpu-udmabuf.c      |  6 +++++
 ui/console.c                    | 10 ++++++++
 ui/egl-helpers.c                | 44 +++++++++++++++++++++++++++++++++
 ui/gtk-egl.c                    | 32 ++++++++++++++++++------
 ui/gtk-gl-area.c                |  8 ++++++
 ui/gtk.c                        | 28 +++++++++++++++++++--
 12 files changed, 207 insertions(+), 13 deletions(-)

-- 
2.30.2



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

end of thread, other threads:[~2021-06-15 23:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 22:48 [PATCH v2 0/8] virtio-gpu: Add a default synchronization mechanism for blobs Vivek Kasireddy
2021-06-10 22:48 ` [PATCH v2 1/8] ui/gtk: Create a common release_dmabuf helper Vivek Kasireddy
2021-06-10 22:48 ` [PATCH v2 2/8] ui/egl: Add egl helpers to help with synchronization Vivek Kasireddy
2021-06-15  5:31   ` Gerd Hoffmann
2021-06-15 23:11     ` Kasireddy, Vivek
2021-06-10 22:48 ` [PATCH v2 3/8] ui: Add a helper to wait on a dmabuf sync object Vivek Kasireddy
2021-06-10 22:48 ` [PATCH v2 4/8] ui/gtk: Implement wait_dmabuf function Vivek Kasireddy
2021-06-10 22:48 ` [PATCH v2 5/8] ui: Create sync objects only for blobs Vivek Kasireddy
2021-06-10 22:48 ` [PATCH v2 6/8] ui/gtk-egl: Wait for the draw signal for dmabuf blobs Vivek Kasireddy
2021-06-10 22:48 ` [PATCH v2 7/8] virtio-gpu: Add dmabuf helpers for synchronization Vivek Kasireddy
2021-06-10 22:48 ` [PATCH v2 8/8] virtio-gpu: Add gl_flushed callback Vivek Kasireddy
2021-06-15  5:50   ` Gerd Hoffmann
2021-06-15 23:34     ` Kasireddy, Vivek
2021-06-14 22:48 ` [PATCH v2 0/8] virtio-gpu: Add a default synchronization mechanism for blobs no-reply

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