From: dongwon.kim@intel.com
To: qemu-devel@nongnu.org
Subject: [RFC PATCH 0/4] hw/display/virtio-gpu: Introducing asynchronous guest display render
Date: Thu, 20 Jun 2024 16:17:23 -0700 [thread overview]
Message-ID: <20240620231727.235841-1-dongwon.kim@intel.com> (raw)
From: Dongwon Kim <dongwon.kim@intel.com>
Introducing new virtio-gpu param, 'render_sync' when guest scanout blob
is used (blob=true). The new param is used to specify when to start
rendering a guest scanout frame.
By default (and so far) rendering of the guest frame is started in
the draw event to make sure guest display update is sychronized with
host's vsync. But this method inevitably brings some extra wait because
most of time, the draw event is not happening right after the guest
scanout frame is flushed.
This delay often makes the guest stuck at certain frame for too long and
causes general performance degradation of graphic workloads on the guest's
side especially when the display update rate is high. This unwanted perf
drop can be reduced if the guest scanout frame is rendered as soon as it is
flushed through 'VIRTIO_GPU_CMD_RESOURCE_FLUSH' msg. The gl display
pipeline can be unblocked a lot earlier in this case so that guest can
move to the next display frame right away.
However, this "asynchrounous" render mode may cause some waste of resources
as the guest could produce more frames than what are actually displayed
on the host display. This is similar as running rendering apps with no vblank
or vsync option. This is why this feature should stay as optional.
The param 'render_sync' is set to 'true' by default and this is in line
with traditional way while setting it to 'false' is basically enabling
this asynchronouse mode.
Dongwon Kim (4):
hw/display/virtio-gpu: Introducing render_sync param
ui/egl-helpers: Consolidates create-sync and create-fence
ui/gtk-egl: Start rendering of guest blob scanout if render_sync is
off
ui/gtk-gl-draw: Start rendering of guest blob scanout if render_sync
is off
include/hw/virtio/virtio-gpu.h | 3 ++
include/ui/dmabuf.h | 4 +-
include/ui/egl-helpers.h | 3 +-
hw/display/vhost-user-gpu.c | 3 +-
hw/display/virtio-gpu-udmabuf.c | 3 +-
hw/display/virtio-gpu.c | 2 +
hw/vfio/display.c | 3 +-
ui/dbus-listener.c | 2 +-
ui/dmabuf.c | 11 +++-
ui/egl-helpers.c | 27 ++++------
ui/gtk-egl.c | 93 ++++++++++++++++++---------------
ui/gtk-gl-area.c | 90 +++++++++++++++++++------------
12 files changed, 146 insertions(+), 98 deletions(-)
--
2.34.1
next reply other threads:[~2024-06-20 23:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-20 23:17 dongwon.kim [this message]
2024-06-20 23:17 ` [RFC PATCH 1/4] hw/display/virtio-gpu: Introducing render_sync param dongwon.kim
2024-06-20 23:17 ` [RFC PATCH 2/4] ui/egl-helpers: Consolidates create-sync and create-fence dongwon.kim
2024-07-02 8:32 ` Marc-André Lureau
2024-07-02 18:12 ` Kim, Dongwon
2024-06-20 23:17 ` [RFC PATCH 3/4] ui/gtk-egl: Start rendering of guest blob scanout if render_sync is off dongwon.kim
2024-06-20 23:17 ` [RFC PATCH 4/4] ui/gtk-gl-draw: " dongwon.kim
2024-07-02 10:29 ` [RFC PATCH 0/4] hw/display/virtio-gpu: Introducing asynchronous guest display render Marc-André Lureau
2024-07-02 18:11 ` Kim, Dongwon
2024-07-03 6:26 ` Marc-André Lureau
2024-07-05 18:24 ` Kim, Dongwon
2024-07-08 16:40 ` Kim, Dongwon
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=20240620231727.235841-1-dongwon.kim@intel.com \
--to=dongwon.kim@intel.com \
--cc=qemu-devel@nongnu.org \
/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).