Patchwork [24/24] qxl: register QemuConsole for secondary cards

login
register
mail settings
Submitter Gerd Hoffmann
Date April 4, 2013, 7:29 a.m.
Message ID <1365060546-24638-25-git-send-email-kraxel@redhat.com>
Download mbox | patch
Permalink /patch/233663/
State New
Headers show

Comments

Gerd Hoffmann - April 4, 2013, 7:29 a.m.
Hook secondary qxl cards properly into the qemu console subsystem.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/qxl.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Patch

diff --git a/hw/qxl.c b/hw/qxl.c
index 320c017..e484610 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1769,7 +1769,10 @@  static void qxl_hw_invalidate(void *opaque)
     PCIQXLDevice *qxl = opaque;
     VGACommonState *vga = &qxl->vga;
 
-    vga->hw_ops->invalidate(vga);
+    if (qxl->mode == QXL_MODE_VGA) {
+        vga->hw_ops->invalidate(vga);
+        return;
+    }
 }
 
 static void qxl_hw_text_update(void *opaque, console_ch_t *chardata)
@@ -2085,6 +2088,7 @@  static int qxl_init_secondary(PCIDevice *dev)
     memory_region_init_ram(&qxl->vga.vram, "qxl.vgavram", qxl->vga.vram_size);
     vmstate_register_ram(&qxl->vga.vram, &qxl->pci.qdev);
     qxl->vga.vram_ptr = memory_region_get_ram_ptr(&qxl->vga.vram);
+    qxl->vga.con = graphic_console_init(&qxl_ops, qxl);
 
     return qxl_init_common(qxl);
 }