[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 01/20] vhost-user-gpu: check backend for EDID support
From: |
marcandre . lureau |
Subject: |
[PATCH v2 01/20] vhost-user-gpu: check backend for EDID support |
Date: |
Thu, 4 Feb 2021 14:52:13 +0400 |
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>
---
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 51f1747c4a..55b0ed15f2 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.0
- [PATCH v2 00/20] Various vhost-user-gpu & UI fixes, marcandre . lureau, 2021/02/04
- [PATCH v2 01/20] vhost-user-gpu: check backend for EDID support,
marcandre . lureau <=
- [PATCH v2 02/20] vhost-user-gpu: handle vhost-user-gpu features in a callback, marcandre . lureau, 2021/02/04
- [PATCH v2 03/20] vhost-user-gpu: use an extandable state enum for commands, marcandre . lureau, 2021/02/04
- [PATCH v2 04/20] vhost-user-gpu: handle display-info in a callback, marcandre . lureau, 2021/02/04
- [PATCH v2 05/20] ui: remove extra #ifdef CONFIG_OPENGL, marcandre . lureau, 2021/02/04
- [PATCH v2 06/20] ui: remove gl_ctx_get_current, marcandre . lureau, 2021/02/04
- [PATCH v2 07/20] ui: add gd_gl_area_scanout_disable, marcandre . lureau, 2021/02/04
- [PATCH v2 08/20] ui: annotate DCLOps callback requirements, marcandre . lureau, 2021/02/04
- [PATCH v2 09/20] ui: remove console_has_gl_dmabuf(), marcandre . lureau, 2021/02/04