vga: two fixes.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJb1wEcAAoJEEy22O7T6HE4D9MP/3xvz/3YHPRWug+px7PKeQTO K6GfT5zKCYl5xGg+CZPpQDp47UtEkiDb9zduWTP4cMUreVVa46b9iUoPdFuzqCsB RRbSAe8tDzW0tgf512XJK7F/BoxPTKvASxDFfH0oknJzXXujoST3oSUGQdkWLT1H FJ7Cjx2ko/LUYHGO2u7G+I8h5zvWjaeXy3WEMBQviL7Vyv1r6DYQBhnuDiT6kfuK LxbMqfUCvbcNHo3M9U0jlkEaRGSwzsyW3NXXh5IJ4kRnRKq33KjHkCgeIOuA92pj CErpT3oacKgAJ5QtYWjZAUS69YX2CBe/PDcMhO2WyhNi7B5avycuCbffJfxt1wtN lWmqMCw7ZqB5iQeW2Hs/PVoy7Z7ExN8PRT4qDwiRloayP8ZnJTASDPzat6yofqR3 7bRMG7DAiBEbMQa6LaFnVNNhUEOAWWfPyofJ03qsOikJ/mGwWN9zq/A03H6XKRFE jm1OdS4n9TjmMCMqBc3YtoPy1wTX9bLxJdtGY+cYxaTB0kk/N25cPWMxFQ6NI0nX Xc1/DNIvLg8aamIcirlBU6inCwGXa9OdfeFEorSa98u4XD32A7M9vyLHUdVUmna7 YtrFbTZ6GkrqqPVtQ1KcAJ7q09hyxh4Y1s2u5ZmyQT7RCDeAjQIm19UTthiqTzC1 nGfup524BpB8+C4W1Hmm =BbNm -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/vga-20181029-pull-request' into staging vga: two fixes. # gpg: Signature made Mon 29 Oct 2018 12:46:20 GMT # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/vga-20181029-pull-request: vga_int: remove unused function protype qxl: store channel id in qxl->id Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
ef3a6af5e7
@ -848,7 +848,7 @@ static int interface_get_cursor_command(QXLInstance *sin, struct QXLCommandExt *
|
||||
qxl->guest_primary.commands++;
|
||||
qxl_track_command(qxl, ext);
|
||||
qxl_log_command(qxl, "csr", ext);
|
||||
if (qxl->id == 0) {
|
||||
if (qxl->have_vga) {
|
||||
qxl_render_cursor(qxl, ext);
|
||||
}
|
||||
trace_qxl_ring_cursor_get(qxl->id, qxl_mode_to_string(qxl->mode));
|
||||
@ -1255,7 +1255,7 @@ static void qxl_soft_reset(PCIQXLDevice *d)
|
||||
d->current_async = QXL_UNDEFINED_IO;
|
||||
qemu_mutex_unlock(&d->async_lock);
|
||||
|
||||
if (d->id == 0) {
|
||||
if (d->have_vga) {
|
||||
qxl_enter_vga_mode(d);
|
||||
} else {
|
||||
d->mode = QXL_MODE_UNDEFINED;
|
||||
@ -2139,7 +2139,7 @@ static void qxl_realize_common(PCIQXLDevice *qxl, Error **errp)
|
||||
|
||||
memory_region_init_io(&qxl->io_bar, OBJECT(qxl), &qxl_io_ops, qxl,
|
||||
"qxl-ioports", io_size);
|
||||
if (qxl->id == 0) {
|
||||
if (qxl->have_vga) {
|
||||
vga_dirty_log_start(&qxl->vga);
|
||||
}
|
||||
memory_region_set_flush_coalesced(&qxl->io_bar);
|
||||
@ -2171,7 +2171,7 @@ static void qxl_realize_common(PCIQXLDevice *qxl, Error **errp)
|
||||
|
||||
/* print pci bar details */
|
||||
dprint(qxl, 1, "ram/%s: %" PRId64 " MB [region 0]\n",
|
||||
qxl->id == 0 ? "pri" : "sec", qxl->vga.vram_size / MiB);
|
||||
qxl->have_vga ? "pri" : "sec", qxl->vga.vram_size / MiB);
|
||||
dprint(qxl, 1, "vram/32: %" PRIx64 " MB [region 1]\n",
|
||||
qxl->vram32_size / MiB);
|
||||
dprint(qxl, 1, "vram/64: %" PRIx64 " MB %s\n",
|
||||
@ -2199,7 +2199,6 @@ static void qxl_realize_primary(PCIDevice *dev, Error **errp)
|
||||
VGACommonState *vga = &qxl->vga;
|
||||
Error *local_err = NULL;
|
||||
|
||||
qxl->id = 0;
|
||||
qxl_init_ramsize(qxl);
|
||||
vga->vbe_size = qxl->vgamem_size;
|
||||
vga->vram_size_mb = qxl->vga.vram_size / MiB;
|
||||
@ -2210,8 +2209,15 @@ static void qxl_realize_primary(PCIDevice *dev, Error **errp)
|
||||
vga, "vga");
|
||||
portio_list_set_flush_coalesced(&qxl->vga_port_list);
|
||||
portio_list_add(&qxl->vga_port_list, pci_address_space_io(dev), 0x3b0);
|
||||
qxl->have_vga = true;
|
||||
|
||||
vga->con = graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl);
|
||||
qxl->id = qemu_console_get_index(vga->con); /* == channel_id */
|
||||
if (qxl->id != 0) {
|
||||
error_setg(errp, "primary qxl-vga device must be console 0 "
|
||||
"(first display device on the command line)");
|
||||
return;
|
||||
}
|
||||
|
||||
qxl_realize_common(qxl, &local_err);
|
||||
if (local_err) {
|
||||
@ -2226,15 +2232,14 @@ static void qxl_realize_primary(PCIDevice *dev, Error **errp)
|
||||
|
||||
static void qxl_realize_secondary(PCIDevice *dev, Error **errp)
|
||||
{
|
||||
static int device_id = 1;
|
||||
PCIQXLDevice *qxl = PCI_QXL(dev);
|
||||
|
||||
qxl->id = device_id++;
|
||||
qxl_init_ramsize(qxl);
|
||||
memory_region_init_ram(&qxl->vga.vram, OBJECT(dev), "qxl.vgavram",
|
||||
qxl->vga.vram_size, &error_fatal);
|
||||
qxl->vga.vram_ptr = memory_region_get_ram_ptr(&qxl->vga.vram);
|
||||
qxl->vga.con = graphic_console_init(DEVICE(dev), 0, &qxl_ops, qxl);
|
||||
qxl->id = qemu_console_get_index(qxl->vga.con); /* == channel_id */
|
||||
|
||||
qxl_realize_common(qxl, errp);
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ typedef struct PCIQXLDevice {
|
||||
PortioList vga_port_list;
|
||||
SimpleSpiceDisplay ssd;
|
||||
int id;
|
||||
bool have_vga;
|
||||
uint32_t debug;
|
||||
uint32_t guestdebug;
|
||||
uint32_t cmdlog;
|
||||
|
@ -166,7 +166,6 @@ MemoryRegion *vga_init_io(VGACommonState *s, Object *obj,
|
||||
const MemoryRegionPortio **vbe_ports);
|
||||
void vga_common_reset(VGACommonState *s);
|
||||
|
||||
void vga_sync_dirty_bitmap(VGACommonState *s);
|
||||
void vga_dirty_log_start(VGACommonState *s);
|
||||
void vga_dirty_log_stop(VGACommonState *s);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user