Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src add mach64drm, mgadrm, r128drm, savagedrm, sisdrm, and tdfxd...
details: https://anonhg.NetBSD.org/src/rev/97343e2475e1
branches: trunk
changeset: 768887:97343e2475e1
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sun Aug 28 16:19:07 2011 +0000
description:
add mach64drm, mgadrm, r128drm, savagedrm, sisdrm, and tdfxdrm modules
diffstat:
distrib/sets/lists/modules/md.i386 | 18 ++++++-
sys/external/bsd/drm/dist/bsd-core/mach64_drv.c | 61 ++++++------------------
sys/external/bsd/drm/dist/bsd-core/mga_drv.c | 61 ++++++------------------
sys/external/bsd/drm/dist/bsd-core/r128_drv.c | 61 ++++++------------------
sys/external/bsd/drm/dist/bsd-core/savage_drv.c | 61 ++++++------------------
sys/external/bsd/drm/dist/bsd-core/sis_drv.c | 61 ++++++------------------
sys/external/bsd/drm/dist/bsd-core/tdfx_drv.c | 61 ++++++------------------
sys/modules/Makefile | 13 ++++-
sys/modules/mach64drm/Makefile | 19 +++++++
sys/modules/mach64drm/mach64drm.ioconf | 9 +++
sys/modules/mgadrm/Makefile | 20 ++++++++
sys/modules/mgadrm/mgadrm.ioconf | 9 +++
sys/modules/r128drm/Makefile | 19 +++++++
sys/modules/r128drm/r128drm.ioconf | 9 +++
sys/modules/savagedrm/Makefile | 18 +++++++
sys/modules/savagedrm/savagedrm.ioconf | 9 +++
sys/modules/sisdrm/Makefile | 18 +++++++
sys/modules/sisdrm/sisdrm.ioconf | 9 +++
sys/modules/tdfxdrm/Makefile | 16 ++++++
sys/modules/tdfxdrm/tdfxdrm.ioconf | 9 +++
20 files changed, 291 insertions(+), 270 deletions(-)
diffs (truncated from 793 to 300 lines):
diff -r cc728761d709 -r 97343e2475e1 distrib/sets/lists/modules/md.i386
--- a/distrib/sets/lists/modules/md.i386 Sun Aug 28 15:56:21 2011 +0000
+++ b/distrib/sets/lists/modules/md.i386 Sun Aug 28 16:19:07 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.i386,v 1.34 2011/08/28 15:56:21 jmcneill Exp $
+# $NetBSD: md.i386,v 1.35 2011/08/28 16:19:08 jmcneill Exp $
./@MODULEDIR@/acpiacad base-kernel-modules kmod
./@MODULEDIR@/acpiacad/acpiacad.kmod base-kernel-modules kmod
./@MODULEDIR@/acpibat base-kernel-modules kmod
@@ -85,14 +85,16 @@
./@MODULEDIR@/itesio/itesio.kmod base-kernel-modules kmod
./@MODULEDIR@/lg3303 base-kernel-modules kmod
./@MODULEDIR@/lg3303/lg3303.kmod base-kernel-modules kmod
+./@MODULEDIR@/mach64drm base-kernel-modules kmod
+./@MODULEDIR@/mach64drm/mach64drm.kmod base-kernel-modules kmod
+./@MODULEDIR@/mgadrm base-kernel-modules kmod
+./@MODULEDIR@/mgadrm/mgadrm.kmod base-kernel-modules kmod
./@MODULEDIR@/mt2131 base-kernel-modules kmod
./@MODULEDIR@/mt2131/mt2131.kmod base-kernel-modules kmod
./@MODULEDIR@/nsclpcsio base-kernel-modules kmod
./@MODULEDIR@/nsclpcsio/nsclpcsio.kmod base-kernel-modules kmod
./@MODULEDIR@/nxt2k base-kernel-modules kmod
./@MODULEDIR@/nxt2k/nxt2k.kmod base-kernel-modules kmod
-./@MODULEDIR@/radeondrm base-kernel-modules kmod
-./@MODULEDIR@/radeondrm/radeondrm.kmod base-kernel-modules kmod
./@MODULEDIR@/odcm base-kernel-modules kmod
./@MODULEDIR@/odcm/odcm.kmod base-kernel-modules kmod
./@MODULEDIR@/pad base-kernel-modules kmod
@@ -103,6 +105,16 @@
./@MODULEDIR@/powernow/powernow.kmod base-kernel-modules kmod
./@MODULEDIR@/pwdog base-kernel-modules kmod
./@MODULEDIR@/pwdog/pwdog.kmod base-kernel-modules kmod
+./@MODULEDIR@/r128drm base-kernel-modules kmod
+./@MODULEDIR@/r128drm/r128drm.kmod base-kernel-modules kmod
+./@MODULEDIR@/radeondrm base-kernel-modules kmod
+./@MODULEDIR@/radeondrm/radeondrm.kmod base-kernel-modules kmod
+./@MODULEDIR@/savagedrm base-kernel-modules kmod
+./@MODULEDIR@/savagedrm/savagedrm.kmod base-kernel-modules kmod
+./@MODULEDIR@/sisdrm base-kernel-modules kmod
+./@MODULEDIR@/sisdrm/sisdrm.kmod base-kernel-modules kmod
+./@MODULEDIR@/tdfxdrm base-kernel-modules kmod
+./@MODULEDIR@/tdfxdrm/tdfxdrm.kmod base-kernel-modules kmod
./@MODULEDIR@/thinkpad base-kernel-modules kmod
./@MODULEDIR@/thinkpad/thinkpad.kmod base-kernel-modules kmod
./@MODULEDIR@/tprof_amdpmi base-kernel-modules kmod
diff -r cc728761d709 -r 97343e2475e1 sys/external/bsd/drm/dist/bsd-core/mach64_drv.c
--- a/sys/external/bsd/drm/dist/bsd-core/mach64_drv.c Sun Aug 28 15:56:21 2011 +0000
+++ b/sys/external/bsd/drm/dist/bsd-core/mach64_drv.c Sun Aug 28 16:19:07 2011 +0000
@@ -163,62 +163,35 @@
CFATTACH_DECL_NEW(mach64drm, sizeof(struct drm_device),
mach64drm_probe, mach64drm_attach, drm_detach, NULL);
-#ifdef _MODULE
-
-MODULE(MODULE_CLASS_DRIVER, mach64drm, NULL);
+MODULE(MODULE_CLASS_DRIVER, mach64drm, "drm");
-CFDRIVER_DECL(mach64drm, DV_DULL, NULL);
-extern struct cfattach mach64drm_ca;
-static int drmloc[] = { -1 };
-static struct cfparent drmparent = {
- "drm", "vga", DVUNIT_ANY
-};
-static struct cfdata mach64drm_cfdata[] = {
- {
- .cf_name = "mach64drm",
- .cf_atname = "mach64drm",
- .cf_unit = 0,
- .cf_fstate = FSTATE_STAR,
- .cf_loc = drmloc,
- .cf_flags = 0,
- .cf_pspec = &drmparent,
- },
- { NULL }
-};
+#ifdef _MODULE
+#include "ioconf.c"
+#endif
static int
mach64drm_modcmd(modcmd_t cmd, void *arg)
{
- int err;
+ int error = 0;
switch (cmd) {
case MODULE_CMD_INIT:
- err = config_cfdriver_attach(&mach64drm_cd);
- if (err)
- return err;
- err = config_cfattach_attach("mach64drm", &mach64drm_ca);
- if (err) {
- config_cfdriver_detach(&mach64drm_cd);
- return err;
- }
- err = config_cfdata_attach(mach64drm_cfdata, 1);
- if (err) {
- config_cfattach_detach("mach64drm", &mach64drm_ca);
- config_cfdriver_detach(&mach64drm_cd);
- return err;
- }
- return 0;
+#ifdef _MODULE
+ error = config_init_component(cfdriver_ioconf_mach64drm,
+ cfattach_ioconf_mach64drm, cfdata_ioconf_mach64drm);
+#endif
+ break;
case MODULE_CMD_FINI:
- err = config_cfdata_detach(mach64drm_cfdata);
- if (err)
- return err;
- config_cfattach_detach("mach64drm", &mach64drm_ca);
- config_cfdriver_detach(&mach64drm_cd);
- return 0;
+#ifdef _MODULE
+ error = config_fini_component(cfdriver_ioconf_mach64drm,
+ cfattach_ioconf_mach64drm, cfdata_ioconf_mach64drm);
+#endif
+ break;
default:
return ENOTTY;
}
+
+ return 0;
}
-#endif /* _MODULE */
#endif
diff -r cc728761d709 -r 97343e2475e1 sys/external/bsd/drm/dist/bsd-core/mga_drv.c
--- a/sys/external/bsd/drm/dist/bsd-core/mga_drv.c Sun Aug 28 15:56:21 2011 +0000
+++ b/sys/external/bsd/drm/dist/bsd-core/mga_drv.c Sun Aug 28 16:19:07 2011 +0000
@@ -226,62 +226,35 @@
CFATTACH_DECL_NEW(mgadrm, sizeof(struct drm_device),
mgadrm_probe, mgadrm_attach, drm_detach, NULL);
-#ifdef _MODULE
-
-MODULE(MODULE_CLASS_DRIVER, mgadrm, NULL);
+MODULE(MODULE_CLASS_DRIVER, mgadrm, "drm");
-CFDRIVER_DECL(mgadrm, DV_DULL, NULL);
-extern struct cfattach mgadrm_ca;
-static int drmloc[] = { -1 };
-static struct cfparent drmparent = {
- "drm", "vga", DVUNIT_ANY
-};
-static struct cfdata mgadrm_cfdata[] = {
- {
- .cf_name = "mgadrm",
- .cf_atname = "mgadrm",
- .cf_unit = 0,
- .cf_fstate = FSTATE_STAR,
- .cf_loc = drmloc,
- .cf_flags = 0,
- .cf_pspec = &drmparent,
- },
- { NULL }
-};
+#ifdef _MODULE
+#include "ioconf.c"
+#endif
static int
mgadrm_modcmd(modcmd_t cmd, void *arg)
{
- int err;
+ int error = 0;
switch (cmd) {
case MODULE_CMD_INIT:
- err = config_cfdriver_attach(&mgadrm_cd);
- if (err)
- return err;
- err = config_cfattach_attach("mgadrm", &mgadrm_ca);
- if (err) {
- config_cfdriver_detach(&mgadrm_cd);
- return err;
- }
- err = config_cfdata_attach(mgadrm_cfdata, 1);
- if (err) {
- config_cfattach_detach("mgadrm", &mgadrm_ca);
- config_cfdriver_detach(&mgadrm_cd);
- return err;
- }
- return 0;
+#ifdef _MODULE
+ error = config_init_component(cfdriver_ioconf_mgadrm,
+ cfattach_ioconf_mgadrm, cfdata_ioconf_mgadrm);
+#endif
+ break;
case MODULE_CMD_FINI:
- err = config_cfdata_detach(mgadrm_cfdata);
- if (err)
- return err;
- config_cfattach_detach("mgadrm", &mgadrm_ca);
- config_cfdriver_detach(&mgadrm_cd);
- return 0;
+#ifdef _MODULE
+ error = config_fini_component(cfdriver_ioconf_mgadrm,
+ cfattach_ioconf_mgadrm, cfdata_ioconf_mgadrm);
+#endif
+ break;
default:
return ENOTTY;
}
+
+ return error;
}
-#endif /* _MODULE */
#endif
diff -r cc728761d709 -r 97343e2475e1 sys/external/bsd/drm/dist/bsd-core/r128_drv.c
--- a/sys/external/bsd/drm/dist/bsd-core/r128_drv.c Sun Aug 28 15:56:21 2011 +0000
+++ b/sys/external/bsd/drm/dist/bsd-core/r128_drv.c Sun Aug 28 16:19:07 2011 +0000
@@ -161,62 +161,35 @@
CFATTACH_DECL_NEW(r128drm, sizeof(struct drm_device),
r128drm_probe, r128drm_attach, drm_detach, NULL);
-#ifdef _MODULE
-
-MODULE(MODULE_CLASS_DRIVER, r128drm, NULL);
+MODULE(MODULE_CLASS_DRIVER, r128drm, "drm,ati_pcigart");
-CFDRIVER_DECL(r128drm, DV_DULL, NULL);
-extern struct cfattach r128drm_ca;
-static int drmloc[] = { -1 };
-static struct cfparent drmparent = {
- "drm", "vga", DVUNIT_ANY
-};
-static struct cfdata r128drm_cfdata[] = {
- {
- .cf_name = "r128drm",
- .cf_atname = "r128drm",
- .cf_unit = 0,
- .cf_fstate = FSTATE_STAR,
- .cf_loc = drmloc,
- .cf_flags = 0,
- .cf_pspec = &drmparent,
- },
- { NULL }
-};
+#ifdef _MODULE
+#include "ioconf.c"
+#endif
static int
r128drm_modcmd(modcmd_t cmd, void *arg)
{
- int err;
+ int error = 0;
switch (cmd) {
case MODULE_CMD_INIT:
- err = config_cfdriver_attach(&r128drm_cd);
- if (err)
- return err;
- err = config_cfattach_attach("r128drm", &r128drm_ca);
- if (err) {
- config_cfdriver_detach(&r128drm_cd);
- return err;
- }
- err = config_cfdata_attach(r128drm_cfdata, 1);
- if (err) {
- config_cfattach_detach("r128drm", &r128drm_ca);
- config_cfdriver_detach(&r128drm_cd);
- return err;
- }
- return 0;
+#ifdef _MODULE
+ error = config_init_component(cfdriver_ioconf_r128drm,
+ cfattach_ioconf_r128drm, cfdata_ioconf_r128drm);
+#endif
+ break;
case MODULE_CMD_FINI:
- err = config_cfdata_detach(r128drm_cfdata);
- if (err)
- return err;
- config_cfattach_detach("r128drm", &r128drm_ca);
- config_cfdriver_detach(&r128drm_cd);
- return 0;
+#ifdef _MODULE
+ error = config_fini_component(cfdriver_ioconf_r128drm,
+ cfattach_ioconf_r128drm, cfdata_ioconf_r128drm);
+#endif
+ break;
default:
return ENOTTY;
}
+
+ return error;
}
-#endif /* _MODULE */
#endif
diff -r cc728761d709 -r 97343e2475e1 sys/external/bsd/drm/dist/bsd-core/savage_drv.c
--- a/sys/external/bsd/drm/dist/bsd-core/savage_drv.c Sun Aug 28 15:56:21 2011 +0000
+++ b/sys/external/bsd/drm/dist/bsd-core/savage_drv.c Sun Aug 28 16:19:07 2011 +0000
@@ -146,62 +146,35 @@
CFATTACH_DECL_NEW(savagedrm, sizeof(struct drm_device),
savagedrm_probe, savagedrm_attach, drm_detach, NULL);
Home |
Main Index |
Thread Index |
Old Index