diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-02-05 10:09:16 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-02-05 10:09:16 +0000 |
commit | 923abdb4bdfb6d93bfe6c941ead70f3ea6707e40 (patch) | |
tree | b030755ba9dd824b377b82a983798e8f8b6f9b91 /hw/display/vhost-user-gpu.c | |
parent | 2c6df987965729df702fa12f79564b5f76e3fa4e (diff) | |
parent | 73240f104dd0169b0637e46fae3c2c39cdfb2eb9 (diff) | |
download | qemu-923abdb4bdfb6d93bfe6c941ead70f3ea6707e40.zip qemu-923abdb4bdfb6d93bfe6c941ead70f3ea6707e40.tar.gz qemu-923abdb4bdfb6d93bfe6c941ead70f3ea6707e40.tar.bz2 |
Merge remote-tracking branch 'remotes/kraxel/tags/vga-ui-20210205-pull-request' into staging
ui+virtio-gpu: opengl cleanups and fixes.
qxl+spice: bugfixes
# gpg: Signature made Fri 05 Feb 2021 06:56:04 GMT
# gpg: using RSA key A0328CFFB93A17A79901FE7D4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138
* remotes/kraxel/tags/vga-ui-20210205-pull-request: (24 commits)
tests: add some virtio-gpu & vhost-user-gpu acceptance test
chardev: check if the chardev is registered for yanking
display/ui: add a callback to indicate GL state is flushed
virtio-gpu: avoid re-entering cmdq processing
ui: add egl dmabuf import to gtkglarea
ui: check gtk-egl dmabuf support
ui: add qemu_egl_has_dmabuf helper
ui: check hw requirements during DCL registration
ui: add a DCLOps callback to check dmabuf support
ui: add an optional get_flags callback to GraphicHwOps
vhost-user-gpu: add a configuration flag for dmabuf usage
ui: remove console_has_gl_dmabuf()
ui: annotate DCLOps callback requirements
ui: add gd_gl_area_scanout_disable
ui: remove gl_ctx_get_current
ui: remove extra #ifdef CONFIG_OPENGL
vhost-user-gpu: handle display-info in a callback
vhost-user-gpu: use an extandable state enum for commands
vhost-user-gpu: handle vhost-user-gpu features in a callback
vhost-user-gpu: check backend for EDID support
...
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/display/vhost-user-gpu.c')
-rw-r--r-- | hw/display/vhost-user-gpu.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/hw/display/vhost-user-gpu.c b/hw/display/vhost-user-gpu.c index 51f1747..4d8cb35 100644 --- a/hw/display/vhost-user-gpu.c +++ b/hw/display/vhost-user-gpu.c @@ -224,11 +224,6 @@ vhost_user_gpu_handle_display(VhostUserGPU *g, VhostUserGpuMsg *msg) close(dmabuf->fd); dmabuf->fd = -1; } - if (!console_has_gl_dmabuf(con)) { - /* it would be nice to report that error earlier */ - error_report("console doesn't support dmabuf!"); - break; - } dpy_gl_release_dmabuf(con, dmabuf); if (fd == -1) { dpy_gl_scanout_disable(con); @@ -365,7 +360,7 @@ vhost_user_gpu_update_blocked(VhostUserGPU *g, bool blocked) } static void -vhost_user_gpu_gl_unblock(VirtIOGPUBase *b) +vhost_user_gpu_gl_flushed(VirtIOGPUBase *b) { VhostUserGPU *g = VHOST_USER_GPU(b); @@ -552,9 +547,17 @@ vhost_user_gpu_device_realize(DeviceState *qdev, Error **errp) return; } + /* existing backend may send DMABUF, so let's add that requirement */ + g->parent_obj.conf.flags |= 1 << VIRTIO_GPU_FLAG_DMABUF_ENABLED; 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; @@ -575,7 +578,7 @@ vhost_user_gpu_class_init(ObjectClass *klass, void *data) VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass); VirtIOGPUBaseClass *vgc = VIRTIO_GPU_BASE_CLASS(klass); - vgc->gl_unblock = vhost_user_gpu_gl_unblock; + vgc->gl_flushed = vhost_user_gpu_gl_flushed; vdc->realize = vhost_user_gpu_device_realize; vdc->reset = vhost_user_gpu_reset; |