Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/amiga Add voodoofb support. Allows using 3Dfx Voodo...
details: https://anonhg.NetBSD.org/src/rev/78fe10a71963
branches: trunk
changeset: 772998:78fe10a71963
user: rkujawa <rkujawa%NetBSD.org@localhost>
date: Tue Jan 24 00:19:39 2012 +0000
description:
Add voodoofb support. Allows using 3Dfx Voodoo 3 in G-REX as a console.
diffstat:
sys/arch/amiga/amiga/autoconf.c | 22 +++++++++++++++-------
sys/arch/amiga/conf/DRACO | 6 +++---
sys/arch/amiga/conf/GENERIC | 10 +++++++---
sys/arch/amiga/conf/GENERIC.in | 8 ++++++--
sys/arch/amiga/conf/INSTALL | 10 +++++++---
sys/arch/amiga/conf/WSCONS | 14 +++++++++++++-
sys/arch/amiga/conf/files.amiga | 5 ++---
sys/arch/amiga/pci/p5pb.c | 36 ++++++++++++++++++++++--------------
8 files changed, 75 insertions(+), 36 deletions(-)
diffs (truncated from 356 to 300 lines):
diff -r 444780c93a91 -r 78fe10a71963 sys/arch/amiga/amiga/autoconf.c
--- a/sys/arch/amiga/amiga/autoconf.c Mon Jan 23 23:03:39 2012 +0000
+++ b/sys/arch/amiga/amiga/autoconf.c Tue Jan 24 00:19:39 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: autoconf.c,v 1.108 2011/08/04 17:48:50 rkujawa Exp $ */
+/* $NetBSD: autoconf.c,v 1.109 2012/01/24 00:20:45 rkujawa Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.108 2011/08/04 17:48:50 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.109 2012/01/24 00:20:45 rkujawa Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -590,16 +590,22 @@
prop_dictionary_t dict, parent_dict;
struct pci_attach_args *pa = aux;
+ /* TODO: move this stuff into p5pb driver and call only if present. */
if (device_parent(dev) && device_is_a(device_parent(dev), "pci")) {
dict = device_properties(dev);
if (PCI_CLASS(pa->pa_class) == PCI_CLASS_DISPLAY) {
- /* Handle CVPPC/BVPPC card. */
- if ((PCI_VENDOR(pa->pa_id) == PCI_VENDOR_TI)
+ /* Handle the CVPPC/BVPPC card... */
+ if ( ((PCI_VENDOR(pa->pa_id) == PCI_VENDOR_TI)
&& (PCI_PRODUCT(pa->pa_id) ==
- PCI_PRODUCT_TI_TVP4020) ) {
+ PCI_PRODUCT_TI_TVP4020) ) ||
+ /* ...and 3Dfx Voodoo 3 in G-REX. */
+ ((PCI_VENDOR(pa->pa_id) == PCI_VENDOR_3DFX)
+ && (PCI_PRODUCT(pa->pa_id) ==
+ PCI_PRODUCT_3DFX_VOODOO3) )
+ ) {
/*
* PCI bridge knows the properties,
@@ -618,18 +624,20 @@
prop_dictionary_set(dict, "depth",
prop_dictionary_get(parent_dict, "depth"));
+#if (NGENFB > 0)
prop_dictionary_set(dict, "linebytes",
prop_dictionary_get(parent_dict,
"linebytes"));
-
prop_dictionary_set(dict, "address",
prop_dictionary_get(parent_dict,
"address"));
-#if (NGENFB > 0)
prop_dictionary_set(dict, "virtual_address",
prop_dictionary_get(parent_dict,
"virtual_address"));
#endif
+ prop_dictionary_set(dict, "is_console",
+ prop_dictionary_get(parent_dict,
+ "is_console"));
}
}
}
diff -r 444780c93a91 -r 78fe10a71963 sys/arch/amiga/conf/DRACO
--- a/sys/arch/amiga/conf/DRACO Mon Jan 23 23:03:39 2012 +0000
+++ b/sys/arch/amiga/conf/DRACO Tue Jan 24 00:19:39 2012 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: DRACO,v 1.153 2012/01/19 22:43:11 rkujawa Exp $
+# $NetBSD: DRACO,v 1.154 2012/01/24 00:19:39 rkujawa Exp $
#
# This file was automatically created.
# Changes will be lost when make is run in this directory.
#
-# Created from: # NetBSD: GENERIC.in,v 1.94 2012/01/19 22:11:49 rkujawa Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.95 2012/01/19 22:43:11 rkujawa Exp $
#
##
# GENERIC machine description file
@@ -29,7 +29,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.153 $"
+#ident "GENERIC-$Revision: 1.154 $"
maxusers 8
diff -r 444780c93a91 -r 78fe10a71963 sys/arch/amiga/conf/GENERIC
--- a/sys/arch/amiga/conf/GENERIC Mon Jan 23 23:03:39 2012 +0000
+++ b/sys/arch/amiga/conf/GENERIC Tue Jan 24 00:19:39 2012 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: GENERIC,v 1.283 2012/01/19 22:43:11 rkujawa Exp $
+# $NetBSD: GENERIC,v 1.284 2012/01/24 00:19:39 rkujawa Exp $
#
# This file was automatically created.
# Changes will be lost when make is run in this directory.
#
-# Created from: # NetBSD: GENERIC.in,v 1.94 2012/01/19 22:11:49 rkujawa Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.95 2012/01/19 22:43:11 rkujawa Exp $
#
##
# GENERIC machine description file
@@ -29,7 +29,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.283 $"
+#ident "GENERIC-$Revision: 1.284 $"
maxusers 8
@@ -475,6 +475,7 @@
p5pb0 at p5bus0 # Phase5 PCI bridge (CVPPC/BVPPC/G-REX)
p5membar* at zbus0 # Phase5 PCI bridge autoconfiguring BARs
#options P5PB_DEBUG # enable excessive debug for p5pb
+#options P5PB_CONSOLE # console on CVPPC/BVPPC/Voodoo3
pci* at p5pb0
mppb* at zbus0 # Matay Prometheus Zorro-PCI bridge
@@ -483,6 +484,9 @@
#cv3dpb* at zbus0 # CyberVision 64/3D PCI bridge
#genfb* at pci? # generic fb, CVPPC/BVPPC only
+#voodoofb* at pci? # 3Dfx Voodoo 3 in G-REX
+#radeonfb* at pci? # untested
+
ne* at pci? # NE2000 Ethernet
# Bluetooth Controller and Device support
diff -r 444780c93a91 -r 78fe10a71963 sys/arch/amiga/conf/GENERIC.in
--- a/sys/arch/amiga/conf/GENERIC.in Mon Jan 23 23:03:39 2012 +0000
+++ b/sys/arch/amiga/conf/GENERIC.in Tue Jan 24 00:19:39 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.in,v 1.95 2012/01/19 22:43:11 rkujawa Exp $
+# $NetBSD: GENERIC.in,v 1.96 2012/01/24 00:19:39 rkujawa Exp $
#
##
# GENERIC machine description file
@@ -52,7 +52,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.95 $"
+#ident "GENERIC-$Revision: 1.96 $"
m4_ifdef(`INSTALL_CONFIGURATION', `m4_dnl
makeoptions COPTS="-Os"
@@ -562,6 +562,7 @@
p5pb0 at p5bus0 # Phase5 PCI bridge (CVPPC/BVPPC/G-REX)
p5membar* at zbus0 # Phase5 PCI bridge autoconfiguring BARs
#options P5PB_DEBUG # enable excessive debug for p5pb
+#options P5PB_CONSOLE # console on CVPPC/BVPPC/Voodoo3
pci* at p5pb0
mppb* at zbus0 # Matay Prometheus Zorro-PCI bridge
@@ -570,6 +571,9 @@
#cv3dpb* at zbus0 # CyberVision 64/3D PCI bridge
#genfb* at pci? # generic fb, CVPPC/BVPPC only
+#voodoofb* at pci? # 3Dfx Voodoo 3 in G-REX
+#radeonfb* at pci? # untested
+
ne* at pci? # NE2000 Ethernet
# Bluetooth Controller and Device support
diff -r 444780c93a91 -r 78fe10a71963 sys/arch/amiga/conf/INSTALL
--- a/sys/arch/amiga/conf/INSTALL Mon Jan 23 23:03:39 2012 +0000
+++ b/sys/arch/amiga/conf/INSTALL Tue Jan 24 00:19:39 2012 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: INSTALL,v 1.105 2012/01/19 22:43:11 rkujawa Exp $
+# $NetBSD: INSTALL,v 1.106 2012/01/24 00:19:39 rkujawa Exp $
#
# This file was automatically created.
# Changes will be lost when make is run in this directory.
#
-# Created from: # NetBSD: GENERIC.in,v 1.94 2012/01/19 22:11:49 rkujawa Exp $
+# Created from: # NetBSD: GENERIC.in,v 1.95 2012/01/19 22:43:11 rkujawa Exp $
#
##
# GENERIC machine description file
@@ -29,7 +29,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.105 $"
+#ident "GENERIC-$Revision: 1.106 $"
makeoptions COPTS="-Os"
@@ -419,6 +419,7 @@
p5pb0 at p5bus0 # Phase5 PCI bridge (CVPPC/BVPPC/G-REX)
p5membar* at zbus0 # Phase5 PCI bridge autoconfiguring BARs
#options P5PB_DEBUG # enable excessive debug for p5pb
+#options P5PB_CONSOLE # console on CVPPC/BVPPC/Voodoo3
pci* at p5pb0
mppb* at zbus0 # Matay Prometheus Zorro-PCI bridge
@@ -427,6 +428,9 @@
#cv3dpb* at zbus0 # CyberVision 64/3D PCI bridge
#genfb* at pci? # generic fb, CVPPC/BVPPC only
+#voodoofb* at pci? # 3Dfx Voodoo 3 in G-REX
+#radeonfb* at pci? # untested
+
ne* at pci? # NE2000 Ethernet
# Bluetooth Controller and Device support
diff -r 444780c93a91 -r 78fe10a71963 sys/arch/amiga/conf/WSCONS
--- a/sys/arch/amiga/conf/WSCONS Mon Jan 23 23:03:39 2012 +0000
+++ b/sys/arch/amiga/conf/WSCONS Tue Jan 24 00:19:39 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: WSCONS,v 1.63 2011/12/15 14:25:12 phx Exp $
+# $NetBSD: WSCONS,v 1.64 2012/01/24 00:19:39 rkujawa Exp $
# GENERIC with wscons(4)
#
@@ -48,5 +48,17 @@
no ite6 at grf6
no ite7 at grf7
+# PCI framebuffers
+#genfb* at pci? # CyberVisionPPC/BlizzardVisionPPC only
+voodoofb* at pci? # 3Dfx Voodoo 3 in G-REX
+#radeonfb* at pci? # untested
+
+# Console support for CyberVisionPPC, BlizzardVisionPPC and 3Dfx Voodoo 3 in
+# G-REX.
+options P5PB_CONSOLE
+
+wsdisplay* at wsemuldisplaydev? console ?
+
pseudo-device wsfont # wsfont(4) dynamic font loading support
pseudo-device wsmux # mouse & keyboard multiplexor
+
diff -r 444780c93a91 -r 78fe10a71963 sys/arch/amiga/conf/files.amiga
--- a/sys/arch/amiga/conf/files.amiga Mon Jan 23 23:03:39 2012 +0000
+++ b/sys/arch/amiga/conf/files.amiga Tue Jan 24 00:19:39 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.amiga,v 1.153 2012/01/19 00:14:08 rkujawa Exp $
+# $NetBSD: files.amiga,v 1.154 2012/01/24 00:19:39 rkujawa Exp $
# maxpartitions must be first item in files.${ARCH}.newconf
maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL!
@@ -33,7 +33,7 @@
defflag LEV6_DEFER
defflag DEVRELOAD
-defflag opt_p5pb.h P5PB_DEBUG
+defflag opt_p5pb.h P5PB_DEBUG P5PB_CONSOLE
defparam IOBZCLOCK
@@ -526,7 +526,6 @@
include "dev/i2o/files.i2o"
include "dev/pci/files.pci"
-#include "dev/wsfb/files.wsfb"
include "arch/amiga/conf/majors.amiga"
diff -r 444780c93a91 -r 78fe10a71963 sys/arch/amiga/pci/p5pb.c
--- a/sys/arch/amiga/pci/p5pb.c Mon Jan 23 23:03:39 2012 +0000
+++ b/sys/arch/amiga/pci/p5pb.c Tue Jan 24 00:19:39 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: p5pb.c,v 1.6 2012/01/19 00:14:08 rkujawa Exp $ */
+/* $NetBSD: p5pb.c,v 1.7 2012/01/24 00:20:45 rkujawa Exp $ */
/*-
* Copyright (c) 2011, 2012 The NetBSD Foundation, Inc.
@@ -117,7 +117,6 @@
return 0;
}
-
static void
p5pb_attach(device_t parent, device_t self, void *aux)
{
@@ -184,7 +183,10 @@
sc->apc.pc_intr_disestablish = amiga_pci_intr_disestablish;
#ifdef PCI_NETBSD_CONFIGURE
- p5pb_bus_reconfigure(sc);
+ /* Never reconfigure the bus on CVPPC/BVPPC, avoid the fb breakage. */
+ if (sc->bridge_type != P5PB_BRIDGE_CVPPC) {
+ p5pb_bus_reconfigure(sc);
+ }
#endif /* PCI_NETBSD_CONFIGURE */
/* Initialize the bus attachment structure. */
@@ -198,10 +200,7 @@
pba.pba_bus = 0;
pba.pba_bridgetag = NULL;
- /* If we are a CVPPC/BVPPC, set the properties needed for genfb. */
- if (sc->bridge_type == P5PB_BRIDGE_CVPPC) {
- p5pb_set_props(sc);
Home |
Main Index |
Thread Index |
Old Index