From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DNT0B-0000or-5F for qemu-devel@nongnu.org; Mon, 18 Apr 2005 05:57:11 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DNT08-0000oO-IK for qemu-devel@nongnu.org; Mon, 18 Apr 2005 05:57:10 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DNSz0-0000Dx-BU for qemu-devel@nongnu.org; Mon, 18 Apr 2005 05:55:58 -0400 Received: from [195.3.96.89] (helo=email.aon.at) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DNSv2-0006aG-8o for qemu-devel@nongnu.org; Mon, 18 Apr 2005 05:51:52 -0400 Received: from m1105p001.adsl.highway.telekom.at (HELO s37.loc) ([80.121.10.1]) (envelope-sender ) by smarthub74.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 18 Apr 2005 09:50:16 -0000 Received: from cow by s37.loc with local (Exim 4.50) id 1DNStW-0006BK-CN for qemu-devel@nongnu.org; Mon, 18 Apr 2005 11:50:18 +0200 Date: Mon, 18 Apr 2005 11:50:18 +0200 From: Bernhard Fischer Message-ID: <20050418095018.GA23069@aon.at> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MfFXiAuoTsnnDAfZ" Content-Disposition: inline Subject: [Qemu-devel] [patch] remove S3VGA 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 --MfFXiAuoTsnnDAfZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline hw/vga.c: S3 VGA is deprecated, remove it. --MfFXiAuoTsnnDAfZ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="qemu.remove-s3vga.diff" diff -X excl -rduNp qemu.oorig/hw/vga.c qemu/hw/vga.c --- qemu.oorig/hw/vga.c 2005-02-10 23:00:27.000000000 +0100 +++ qemu/hw/vga.c 2005-04-18 10:21:45.113278016 +0200 @@ -28,12 +28,8 @@ //#define DEBUG_VGA_MEM //#define DEBUG_VGA_REG -//#define DEBUG_S3 //#define DEBUG_BOCHS_VBE -/* S3 VGA is deprecated - another graphic card will be emulated */ -//#define CONFIG_S3VGA - /* force some bits to zero */ const uint8_t sr_mask[8] = { (uint8_t)~0xfc, @@ -225,11 +221,6 @@ static uint32_t vga_ioport_read(void *op #ifdef DEBUG_VGA_REG printf("vga: read CR%x = 0x%02x\n", s->cr_index, val); #endif -#ifdef DEBUG_S3 - if (s->cr_index >= 0x20) - printf("S3: CR read index=0x%x val=0x%x\n", - s->cr_index, val); -#endif break; case 0x3ba: case 0x3da: @@ -359,43 +350,10 @@ static void vga_ioport_write(void *opaqu case 0x12: /* veritcal display end */ s->cr[s->cr_index] = val; break; - -#ifdef CONFIG_S3VGA - /* S3 registers */ - case 0x2d: - case 0x2e: - case 0x2f: - case 0x30: - /* chip ID, cannot write */ - break; - case 0x31: - /* update start address */ - { - int v; - s->cr[s->cr_index] = val; - v = (val >> 4) & 3; - s->cr[0x69] = (s->cr[69] & ~0x03) | v; - } - break; - case 0x51: - /* update start address */ - { - int v; - s->cr[s->cr_index] = val; - v = val & 3; - s->cr[0x69] = (s->cr[69] & ~0x0c) | (v << 2); - } - break; -#endif default: s->cr[s->cr_index] = val; break; } -#ifdef DEBUG_S3 - if (s->cr_index >= 0x20) - printf("S3: CR write index=0x%x val=0x%x\n", - s->cr_index, val); -#endif break; case 0x3ba: case 0x3da: @@ -954,22 +912,10 @@ static void vga_get_offsets(VGAState *s, { /* compute line_offset in bytes */ line_offset = s->cr[0x13]; -#ifdef CONFIG_S3VGA - { - uinr32_t v; - v = (s->cr[0x51] >> 4) & 3; /* S3 extension */ - if (v == 0) - v = (s->cr[0x43] >> 2) & 1; /* S3 extension */ - line_offset |= (v << 8); - } -#endif line_offset <<= 3; - + /* starting address */ start_addr = s->cr[0x0d] | (s->cr[0x0c] << 8); -#ifdef CONFIG_S3VGA - start_addr |= (s->cr[0x69] & 0x1f) << 16; /* S3 extension */ -#endif } *pline_offset = line_offset; *pstart_addr = start_addr; @@ -1597,13 +1543,6 @@ void vga_invalidate_display(void) static void vga_reset(VGAState *s) { memset(s, 0, sizeof(VGAState)); -#ifdef CONFIG_S3VGA - /* chip ID for 8c968 */ - s->cr[0x2d] = 0x88; - s->cr[0x2e] = 0xb0; - s->cr[0x2f] = 0x01; /* XXX: check revision code */ - s->cr[0x30] = 0xe1; -#endif s->graphic_mode = -1; /* force full update */ } --MfFXiAuoTsnnDAfZ--