Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KjkMU-0004xF-3w for qemu-devel@nongnu.org; Sat, 27 Sep 2008 20:42:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KjkMS-0004wd-9D for qemu-devel@nongnu.org; Sat, 27 Sep 2008 20:42:09 -0400 Received: from [199.232.76.173] (port=49586 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KjkMS-0004wS-6g for qemu-devel@nongnu.org; Sat, 27 Sep 2008 20:42:08 -0400 Received: from savannah.gnu.org ([199.232.41.3]:34261 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KjkMS-0008FR-88 for qemu-devel@nongnu.org; Sat, 27 Sep 2008 20:42:08 -0400 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1KjkMQ-0001vO-Ub for qemu-devel@nongnu.org; Sun, 28 Sep 2008 00:42:07 +0000 Received: from malc by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1KjkMQ-0001vG-BZ for qemu-devel@nongnu.org; Sun, 28 Sep 2008 00:42:06 +0000 MIME-Version: 1.0 Errors-To: malc Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: malc Message-Id: Date: Sun, 28 Sep 2008 00:42:06 +0000 Subject: [Qemu-devel] [5335] Change the way video graphics adapter is selected Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 5335 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=5335 Author: malc Date: 2008-09-28 00:42:05 +0000 (Sun, 28 Sep 2008) Log Message: ----------- Change the way video graphics adapter is selected Instead of having (current)three command line switches -std-vga, -cirrusvga and -vmwarevga, provide one -vga switch which takes an argument, so that: qemu -std-vga becomes qemu -vga std qemu -cirrusvga becomes qemu -vga cirrus qemu -vmwarevga becomes qemu -vga vmware Update documentation accordingly. Modified Paths: -------------- trunk/qemu-doc.texi trunk/vl.c Modified: trunk/qemu-doc.texi =================================================================== --- trunk/qemu-doc.texi 2008-09-27 20:58:43 UTC (rev 5334) +++ trunk/qemu-doc.texi 2008-09-28 00:42:05 UTC (rev 5335) @@ -955,11 +955,24 @@ @item -L path Set the directory for the BIOS, VGA BIOS and keymaps. -@item -std-vga -Simulate a standard VGA card with Bochs VBE extensions (default is -Cirrus Logic GD5446 PCI VGA). If your guest OS supports the VESA 2.0 -VBE extensions (e.g. Windows XP) and if you want to use high -resolution modes (>= 1280x1024x16) then you should use this option. +@item -vga @var{type} +Select type of VGA card to emulate. Valid values for @var{type} are +@table @code +@item cirrus +Cirrus Logic GD5446 Video card. All Windows versions starting from +Windows 95 should recognize and use this graphic card. For optimal +performances, use 16 bit color depth in the guest and the host OS. +(This one is the default) +@item std +Standard VGA card with Bochs VBE extensions. If your guest OS +supports the VESA 2.0 VBE extensions (e.g. Windows XP) and if you want +to use high resolution modes (>= 1280x1024x16) then you should use +this option. +@item vmware +VMWare SVGA-II compatible adapter. Use it if you have sufficiently +recent XFree86/XOrg server or Windows guest with a driver for this +card. +@end table @item -no-acpi Disable ACPI (Advanced Configuration and Power Interface) support. Use Modified: trunk/vl.c =================================================================== --- trunk/vl.c 2008-09-27 20:58:43 UTC (rev 5334) +++ trunk/vl.c 2008-09-28 00:42:05 UTC (rev 5335) @@ -7691,6 +7691,8 @@ " use -soundhw ? to get the list of supported cards\n" " use -soundhw all to enable all of them\n" #endif + "-vga [std|cirrus|vmware]\n" + " select video card type\n" "-localtime set the real time clock to local time [default=utc]\n" "-full-screen start in full screen\n" #ifdef TARGET_I386 @@ -7769,8 +7771,6 @@ "-no-kqemu disable KQEMU kernel module usage\n" #endif #ifdef TARGET_I386 - "-std-vga simulate a standard VGA card with VESA Bochs Extensions\n" - " (default is CL-GD5446 PCI VGA)\n" "-no-acpi disable ACPI\n" #endif #ifdef CONFIG_CURSES @@ -7861,10 +7861,8 @@ QEMU_OPTION_bios, QEMU_OPTION_k, QEMU_OPTION_localtime, - QEMU_OPTION_cirrusvga, - QEMU_OPTION_vmsvga, QEMU_OPTION_g, - QEMU_OPTION_std_vga, + QEMU_OPTION_vga, QEMU_OPTION_echr, QEMU_OPTION_monitor, QEMU_OPTION_serial, @@ -7966,7 +7964,7 @@ { "g", 1, QEMU_OPTION_g }, #endif { "localtime", 0, QEMU_OPTION_localtime }, - { "std-vga", 0, QEMU_OPTION_std_vga }, + { "vga", HAS_ARG, QEMU_OPTION_vga }, { "echr", HAS_ARG, QEMU_OPTION_echr }, { "monitor", HAS_ARG, QEMU_OPTION_monitor }, { "serial", HAS_ARG, QEMU_OPTION_serial }, @@ -7990,8 +7988,6 @@ /* temporary options */ { "usb", 0, QEMU_OPTION_usb }, - { "cirrusvga", 0, QEMU_OPTION_cirrusvga }, - { "vmwarevga", 0, QEMU_OPTION_vmsvga }, { "no-acpi", 0, QEMU_OPTION_no_acpi }, { "no-reboot", 0, QEMU_OPTION_no_reboot }, { "no-shutdown", 0, QEMU_OPTION_no_shutdown }, @@ -8189,6 +8185,27 @@ } #endif +static void select_vgahw (const char *p) +{ + const char *opts; + + if (strstart(p, "std", &opts)) { + cirrus_vga_enabled = 0; + vmsvga_enabled = 0; + } else if (strstart(p, "cirrus", &opts)) { + cirrus_vga_enabled = 1; + vmsvga_enabled = 0; + } else if (strstart(p, "vmware", &opts)) { + cirrus_vga_enabled = 0; + vmsvga_enabled = 1; + } else { + invalid_vga: + fprintf(stderr, "Unknown vga type: %s\n", p); + exit(1); + } + if (*opts) goto invalid_vga; +} + #ifdef _WIN32 static BOOL WINAPI qemu_ctrl_handler(DWORD type) { @@ -8652,18 +8669,9 @@ case QEMU_OPTION_localtime: rtc_utc = 0; break; - case QEMU_OPTION_cirrusvga: - cirrus_vga_enabled = 1; - vmsvga_enabled = 0; + case QEMU_OPTION_vga: + select_vgahw (optarg); break; - case QEMU_OPTION_vmsvga: - cirrus_vga_enabled = 0; - vmsvga_enabled = 1; - break; - case QEMU_OPTION_std_vga: - cirrus_vga_enabled = 0; - vmsvga_enabled = 0; - break; case QEMU_OPTION_g: { const char *p;