qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 4/8] console: add ability to wrap a console.
Date: Wed, 20 Nov 2013 15:52:37 +1000	[thread overview]
Message-ID: <1384926761-9962-5-git-send-email-airlied@gmail.com> (raw)
In-Reply-To: <1384926761-9962-1-git-send-email-airlied@gmail.com>

From: Dave Airlie <airlied@redhat.com>

In order to implement virtio-vga on top of virtio-gpu we need
to be able to wrap the first console virtio-gpu registers from
inside virtio-vga which initialises after virtio-gpu. With this
interface virtio-vga can store the virtio-gpu interfaces, and
call them from its own ones.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 include/ui/console.h |  7 +++++++
 ui/console.c         | 13 +++++++++++++
 2 files changed, 20 insertions(+)

diff --git a/include/ui/console.h b/include/ui/console.h
index be304fe..a143a0d 100644
--- a/include/ui/console.h
+++ b/include/ui/console.h
@@ -286,6 +286,13 @@ QemuConsole *graphic_console_init(DeviceState *dev,
                                   const GraphicHwOps *ops,
                                   void *opaque);
 
+void graphic_console_wrap(QemuConsole *con,
+			  DeviceState *dev,
+			  const GraphicHwOps *ops,
+			  void *opaque,
+                          const GraphicHwOps **orig_ops,
+                          void **orig_opaque);
+
 void graphic_hw_update(QemuConsole *con);
 void graphic_hw_invalidate(QemuConsole *con);
 void graphic_hw_text_update(QemuConsole *con, console_ch_t *chardata);
diff --git a/ui/console.c b/ui/console.c
index 4248a6f..80e17e5 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1658,6 +1658,19 @@ QemuConsole *graphic_console_init(DeviceState *dev,
     return s;
 }
 
+void graphic_console_wrap(QemuConsole *con,
+			  DeviceState *dev,
+			  const GraphicHwOps *hw_ops,
+			  void *opaque,
+                          const GraphicHwOps **orig_ops,
+                          void **orig_opaque)
+{
+    *orig_opaque = con->hw;
+    *orig_ops = con->hw_ops;
+    con->hw_ops = hw_ops;
+    con->hw = opaque;
+}
+
 QemuConsole *qemu_console_lookup_by_index(unsigned int index)
 {
     if (index >= MAX_CONSOLES) {
-- 
1.8.3.1

  parent reply	other threads:[~2013-11-20  5:53 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20  5:52 [Qemu-devel] [RFC] virtio-gpu and sdl2 so far Dave Airlie
2013-11-20  5:52 ` [Qemu-devel] [PATCH 1/8] ui/sdl2 : initial port to SDL 2.0 (v1.2) Dave Airlie
2013-11-20 10:52   ` Gerd Hoffmann
2013-11-20  5:52 ` [Qemu-devel] [PATCH 2/8] console: add state notifiers for ui<->display Dave Airlie
2013-11-20 11:04   ` Gerd Hoffmann
2013-11-20  5:52 ` [Qemu-devel] [PATCH 3/8] console: add information retrival wrappers Dave Airlie
2013-11-20 11:12   ` Gerd Hoffmann
2013-11-20  5:52 ` Dave Airlie [this message]
2013-11-20  5:52 ` [Qemu-devel] [PATCH 5/8] sdl2: update for multihead support Dave Airlie
2013-11-20  5:52 ` [Qemu-devel] [PATCH 6/8] virtio-gpu: v0.1 of the virtio based GPU code Dave Airlie
2013-11-20 11:26   ` Gerd Hoffmann
2013-11-20  5:52 ` [Qemu-devel] [PATCH 7/8] virtio-vga: v1 Dave Airlie
2013-11-20 12:02   ` Gerd Hoffmann
2013-11-21  3:12     ` Dave Airlie
2013-11-21  6:17       ` Paolo Bonzini
2013-11-21 11:06       ` Gerd Hoffmann
2013-12-06  5:24         ` Dave Airlie
2013-12-06  8:24           ` Gerd Hoffmann
2013-12-06  8:58             ` Dave Airlie
2014-01-07 23:35               ` Dave Airlie
2014-01-13  8:01                 ` Gerd Hoffmann
2013-11-20  5:52 ` [Qemu-devel] [PATCH 8/8] HACK: just to make things start easier with libvirt Dave Airlie

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=1384926761-9962-5-git-send-email-airlied@gmail.com \
    --to=airlied@gmail.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).