From: Vivek Kasireddy <vivek.kasireddy@intel.com>
To: qemu-devel@nongnu.org
Cc: Dongwon Kim <dongwon.kim@intel.com>,
Tina Zhang <tina.zhang@intel.com>,
Vivek Kasireddy <vivek.kasireddy@intel.com>,
Gerd Hoffmann <kraxel@redhat.com>
Subject: [PATCH v3 0/5] virtio-gpu: Add a default synchronization mechanism for blobs
Date: Mon, 21 Jun 2021 12:24:20 -0700 [thread overview]
Message-ID: <20210621192425.1188442-1-vivek.kasireddy@intel.com> (raw)
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
v3:
- Instead of explicitly waiting on the sync object and stalling the
thread, add the relevant fence fd to Qemu's main loop and wait
for it to be signalled. (suggested by Gerd Hoffmann)
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dongwon Kim <dongwon.kim@intel.com>
Cc: Tina Zhang <tina.zhang@intel.com>
Vivek Kasireddy (5):
ui/gtk: Create a common release_dmabuf helper
ui/egl: Add egl helpers to help with synchronization
ui: Create sync objects and fences only for blobs
ui/gtk-egl: Wait for the draw signal for dmabuf blobs
virtio-gpu: Add gl_flushed callback
hw/display/virtio-gpu-udmabuf.c | 1 +
hw/display/virtio-gpu.c | 32 ++++++++++++++++++++++--
include/ui/console.h | 3 +++
include/ui/egl-helpers.h | 3 +++
include/ui/gtk.h | 5 ++--
ui/egl-helpers.c | 26 ++++++++++++++++++++
ui/gtk-egl.c | 43 +++++++++++++++++++++++++++------
ui/gtk-gl-area.c | 20 +++++++++++++++
ui/gtk.c | 26 ++++++++++++++++++--
9 files changed, 145 insertions(+), 14 deletions(-)
--
2.30.2
next reply other threads:[~2021-06-21 19:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-21 19:24 Vivek Kasireddy [this message]
2021-06-21 19:24 ` [PATCH v3 1/5] ui/gtk: Create a common release_dmabuf helper Vivek Kasireddy
2021-06-21 19:24 ` [PATCH v3 2/5] ui/egl: Add egl helpers to help with synchronization Vivek Kasireddy
2021-06-23 8:17 ` Gerd Hoffmann
2021-06-21 19:24 ` [PATCH v3 3/5] ui: Create sync objects and fences only for blobs Vivek Kasireddy
2021-06-23 8:15 ` Gerd Hoffmann
2021-06-23 19:11 ` Kasireddy, Vivek
2021-06-24 8:39 ` Gerd Hoffmann
2021-06-24 18:34 ` Kasireddy, Vivek
2021-06-21 19:24 ` [PATCH v3 4/5] ui/gtk-egl: Wait for the draw signal for dmabuf blobs Vivek Kasireddy
2021-06-23 8:17 ` Gerd Hoffmann
2021-06-21 19:24 ` [PATCH v3 5/5] virtio-gpu: Add gl_flushed callback Vivek Kasireddy
2021-06-23 8:18 ` Gerd Hoffmann
2021-06-21 19:48 ` [PATCH v3 0/5] virtio-gpu: Add a default synchronization mechanism for blobs no-reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210621192425.1188442-1-vivek.kasireddy@intel.com \
--to=vivek.kasireddy@intel.com \
--cc=dongwon.kim@intel.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=tina.zhang@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).