[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/24] vhost-user-gpu: check backend for EDID support
From: |
Gerd Hoffmann |
Subject: |
[PULL 05/24] vhost-user-gpu: check backend for EDID support |
Date: |
Fri, 5 Feb 2021 07:56:01 +0100 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
EDID has been enabled by default, but the backend may not implement
it (such as the contrib backend). This results in extra warnings and
potentially other issues in the guest.
The option shouldn't probably have been added to VIRTIO_GPU_BASE, but
it's a bit too late now, report an error and disable EDID when it's
not available.
Fixes: 0a7196625 ("edid: flip the default to enabled")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20210204105232.834642-2-marcandre.lureau@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@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 51f1747c4a41..55b0ed15f250 100644
--- a/hw/display/vhost-user-gpu.c
+++ b/hw/display/vhost-user-gpu.c
@@ -555,6 +555,12 @@ vhost_user_gpu_device_realize(DeviceState *qdev, Error
**errp)
if (virtio_has_feature(g->vhost->dev.features, VIRTIO_GPU_F_VIRGL)) {
g->parent_obj.conf.flags |= 1 << VIRTIO_GPU_FLAG_VIRGL_ENABLED;
}
+ if (virtio_has_feature(g->vhost->dev.features, VIRTIO_GPU_F_EDID)) {
+ g->parent_obj.conf.flags |= 1 << VIRTIO_GPU_FLAG_EDID_ENABLED;
+ } else {
+ error_report("EDID requested but the backend doesn't support it.");
+ g->parent_obj.conf.flags &= ~(1 << VIRTIO_GPU_FLAG_EDID_ENABLED);
+ }
if (!virtio_gpu_base_device_realize(qdev, NULL, NULL, errp)) {
return;
--
2.29.2
- [PULL 11/24] ui: add gd_gl_area_scanout_disable, (continued)
- [PULL 11/24] ui: add gd_gl_area_scanout_disable, Gerd Hoffmann, 2021/02/05
- [PULL 17/24] ui: check hw requirements during DCL registration, Gerd Hoffmann, 2021/02/05
- [PULL 23/24] chardev: check if the chardev is registered for yanking, Gerd Hoffmann, 2021/02/05
- [PULL 10/24] ui: remove gl_ctx_get_current, Gerd Hoffmann, 2021/02/05
- [PULL 24/24] tests: add some virtio-gpu & vhost-user-gpu acceptance test, Gerd Hoffmann, 2021/02/05
- [PULL 18/24] ui: add qemu_egl_has_dmabuf helper, Gerd Hoffmann, 2021/02/05
- [PULL 16/24] ui: add a DCLOps callback to check dmabuf support, Gerd Hoffmann, 2021/02/05
- [PULL 06/24] vhost-user-gpu: handle vhost-user-gpu features in a callback, Gerd Hoffmann, 2021/02/05
- [PULL 21/24] virtio-gpu: avoid re-entering cmdq processing, Gerd Hoffmann, 2021/02/05
- [PULL 22/24] display/ui: add a callback to indicate GL state is flushed, Gerd Hoffmann, 2021/02/05
- [PULL 05/24] vhost-user-gpu: check backend for EDID support,
Gerd Hoffmann <=
- [PULL 19/24] ui: check gtk-egl dmabuf support, Gerd Hoffmann, 2021/02/05
- [PULL 20/24] ui: add egl dmabuf import to gtkglarea, Gerd Hoffmann, 2021/02/05
- Re: [PULL 00/24] Vga ui 20210205 patches, Peter Maydell, 2021/02/05