From cb9ab7caae77ce8a99ac0e75312f2428d322958b Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 12 Oct 2015 11:59:39 +0200 Subject: zap qemu_egl_has_ext in include/ui/egl-helpers.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop leftover prototype which sneaked in by mistake Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- include/ui/egl-helpers.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/ui/egl-helpers.h b/include/ui/egl-helpers.h index 5ad5dc3..8c84398 100644 --- a/include/ui/egl-helpers.h +++ b/include/ui/egl-helpers.h @@ -11,6 +11,5 @@ EGLSurface qemu_egl_init_surface_x11(EGLContext ectx, Window win); int qemu_egl_init_dpy(EGLNativeDisplayType dpy, bool gles, bool debug); EGLContext qemu_egl_init_ctx(void); -bool qemu_egl_has_ext(const char *haystack, const char *needle); #endif /* EGL_HELPERS_H */ -- cgit v1.1 From bba19b88a6bce3adc280b0d7b6a4fc51445afd80 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Thu, 3 Dec 2015 12:34:25 +0100 Subject: console: block rendering until client is done MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow gl user interfaces to block display device gl rendering. The ui code might want to do that in case it takes a little longer to bring things to screen, for example because we'll hand over a dma-buf to another process (spice will do that). Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- include/ui/console.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/ui/console.h b/include/ui/console.h index adac36d..12ad627 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -362,6 +362,7 @@ typedef struct GraphicHwOps { void (*text_update)(void *opaque, console_ch_t *text); void (*update_interval)(void *opaque, uint64_t interval); int (*ui_info)(void *opaque, uint32_t head, QemuUIInfo *info); + void (*gl_block)(void *opaque, bool block); } GraphicHwOps; QemuConsole *graphic_console_init(DeviceState *dev, uint32_t head, @@ -374,6 +375,7 @@ void graphic_console_set_hwops(QemuConsole *con, void graphic_hw_update(QemuConsole *con); void graphic_hw_invalidate(QemuConsole *con); void graphic_hw_text_update(QemuConsole *con, console_ch_t *chardata); +void graphic_hw_gl_block(QemuConsole *con, bool block); QemuConsole *qemu_console_lookup_by_index(unsigned int index); QemuConsole *qemu_console_lookup_by_device(DeviceState *dev, uint32_t head); -- cgit v1.1 From 3eb769fd1cf15f16ca796ab5618efe89b23aa625 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 1 Dec 2015 12:05:14 +0100 Subject: virtio-gpu: maintain command queue We'll go take out the commands we receive out of the virt queue and put them into a linked list, to decouple virtio queue handling from actual command processing. Also move cmd processing to new virtio_gpu_handle_ctrl func, so we can easily kick it from different places. Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtio-gpu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h index 9b279d7..f7e7a52 100644 --- a/include/hw/virtio/virtio-gpu.h +++ b/include/hw/virtio/virtio-gpu.h @@ -94,6 +94,7 @@ typedef struct VirtIOGPU { DeviceState *qdev; QTAILQ_HEAD(, virtio_gpu_simple_resource) reslist; + QTAILQ_HEAD(, virtio_gpu_ctrl_command) cmdq; QTAILQ_HEAD(, virtio_gpu_ctrl_command) fenceq; struct virtio_gpu_scanout scanout[VIRTIO_GPU_MAX_SCANOUT]; -- cgit v1.1 From 0c55a1cfd35c1f1b10cc448d05c1e4ef3a0768d1 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 1 Dec 2015 13:18:38 +0100 Subject: virtio-gpu: add support to enable/disable command processing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit So we can stop rendering for a while in case we have to. Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-André Lureau --- include/hw/virtio/virtio-gpu.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h index f7e7a52..f6cae0b 100644 --- a/include/hw/virtio/virtio-gpu.h +++ b/include/hw/virtio/virtio-gpu.h @@ -76,6 +76,7 @@ struct virtio_gpu_ctrl_command { VirtQueue *vq; struct virtio_gpu_ctrl_hdr cmd_hdr; uint32_t error; + bool waiting; bool finished; QTAILQ_ENTRY(virtio_gpu_ctrl_command) next; }; @@ -152,6 +153,7 @@ int virtio_gpu_create_mapping_iov(struct virtio_gpu_resource_attach_backing *ab, struct virtio_gpu_ctrl_command *cmd, struct iovec **iov); void virtio_gpu_cleanup_mapping_iov(struct iovec *iov, uint32_t count); +void virtio_gpu_process_cmdq(VirtIOGPU *g); /* virtio-gpu-3d.c */ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g, -- cgit v1.1 From 321c9adba5a64a1a9de2dd7db5433b62a5433439 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 2 Dec 2015 08:17:24 +0100 Subject: virtio-gpu: block any rendering until client (ui) is done Wire up gl_block callback, so ui code can request to stop virtio-gpu rendering. Signed-off-by: Gerd Hoffmann --- include/hw/virtio/virtio-gpu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h index f6cae0b..13b0ab0 100644 --- a/include/hw/virtio/virtio-gpu.h +++ b/include/hw/virtio/virtio-gpu.h @@ -107,6 +107,7 @@ typedef struct VirtIOGPU { bool use_virgl_renderer; bool renderer_inited; + bool renderer_blocked; QEMUTimer *fence_poll; QEMUTimer *print_stats; -- cgit v1.1