From 993fbfdb1b1a8d9b3d32ed57afc70a7be1a5e9dc Mon Sep 17 00:00:00 2001 From: Anthony Liguori Date: Thu, 21 May 2009 16:54:00 -0500 Subject: Refactor how display drivers are selected My previous commit, f92f8afebe, broke -vnc (spotted by Glauber Costa). This is because it's necessary to tell when the no special display parameters have been passed and default to SDL or VNC appropriately. This refactors the display selection logic to be less complicated which has the effect of fixing the regression mentioned above. Signed-off-by: Anthony Liguori --- hw/sun4m.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/sun4m.c') diff --git a/hw/sun4m.c b/hw/sun4m.c index f6b35effde..1c0f46729a 100644 --- a/hw/sun4m.c +++ b/hw/sun4m.c @@ -505,7 +505,7 @@ static void sun4m_hw_init(const struct sun4m_hwdef *hwdef, ram_addr_t RAM_size, slavio_cpu_irq, smp_cpus); slavio_serial_ms_kbd_init(hwdef->ms_kb_base, slavio_irq[hwdef->ms_kb_irq], - nographic, ESCC_CLOCK, 1); + display_type == DT_NOGRAPHIC, ESCC_CLOCK, 1); // Slavio TTYA (base+4, Linux ttyS0) is the first Qemu serial device // Slavio TTYB (base+0, Linux ttyS1) is the second Qemu serial device escc_init(hwdef->serial_base, slavio_irq[hwdef->ser_irq], slavio_irq[hwdef->ser_irq], @@ -1273,7 +1273,7 @@ static void sun4d_hw_init(const struct sun4d_hwdef *hwdef, ram_addr_t RAM_size, sbi_cpu_irq, smp_cpus); slavio_serial_ms_kbd_init(hwdef->ms_kb_base, sbi_irq[hwdef->ms_kb_irq], - nographic, ESCC_CLOCK, 1); + display_type == DT_NOGRAPHIC, ESCC_CLOCK, 1); // Slavio TTYA (base+4, Linux ttyS0) is the first Qemu serial device // Slavio TTYB (base+0, Linux ttyS1) is the second Qemu serial device escc_init(hwdef->serial_base, sbi_irq[hwdef->ser_irq], sbi_irq[hwdef->ser_irq], @@ -1476,7 +1476,7 @@ static void sun4c_hw_init(const struct sun4c_hwdef *hwdef, ram_addr_t RAM_size, hwdef->nvram_size, 2); slavio_serial_ms_kbd_init(hwdef->ms_kb_base, slavio_irq[hwdef->ms_kb_irq], - nographic, ESCC_CLOCK, 1); + display_type == DT_NOGRAPHIC, ESCC_CLOCK, 1); // Slavio TTYA (base+4, Linux ttyS0) is the first Qemu serial device // Slavio TTYB (base+0, Linux ttyS1) is the second Qemu serial device escc_init(hwdef->serial_base, slavio_irq[hwdef->ser_irq], -- cgit v1.2.3