qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Erico Nunes <ernunes@redhat.com>
To: qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, slp@redhat.com,
	Erico Nunes <ernunes@redhat.com>
Subject: [PATCH 0/3] vhost-user-gpu: support dmabuf modifiers
Date: Fri, 14 Jul 2023 17:38:57 +0200	[thread overview]
Message-ID: <20230714153900.475857-1-ernunes@redhat.com> (raw)

virglrenderer recently added virgl_renderer_resource_get_info_ext as a
new api, which gets resource information, including dmabuf modifiers.
https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1024

We have to support dmabuf modifiers since the driver may choose to
allocate buffers with these modifiers to improve performance, and
importing buffers without modifiers information may result in completely
broken rendering.

Currently trying to use vhost-user-gpu for rendering backend and using
the qemu dbus ui as a ui backend results in a broken framebuffer with
Intel GPUs as the buffer is allocated with a modifier. With this
patchset, that is fixed.


It is tricky to support since it requires to keep compatibility at the
same time with:
(1) build against older virglrenderer which do not provide
virgl_renderer_resource_get_info_ext;
(2) runtime between frontend (qemu) and backend (vhost-user-gpu) due to
increased size and a new field in the VHOST_USER_GPU_DMABUF_SCANOUT
message.

I tried to reach a compromise here by not defining a completely new
message and duplicate VHOST_USER_GPU_DMABUF_SCANOUT but it still feels
like a bit of a hack, so I appreciate feedback if there is a better way
(or naming) to handle it.


Erico Nunes (3):
  docs: vhost-user-gpu: add protocol changes for dmabuf modifiers
  contrib/vhost-user-gpu: add support for sending dmabuf modifiers
  vhost-user-gpu: support dmabuf modifiers

 contrib/vhost-user-gpu/vhost-user-gpu.c |  5 ++-
 contrib/vhost-user-gpu/virgl.c          | 51 +++++++++++++++++++++++--
 contrib/vhost-user-gpu/vugpu.h          |  9 +++++
 docs/interop/vhost-user-gpu.rst         | 26 ++++++++++++-
 hw/display/vhost-user-gpu.c             | 17 ++++++++-
 5 files changed, 102 insertions(+), 6 deletions(-)

-- 
2.40.1



             reply	other threads:[~2023-07-14 15:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14 15:38 Erico Nunes [this message]
2023-07-14 15:38 ` [PATCH 1/3] docs: vhost-user-gpu: add protocol changes for dmabuf modifiers Erico Nunes
2023-07-14 15:38 ` [PATCH 2/3] contrib/vhost-user-gpu: add support for sending " Erico Nunes
2023-07-14 15:39 ` [PATCH 3/3] vhost-user-gpu: support " Erico Nunes
2023-07-14 20:03 ` [PATCH 0/3] " Marc-André Lureau
2023-08-22 16:46   ` Erico Nunes
2023-07-17 11:26 ` Sergio Lopez

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=20230714153900.475857-1-ernunes@redhat.com \
    --to=ernunes@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=slp@redhat.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).