From: Matej Hrica <mhrica@redhat.com>
To: qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, dbassey@redhat.com,
aesteve@redhat.com, slp@redhat.com,
Matej Hrica <mhrica@redhat.com>
Subject: [RFC PATCH 1/2] vhost-user-gpu: Forward RESOURCE_BLOB and CONTEXT_INIT flags
Date: Thu, 18 Jul 2024 14:12:46 +0200 [thread overview]
Message-ID: <20240718121247.181510-2-mhrica@redhat.com> (raw)
In-Reply-To: <20240718121247.181510-1-mhrica@redhat.com>
Forward VIRTIO_GPU_F_RESOURCE_BLOB and VIRTIO_GPU_F_CONTEXT_INIT recieved from
a vhost backend to expose it to the guest.
Signed-off-by: Matej Hrica <mhrica@redhat.com>
---
hw/display/vhost-user-gpu.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c
index 63c64ddde6..0ebc2218b9 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -631,6 +631,12 @@ vhost_user_gpu_device_realize(DeviceState *qdev, Error **errp)
error_report("EDID requested but the backend doesn't support it.");
g->parent_obj.conf.flags &= ~(1 << VIRTIO_GPU_FLAG_EDID_ENABLED);
}
+ if (virtio_has_feature(g->vhost->dev.features, VIRTIO_GPU_F_RESOURCE_BLOB)) {
+ g->parent_obj.conf.flags |= 1 << VIRTIO_GPU_FLAG_BLOB_ENABLED;
+ }
+ if (virtio_has_feature(g->vhost->dev.features, VIRTIO_GPU_F_CONTEXT_INIT)) {
+ g->parent_obj.conf.flags |= 1 << VIRTIO_GPU_FLAG_CONTEXT_INIT_ENABLED;
+ }
if (!virtio_gpu_base_device_realize(qdev, NULL, NULL, errp)) {
return;
--
2.45.2
next prev parent reply other threads:[~2024-07-18 12:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-18 12:12 [RFC PATCH 0/2] vhost-user-gpu: Add support for blob resources Matej Hrica
2024-07-18 12:12 ` Matej Hrica [this message]
2024-07-18 12:12 ` [RFC PATCH 2/2] vhost-user-gpu: Add shared memory region support Matej Hrica
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=20240718121247.181510-2-mhrica@redhat.com \
--to=mhrica@redhat.com \
--cc=aesteve@redhat.com \
--cc=dbassey@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).