[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 16/25] virtio-gpu: move virgl gl_flushed
From: |
Gerd Hoffmann |
Subject: |
[PULL 16/25] virtio-gpu: move virgl gl_flushed |
Date: |
Mon, 10 May 2021 15:20:42 +0200 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20210430113547.1816178-1-kraxel@redhat.com
Message-Id: <20210430113547.1816178-8-kraxel@redhat.com>
---
hw/display/virtio-gpu-gl.c | 13 +++++++++++++
hw/display/virtio-gpu.c | 15 ---------------
2 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c
index 6d0ce5bcd6f1..e976fb8d04c4 100644
--- a/hw/display/virtio-gpu-gl.c
+++ b/hw/display/virtio-gpu-gl.c
@@ -23,6 +23,17 @@
#include "hw/virtio/virtio-gpu-pixman.h"
#include "hw/qdev-properties.h"
+static void virtio_gpu_gl_flushed(VirtIOGPUBase *b)
+{
+ VirtIOGPU *g = VIRTIO_GPU(b);
+
+ if (g->renderer_reset) {
+ g->renderer_reset = false;
+ virtio_gpu_virgl_reset(g);
+ }
+ virtio_gpu_process_cmdq(g);
+}
+
static void virtio_gpu_gl_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq)
{
VirtIOGPU *g = VIRTIO_GPU(vdev);
@@ -100,8 +111,10 @@ static void virtio_gpu_gl_class_init(ObjectClass *klass,
void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
+ VirtIOGPUBaseClass *vbc = VIRTIO_GPU_BASE_CLASS(klass);
VirtIOGPUClass *vgc = VIRTIO_GPU_CLASS(klass);
+ vbc->gl_flushed = virtio_gpu_gl_flushed;
vgc->handle_ctrl = virtio_gpu_gl_handle_ctrl;
vdc->realize = virtio_gpu_gl_device_realize;
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index dfb6c0a9ef76..9be486bb8121 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -859,19 +859,6 @@ void virtio_gpu_process_cmdq(VirtIOGPU *g)
g->processing_cmdq = false;
}
-static void virtio_gpu_gl_flushed(VirtIOGPUBase *b)
-{
- VirtIOGPU *g = VIRTIO_GPU(b);
-
-#ifdef CONFIG_VIRGL
- if (g->renderer_reset) {
- g->renderer_reset = false;
- virtio_gpu_virgl_reset(g);
- }
-#endif
- virtio_gpu_process_cmdq(g);
-}
-
static void virtio_gpu_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq)
{
VirtIOGPU *g = VIRTIO_GPU(vdev);
@@ -1215,10 +1202,8 @@ static void virtio_gpu_class_init(ObjectClass *klass,
void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
VirtioDeviceClass *vdc = VIRTIO_DEVICE_CLASS(klass);
- VirtIOGPUBaseClass *vbc = VIRTIO_GPU_BASE_CLASS(klass);
VirtIOGPUClass *vgc = VIRTIO_GPU_CLASS(klass);
- vbc->gl_flushed = virtio_gpu_gl_flushed;
vgc->handle_ctrl = virtio_gpu_handle_ctrl;
vdc->realize = virtio_gpu_device_realize;
--
2.31.1
- [PULL 06/25] edid: move timing generation into a separate function, (continued)
- [PULL 06/25] edid: move timing generation into a separate function, Gerd Hoffmann, 2021/05/10
- [PULL 08/25] edid: add support for DisplayID extension (5k resolution), Gerd Hoffmann, 2021/05/10
- [PULL 07/25] edid: allow arbitrary-length checksums, Gerd Hoffmann, 2021/05/10
- [PULL 10/25] virtio-gpu: rename virgl source file., Gerd Hoffmann, 2021/05/10
- [PULL 11/25] virtio-gpu: add virtio-gpu-gl-device, Gerd Hoffmann, 2021/05/10
- [PULL 12/25] virtio-gpu: move virgl realize + properties, Gerd Hoffmann, 2021/05/10
- [PULL 09/25] virtio-gpu: handle partial maps properly, Gerd Hoffmann, 2021/05/10
- [PULL 14/25] virtio-gpu: use class function for ctrl queue handlers, Gerd Hoffmann, 2021/05/10
- [PULL 13/25] virtio-gpu: move virgl reset, Gerd Hoffmann, 2021/05/10
- [PULL 15/25] virtio-gpu: move virgl handle_ctrl, Gerd Hoffmann, 2021/05/10
- [PULL 16/25] virtio-gpu: move virgl gl_flushed,
Gerd Hoffmann <=
- [PULL 17/25] virtio-gpu: move virgl process_cmd, Gerd Hoffmann, 2021/05/10
- [PULL 18/25] virtio-gpu: move update_cursor_data, Gerd Hoffmann, 2021/05/10
- [PULL 20/25] virtio-gpu: move virtio-gpu-gl-device to separate module, Gerd Hoffmann, 2021/05/10
- [PULL 19/25] virtio-gpu: drop VIRGL() macro, Gerd Hoffmann, 2021/05/10
- [PULL 21/25] virtio-gpu: drop use_virgl_renderer, Gerd Hoffmann, 2021/05/10
- [PULL 22/25] virtio-gpu: move fields to struct VirtIOGPUGL, Gerd Hoffmann, 2021/05/10
- [PULL 23/25] virtio-gpu: add virtio-gpu-gl-pci, Gerd Hoffmann, 2021/05/10
- [PULL 24/25] modules: add have_vga, Gerd Hoffmann, 2021/05/10
- [PULL 25/25] virtio-gpu: add virtio-vga-gl, Gerd Hoffmann, 2021/05/10
- Re: [PULL 00/25] Vga 20210510 patches, no-reply, 2021/05/10