qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PULL 03/10] virtio-gpu: move virtio_gpu_gl_block
Date: Fri, 12 May 2017 13:51:28 +0200	[thread overview]
Message-ID: <20170512115135.17379-4-kraxel@redhat.com> (raw)
In-Reply-To: <20170512115135.17379-1-kraxel@redhat.com>

Move to virtio-gpu-3d.c where all the other virgl code lives too.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20170505104101.30589-2-kraxel@redhat.com
---
 include/hw/virtio/virtio-gpu.h |  1 +
 hw/display/virtio-gpu-3d.c     | 16 ++++++++++++++++
 hw/display/virtio-gpu.c        | 18 ++----------------
 3 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h
index f3ffdceca4..83f474ffc3 100644
--- a/include/hw/virtio/virtio-gpu.h
+++ b/include/hw/virtio/virtio-gpu.h
@@ -169,6 +169,7 @@ void virtio_gpu_virgl_process_cmd(VirtIOGPU *g,
                                   struct virtio_gpu_ctrl_command *cmd);
 void virtio_gpu_virgl_fence_poll(VirtIOGPU *g);
 void virtio_gpu_virgl_reset(VirtIOGPU *g);
+void virtio_gpu_gl_block(void *opaque, bool block);
 int virtio_gpu_virgl_init(VirtIOGPU *g);
 
 #endif
diff --git a/hw/display/virtio-gpu-3d.c b/hw/display/virtio-gpu-3d.c
index f49b7fe8cd..8c106a662d 100644
--- a/hw/display/virtio-gpu-3d.c
+++ b/hw/display/virtio-gpu-3d.c
@@ -600,6 +600,22 @@ void virtio_gpu_virgl_reset(VirtIOGPU *g)
     }
 }
 
+void virtio_gpu_gl_block(void *opaque, bool block)
+{
+    VirtIOGPU *g = opaque;
+
+    if (block) {
+        g->renderer_blocked++;
+    } else {
+        g->renderer_blocked--;
+    }
+    assert(g->renderer_blocked >= 0);
+
+    if (g->renderer_blocked == 0) {
+        virtio_gpu_process_cmdq(g);
+    }
+}
+
 int virtio_gpu_virgl_init(VirtIOGPU *g)
 {
     int ret;
diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
index e1056f34df..cfb5dfa336 100644
--- a/hw/display/virtio-gpu.c
+++ b/hw/display/virtio-gpu.c
@@ -929,28 +929,14 @@ static int virtio_gpu_ui_info(void *opaque, uint32_t idx, QemuUIInfo *info)
     return 0;
 }
 
-static void virtio_gpu_gl_block(void *opaque, bool block)
-{
-    VirtIOGPU *g = opaque;
-
-    if (block) {
-        g->renderer_blocked++;
-    } else {
-        g->renderer_blocked--;
-    }
-    assert(g->renderer_blocked >= 0);
-
-    if (g->renderer_blocked == 0) {
-        virtio_gpu_process_cmdq(g);
-    }
-}
-
 const GraphicHwOps virtio_gpu_ops = {
     .invalidate = virtio_gpu_invalidate_display,
     .gfx_update = virtio_gpu_update_display,
     .text_update = virtio_gpu_text_update,
     .ui_info = virtio_gpu_ui_info,
+#ifdef CONFIG_VIRGL
     .gl_block = virtio_gpu_gl_block,
+#endif
 };
 
 static const VMStateDescription vmstate_virtio_gpu_scanout = {
-- 
2.9.3

  parent reply	other threads:[~2017-05-12 11:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-12 11:51 [Qemu-devel] [PULL 00/10] ui patch queue Gerd Hoffmann
2017-05-12 11:51 ` [Qemu-devel] [PULL 01/10] ui: Support non-zero minimum values for absolute input axes Gerd Hoffmann
2017-05-12 11:51 ` [Qemu-devel] [PULL 02/10] ui: input-linux: Add absolute event support Gerd Hoffmann
2017-05-12 11:51 ` Gerd Hoffmann [this message]
2017-05-12 11:51 ` [Qemu-devel] [PULL 04/10] egl-helpers: drop support for gles and debug logging Gerd Hoffmann
2017-05-12 11:51 ` [Qemu-devel] [PULL 05/10] egl-helpers: fix display init for x11 Gerd Hoffmann
2017-05-12 11:51 ` [Qemu-devel] [PULL 06/10] egl-helpers: add missing error check Gerd Hoffmann
2017-05-12 11:51 ` [Qemu-devel] [PULL 07/10] egl: explicitly ask for core context Gerd Hoffmann
2017-05-12 11:51 ` [Qemu-devel] [PULL 08/10] opengl: add egl-headless display Gerd Hoffmann
2017-05-12 11:51 ` [Qemu-devel] [PULL 09/10] vnc: simple clean up Gerd Hoffmann
2017-05-12 11:51 ` [Qemu-devel] [PULL 10/10] vnc: replace hweight_long() with ctpopl() Gerd Hoffmann
2017-05-15 13:29 ` [Qemu-devel] [PULL 00/10] ui patch queue Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170512115135.17379-4-kraxel@redhat.com \
    --to=kraxel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).