summaryrefslogtreecommitdiff
path: root/sys/arch/i386/isa/pcvt
diff options
context:
space:
mode:
authorshawn <shawn@cvs.openbsd.org>1996-07-18 15:37:12 +0000
committershawn <shawn@cvs.openbsd.org>1996-07-18 15:37:12 +0000
commit2a28d25750b4ca887937a36c483c4a958b2868bb (patch)
tree6005916b049dc46fff48932a9e1a7b14811e6e50 /sys/arch/i386/isa/pcvt
parent8e5b906fd582a07f1fbc8cd39cc2be785ee8614f (diff)
make pcvt recognize most S3 adapters up to date
Diffstat (limited to 'sys/arch/i386/isa/pcvt')
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_ext.c49
-rw-r--r--sys/arch/i386/isa/pcvt/pcvt_ioctl.h38
2 files changed, 71 insertions, 16 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_ext.c b/sys/arch/i386/isa/pcvt/pcvt_ext.c
index f97b4af2588..6d09638d0fa 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_ext.c
+++ b/sys/arch/i386/isa/pcvt/pcvt_ext.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_ext.c,v 1.6 1996/07/17 18:11:13 downsj Exp $ */
+/* $OpenBSD: pcvt_ext.c,v 1.7 1996/07/18 15:37:10 shawn Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -443,6 +443,45 @@ vga_chipset(void)
can_do_132col = 1;
return VGA_S3_928;
+ case 0xe0:
+ outb(addr_6845, 0x2e);
+ byte = inb(addr_6845+1);
+
+ switch (byte) {
+ case 0x10:
+ outb(addr_6845, 0x38);
+ outb(addr_6845+1, old1byte);
+ return VGA_S3_732;
+ case 0x11:
+ outb(addr_6845, 0x2f);
+ byte = inb(addr_6845+1);
+
+ outb(addr_6845, 0x38);
+ outb(addr_6845+1, old1byte);
+ /*
+ * XXX this may be wrong
+ * from vgadoc4b.zip, the
+ * value may be 8, but mine
+ * reads 3, so ...
+ */
+ if ((byte & 0x0f) == 0x03)
+ return VGA_S3_765;
+ else
+ return VGA_S3_764;
+ case 0x80:
+ outb(addr_6845, 0x38);
+ outb(addr_6845+1, old1byte);
+ return VGA_S3_866;
+ case 0x90:
+ outb(addr_6845, 0x38);
+ outb(addr_6845+1, old1byte);
+ return VGA_S3_868;
+ case 0xB0:
+ outb(addr_6845, 0x38);
+ outb(addr_6845+1, old1byte);
+ return VGA_S3_968;
+ }
+
default:
outb(addr_6845, 0x38);
outb(addr_6845+1, old1byte);
@@ -588,6 +627,14 @@ vga_string(int number)
"s3 924",
"s3 801/805",
"s3 928",
+ "s3 864",
+ "s3 964",
+ "s3 732 (Trio32)",
+ "s3 764 (Trio64)",
+ "s3 866",
+ "s3 868",
+ "s3 968",
+ "s3 765 (Trio64 V+)",
"unknown s3",
"cl-gd5402",
"cl-gd5402r1",
diff --git a/sys/arch/i386/isa/pcvt/pcvt_ioctl.h b/sys/arch/i386/isa/pcvt/pcvt_ioctl.h
index 56a47582ee6..79190435b86 100644
--- a/sys/arch/i386/isa/pcvt/pcvt_ioctl.h
+++ b/sys/arch/i386/isa/pcvt/pcvt_ioctl.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcvt_ioctl.h,v 1.4 1996/05/25 22:17:57 deraadt Exp $ */
+/* $OpenBSD: pcvt_ioctl.h,v 1.5 1996/07/18 15:37:11 shawn Exp $ */
/*
* Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch.
@@ -268,22 +268,30 @@ struct mousedefs {
#define VGA_S3_924 22 /* S3 924 */
#define VGA_S3_80x 23 /* S3 801/805 */
#define VGA_S3_928 24 /* S3 928 */
-#define VGA_S3_UNKNOWN 25 /* unknown S3 chipset */
+#define VGA_S3_864 25 /* S3 864 */
+#define VGA_S3_964 26 /* S3 964 */
+#define VGA_S3_732 27 /* S3 732 (Trio32) */
+#define VGA_S3_764 28 /* S3 764 (Trio64) */
+#define VGA_S3_866 29 /* S3 866 */
+#define VGA_S3_868 30 /* S3 868 */
+#define VGA_S3_968 31 /* S3 968 */
+#define VGA_S3_765 32 /* S3 765 (Trio64 V+) */
+#define VGA_S3_UNKNOWN 33 /* unknown S3 chipset */
#define VGA_F_CIR 6 /* FAMILY CIRRUS */
-#define VGA_CL_GD5402 26 /* Cirrus CL-GD5402 */
-#define VGA_CL_GD5402r1 27 /* Cirrus CL-GD5402r1 */
-#define VGA_CL_GD5420 28 /* Cirrus CL-GD5420 */
-#define VGA_CL_GD5420r1 29 /* Cirrus CL-GD5420r1 */
-#define VGA_CL_GD5422 30 /* Cirrus CL-GD5422 */
-#define VGA_CL_GD5424 31 /* Cirrus CL-GD5424 */
-#define VGA_CL_GD5426 32 /* Cirrus CL-GD5426 */
-#define VGA_CL_GD5428 33 /* Cirrus CL-GD5428 */
-#define VGA_CL_GD5430 34 /* Cirrus CL-GD543x */
-#define VGA_CL_GD6225 35 /* Cirrus CL-GD62x5 */
-#define VGA_CL_UNKNOWN 36 /* Unknown Cirrus CL */
-
-#define VGA_MAX_CHIPSET 37 /* max no of chips */
+#define VGA_CL_GD5402 34 /* Cirrus CL-GD5402 */
+#define VGA_CL_GD5402r1 35 /* Cirrus CL-GD5402r1 */
+#define VGA_CL_GD5420 36 /* Cirrus CL-GD5420 */
+#define VGA_CL_GD5420r1 37 /* Cirrus CL-GD5420r1 */
+#define VGA_CL_GD5422 38 /* Cirrus CL-GD5422 */
+#define VGA_CL_GD5424 39 /* Cirrus CL-GD5424 */
+#define VGA_CL_GD5426 40 /* Cirrus CL-GD5426 */
+#define VGA_CL_GD5428 41 /* Cirrus CL-GD5428 */
+#define VGA_CL_GD5430 42 /* Cirrus CL-GD543x */
+#define VGA_CL_GD6225 43 /* Cirrus CL-GD62x5 */
+#define VGA_CL_UNKNOWN 44 /* Unknown Cirrus CL */
+
+#define VGA_MAX_CHIPSET 45 /* max no of chips */
/*****************************************************************************/
/* NOTE: update the 'scon' utility when adding support for more chipsets !!! */