[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[QEMU PATCH v5 08/13] virtio-gpu: Don't require udmabuf when blobs and virgl are enabled
- To: Gerd Hoffmann <kraxel@xxxxxxxxxx>, "Michael S . Tsirkin" <mst@xxxxxxxxxx>, Akihiko Odaki <akihiko.odaki@xxxxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Antonio Caggiano" <quic_acaggian@xxxxxxxxxxx>, "Dr . David Alan Gilbert" <dgilbert@xxxxxxxxxx>, Robert Beckett <bob.beckett@xxxxxxxxxxxxx>, "Dmitry Osipenko" <dmitry.osipenko@xxxxxxxxxxxxx>, Alex Bennée <alex.bennee@xxxxxxxxxx>, <qemu-devel@xxxxxxxxxx>
- From: Huang Rui <ray.huang@xxxxxxx>
- Date: Fri, 15 Sep 2023 19:11:25 +0800
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=kH4BVXS2a7kr2sDF/vIFP0W3LlCas+dPR/KYhpKBEIU=; b=TxsF1RWKdtrMlLjVGPCmFl9MncO2pVhdthR60I8IvwiIukYwaCpF0zLxiQxEW9DwzoK5oZHWrXdoeXKwhF5BiC5iEPsTvgii/XV3aey/VSwAP+80pLI73aW4RdV5ldOiO+HV0WF/hhDOMQkKeww1f8GJOmRv83JaZs4Qx5GkhS7vKNcG2o/xeBSawLjJXvDOueU/3L/4zByZVn1SkJjSbRRR9BHBoNF1/4HNoSvxf7Di49p3nh+X/z4FdwCw0be/zQPgJ4VUbosmZ0ALiURuYH0KC3RMZzJAU6T1209dXBn6Gvs9qhc8yrUlk5MrdtC+InrZJNRaPfbBP5AP+v6UQQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HsCYbgQTcoiBN2BsYnmyfE0oz8lDNMxWDyqr+JGFri0I/t92Ecjz2kxVGXvOHZnJ2KckxZ5DhD0Eq6d5eQ5FQ5Dv5h/bZqFbqpF1WN9N/UnR/jwc7RA4KDaI1CZAzJHG4CFb+D9es6dP8Jo7muuc1/uC3iKhNsj84JJe0z2RjeTNXmIUhnxHW8GRTi36WtRUz3v5VdYKK3DsS9JxblRVOhVurn7eACAjT17MxNLl7zsrIrru2fyDQdTXmW8CjQRZdJJuwTlKurR7JARstq6NcGA/Shi7mdhqPIgP0jpuwpcgwugb1QxXOtIzYboGVRp9hP+FrFdzeAffwDCiNna+Fg==
- Cc: <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Gurchetan Singh <gurchetansingh@xxxxxxxxxxxx>, Albert Esteve <aesteve@xxxxxxxxxx>, <ernunes@xxxxxxxxxx>, Philippe Mathieu-Daudé <philmd@xxxxxxxxxx>, Alyssa Ross <hi@xxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Alex Deucher <alexander.deucher@xxxxxxx>, Christian König <christian.koenig@xxxxxxx>, Xenia Ragiadakou <xenia.ragiadakou@xxxxxxx>, Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@xxxxxxx>, "Honglei Huang" <honglei1.huang@xxxxxxx>, Julia Zhang <julia.zhang@xxxxxxx>, "Chen Jiqian" <Jiqian.Chen@xxxxxxx>, Antonio Caggiano <antonio.caggiano@xxxxxxxxxxxxx>, Huang Rui <ray.huang@xxxxxxx>
- Delivery-date: Fri, 15 Sep 2023 11:18:13 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
From: Dmitry Osipenko <dmitry.osipenko@xxxxxxxxxxxxx>
The udmabuf usage is mandatory when virgl is disabled and blobs feature
enabled in the Qemu machine configuration. If virgl and blobs are enabled,
then udmabuf requirement is optional. Since udmabuf isn't widely supported
by a popular Linux distros today, let's relax the udmabuf requirement for
blobs=on,virgl=on. Now, a full-featured virtio-gpu acceleration is
available to Qemu users without a need to have udmabuf available in the
system.
Reviewed-by: Antonio Caggiano <antonio.caggiano@xxxxxxxxxxxxx>
Signed-off-by: Dmitry Osipenko <dmitry.osipenko@xxxxxxxxxxxxx>
Signed-off-by: Huang Rui <ray.huang@xxxxxxx>
---
hw/display/virtio-gpu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index a66cbd9930..5b7a7eab4f 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -1361,7 +1361,8 @@ void virtio_gpu_device_realize(DeviceState *qdev, Error
**errp)
VirtIOGPU *g = VIRTIO_GPU(qdev);
if (virtio_gpu_blob_enabled(g->parent_obj.conf)) {
- if (!virtio_gpu_have_udmabuf()) {
+ if (!virtio_gpu_virgl_enabled(g->parent_obj.conf) &&
+ !virtio_gpu_have_udmabuf()) {
error_setg(errp, "cannot enable blob resources without udmabuf");
return;
}
--
2.34.1
|