CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Tue Apr 19 06:57:37 UTC 2016 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: revert rev 1.6. we don't have access to those files as normal files and possible will get them directly elsewhere soon. (if i hack my nouveau to ignore fireware failure, it end up having a vaguely working console and slowly working X, which is better than the current situation.) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.7 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.8 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.7 Thu Feb 11 04:51:44 2016 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Tue Apr 19 06:57:37 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.7 2016/02/11 04:51:44 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.8 2016/04/19 06:57:37 mrg Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.7 2016/02/11 04:51:44 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.8 2016/04/19 06:57:37 mrg Exp $"); #include #include @@ -51,7 +51,6 @@ SIMPLEQ_HEAD(nouveau_pci_task_head, nouv struct nouveau_pci_softc { device_t sc_dev; - struct pci_attach_args sc_pa; enum { NOUVEAU_TASK_ATTACH, NOUVEAU_TASK_WORKQUEUE, @@ -67,7 +66,6 @@ struct nouveau_pci_softc { static int nouveau_pci_match(device_t, cfdata_t, void *); static void nouveau_pci_attach(device_t, device_t, void *); -static void nouveau_attach_real(device_t); static int nouveau_pci_detach(device_t, int); static bool nouveau_pci_suspend(device_t, const pmf_qual_t *); @@ -104,27 +102,17 @@ nouveau_pci_attach(device_t parent, devi { struct nouveau_pci_softc *const sc = device_private(self); const struct pci_attach_args *const pa = aux; + uint64_t devname; + int error; pci_aprint_devinfo(pa, NULL); sc->sc_dev = self; - sc->sc_pa = *pa; if (!pmf_device_register(self, &nouveau_pci_suspend, &nouveau_pci_resume)) aprint_error_dev(self, "unable to establish power handler\n"); - config_mountroot(self, &nouveau_attach_real); -} - -static void -nouveau_attach_real(device_t self) -{ - struct nouveau_pci_softc *const sc = device_private(self); - const struct pci_attach_args *const pa = &sc->sc_pa; - uint64_t devname; - int error; - sc->sc_task_state = NOUVEAU_TASK_ATTACH; SIMPLEQ_INIT(&sc->sc_task_u.attach);
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: jmcneill Date: Sat Oct 17 12:02:44 UTC 2015 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau nouveau_module.c nouveau_pci.c nouveau_pci.h nouveaufb.c Log Message: Split nouveau@pci from nouveau so we can attach it to other busses. nouveaufb still depends on nouveau_pci, but it is not applicable to non-PCI devices anyway. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/nouveau/files.nouveau cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/nouveau/nouveau_module.c \ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/nouveau/nouveau_pci.h cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/nouveau/nouveaufb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.8 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.9 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.8 Fri Mar 6 01:43:07 2015 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Sat Oct 17 12:02:44 2015 @@ -1,14 +1,15 @@ -# $NetBSD: files.nouveau,v 1.8 2015/03/06 01:43:07 riastradh Exp $ +# $NetBSD: files.nouveau,v 1.9 2015/10/17 12:02:44 jmcneill Exp $ define nouveaufbbus { } -device nouveau: drmkms, drmkms_pci, drmkms_ttm, nouveaufbbus -attach nouveau at pci +device nouveau: drmkms, drmkms_ttm, nouveaufbbus + +attach nouveau at pci with nouveau_pci: drmkms_pci +file external/bsd/drm2/nouveau/nouveau_pci.c nouveau device nouveaufb: nouveaufbbus, drmfb, drmfb_pci, wsemuldisplaydev attach nouveaufb at nouveaufbbus # Local additions. External sources are listd below. -file external/bsd/drm2/nouveau/nouveau_pci.c nouveau file external/bsd/drm2/nouveau/nouveau_sysfs.c nouveau file external/bsd/drm2/nouveau/nouveau_vga.c nouveau file external/bsd/drm2/nouveau/nouveaufb.c nouveaufb Index: src/sys/external/bsd/drm2/nouveau/nouveau_module.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.3 src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.4 --- src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.3 Wed Nov 12 03:14:00 2014 +++ src/sys/external/bsd/drm2/nouveau/nouveau_module.c Sat Oct 17 12:02:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_module.c,v 1.3 2014/11/12 03:14:00 christos Exp $ */ +/* $NetBSD: nouveau_module.c,v 1.4 2015/10/17 12:02:44 jmcneill Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,13 +30,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_module.c,v 1.3 2014/11/12 03:14:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_module.c,v 1.4 2015/10/17 12:02:44 jmcneill Exp $"); #include #include -#ifndef _MODULE -#include -#endif #include #include @@ -45,7 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: nouveau_modu #include #include -MODULE(MODULE_CLASS_DRIVER, nouveau, "drmkms,drmkms_pci"); /* XXX drmkms_i2c, drmkms_ttm */ +MODULE(MODULE_CLASS_DRIVER, nouveau, "drmkms"); /* XXX drmkms_i2c, drmkms_ttm */ #ifdef _MODULE #include "ioconf.c" @@ -58,53 +55,20 @@ extern struct drm_driver *const nouveau_ static int nouveau_init(void) { - extern int drm_guarantee_initialized(void); - int error; - - error = drm_guarantee_initialized(); - if (error) - return error; - - error = drm_pci_init(nouveau_drm_driver, NULL); - if (error) { - aprint_error("nouveau: failed to init pci: %d\n", error); - return error; - } - nouveau_objects_init(); nouveau_devices_init(); -#if 0/* XXX nouveau acpi */ - nouveau_register_dsm_handler(); -#endif drm_sysctl_init(&nouveau_def); return 0; } -int nouveau_guarantee_initialized(void); /* XXX */ -int -nouveau_guarantee_initialized(void) -{ -#ifdef _MODULE - return 0; -#else - static ONCE_DECL(nouveau_init_once); - - return RUN_ONCE(&nouveau_init_once, &nouveau_init); -#endif -} - static void nouveau_fini(void) { drm_sysctl_fini(&nouveau_def); -#if 0/* XXX nouveau acpi */ - nouveau_unregister_dsm_handler(); -#endif nouveau_devices_fini(); nouveau_objects_fini(); - drm_pci_exit(nouveau_drm_driver, NULL); } static int @@ -114,11 +78,7 @@ nouveau_modcmd(modcmd_t cmd, void *arg _ switch (cmd) { case MODULE_CMD_INIT: -#ifdef _MODULE error = nouveau_init(); -#else - error = nouveau_guarantee_initialized(); -#endif if (error) { aprint_error("nouveau: failed to initialize: %d\n", error); Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.3 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.4 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.3 Fri Mar 6 15:39:28 2015 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Sat Oct 17 12:02:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.3 2015/03/06 15:39:28 riastradh Exp $ */ +/* $NetBSD: nouve
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: jmcneill Date: Sat Oct 17 17:32:18 UTC 2015 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: nouveau_pci.c depends on nouveau_pci condition, not nouveau To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/nouveau/files.nouveau Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.9 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.10 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.9 Sat Oct 17 12:02:44 2015 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Sat Oct 17 17:32:18 2015 @@ -1,10 +1,10 @@ -# $NetBSD: files.nouveau,v 1.9 2015/10/17 12:02:44 jmcneill Exp $ +# $NetBSD: files.nouveau,v 1.10 2015/10/17 17:32:18 jmcneill Exp $ define nouveaufbbus { } device nouveau: drmkms, drmkms_ttm, nouveaufbbus attach nouveau at pci with nouveau_pci: drmkms_pci -file external/bsd/drm2/nouveau/nouveau_pci.c nouveau +file external/bsd/drm2/nouveau/nouveau_pci.c nouveau_pci device nouveaufb: nouveaufbbus, drmfb, drmfb_pci, wsemuldisplaydev attach nouveaufb at nouveaufbbus
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: jmcneill Date: Thu Oct 22 23:16:23 UTC 2015 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: sprinkle -Wno-missing-field-initializers To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm2/nouveau/files.nouveau Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.11 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.12 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.11 Sun Oct 18 15:42:00 2015 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Thu Oct 22 23:16:23 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.11 2015/10/18 15:42:00 jmcneill Exp $ +# $NetBSD: files.nouveau,v 1.12 2015/10/22 23:16:23 jmcneill Exp $ define nouveaufbbus { } device nouveau: drmkms, drmkms_ttm, nouveaufbbus @@ -62,6 +62,7 @@ makeoptions nouveau "CWARNFLAGS.nouveau_ makeoptions nouveau "CWARNFLAGS.nouveau_engine_dmaobj_nv50.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_dmaobj_nvc0.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_dmaobj_nvd0.c"+="-Wno-missing-field-initializers" +makeoptions nouveau "CWARNFLAGS.nouveau_engine_fifo_gk20a.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_fifo_nv04.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_fifo_nv10.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_fifo_nv108.c"+="-Wno-missing-field-initializers" @@ -71,6 +72,7 @@ makeoptions nouveau "CWARNFLAGS.nouveau_ makeoptions nouveau "CWARNFLAGS.nouveau_engine_fifo_nv84.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_fifo_nvc0.c"+="-Wno-missing-field-initializers -Wno-shadow" makeoptions nouveau "CWARNFLAGS.nouveau_engine_fifo_nve0.c"+="-Wno-missing-field-initializers -Wno-shadow" +makeoptions nouveau "CWARNFLAGS.nouveau_engine_graph_ctxgk20a.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_graph_ctxgm107.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_graph_ctxnv108.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_graph_ctxnvc0.c"+="-Wno-missing-field-initializers" @@ -81,6 +83,7 @@ makeoptions nouveau "CWARNFLAGS.nouveau_ makeoptions nouveau "CWARNFLAGS.nouveau_engine_graph_ctxnvd9.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_graph_ctxnve4.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_graph_ctxnvf0.c"+="-Wno-missing-field-initializers" +makeoptions nouveau "CWARNFLAGS.nouveau_engine_graph_gk20a.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_graph_gm107.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_graph_nv04.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_graph_nv10.c"+="-Wno-missing-field-initializers" @@ -159,6 +162,7 @@ makeoptions nouveau "CWARNFLAGS.nouveau_ makeoptions nouveau "CWARNFLAGS.nouveau_subdev_devinit_nvaf.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_devinit_nvc0.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_fb_base.c"+="-Wno-shadow" +makeoptions nouveau "CWARNFLAGS.nouveau_subdev_fb_gk20a.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_fb_gm107.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_fb_nv04.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_fb_nv1a.c"+="-Wno-missing-field-initializers" @@ -182,6 +186,7 @@ makeoptions nouveau "CWARNFLAGS.nouveau_ makeoptions nouveau "CWARNFLAGS.nouveau_subdev_fb_nvaf.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_fb_nvc0.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_fb_nve0.c"+="-Wno-missing-field-initializers" +makeoptions nouveau "CWARNFLAGS.nouveau_subdev_fb_ramgk20a.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_fb_ramgm107.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_fb_ramnv04.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_fb_ramnv10.c"+="-Wno-missing-field-initializers" @@ -214,6 +219,7 @@ makeoptions nouveau "CWARNFLAGS.nouveau_ makeoptions nouveau "CWARNFLAGS.nouveau_subdev_i2c_nv94.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_i2c_nv94.c"+="-Wno-missing-prototypes" makeoptions nouveau "CWARNFLAGS
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Tue Oct 27 21:46:43 UTC 2015 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: push the real attach down via config_mountroot, like radeon, as we need firmware files.. which are currently missing: drm kern error: nouveau E[ PGRAPH][nouveau0] failed to load fuc409c To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.5 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.6 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.5 Tue Oct 27 13:21:19 2015 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Tue Oct 27 21:46:42 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.5 2015/10/27 13:21:19 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.6 2015/10/27 21:46:42 mrg Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.5 2015/10/27 13:21:19 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.6 2015/10/27 21:46:42 mrg Exp $"); #include #include @@ -51,6 +51,7 @@ SIMPLEQ_HEAD(nouveau_pci_task_head, nouv struct nouveau_pci_softc { device_t sc_dev; + struct pci_attach_args sc_pa; enum { NOUVEAU_TASK_ATTACH, NOUVEAU_TASK_WORKQUEUE, @@ -66,6 +67,7 @@ struct nouveau_pci_softc { static int nouveau_pci_match(device_t, cfdata_t, void *); static void nouveau_pci_attach(device_t, device_t, void *); +static void nouveau_attach_real(device_t); static int nouveau_pci_detach(device_t, int); static bool nouveau_pci_suspend(device_t, const pmf_qual_t *); @@ -102,17 +104,27 @@ nouveau_pci_attach(device_t parent, devi { struct nouveau_pci_softc *const sc = device_private(self); const struct pci_attach_args *const pa = aux; - uint64_t devname; - int error; pci_aprint_devinfo(pa, NULL); sc->sc_dev = self; + sc->sc_pa = *pa; if (!pmf_device_register(self, &nouveau_pci_suspend, &nouveau_pci_resume)) aprint_error_dev(self, "unable to establish power handler\n"); + config_mountroot(self, &nouveau_attach_real); +} + +static void +nouveau_attach_real(device_t self) +{ + struct nouveau_pci_softc *const sc = device_private(self); + const struct pci_attach_args *const pa = &sc->sc_pa; + uint64_t devname; + int error; + sc->sc_task_state = NOUVEAU_TASK_ATTACH; SIMPLEQ_INIT(&sc->sc_task_u.attach);
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: jmcneill Date: Mon Feb 3 16:52:13 UTC 2020 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: Disable simplefb if nouveau attaches To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.25 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.26 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.25 Sat Oct 5 22:37:49 2019 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Mon Feb 3 16:52:13 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.25 2019/10/05 22:37:49 mrg Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.26 2020/02/03 16:52:13 jmcneill Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.25 2019/10/05 22:37:49 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.26 2020/02/03 16:52:13 jmcneill Exp $"); + +#ifdef _KERNEL_OPT +#if defined(__arm__) || defined(__aarch64__) +#include "opt_fdt.h" +#endif +#endif #include #include @@ -43,6 +49,10 @@ __KERNEL_RCSID(0, "$NetBSD: nouveau_pci. #include #include +#ifdef FDT +#include +#endif + #include "nouveau_drm.h" #include "nouveau_pci.h" @@ -154,6 +164,15 @@ nouveau_pci_attach(device_t parent, devi sc->sc_dev = NULL; sc->sc_pa = *pa; +#ifdef FDT + /* + * XXX Remove the simple framebuffer, assuming that this device + * will take over. + */ + const char *fb_compatible[] = { "simple-framebuffer", NULL }; + fdt_remove_bycompat(fb_compatible); +#endif + config_mountroot(self, &nouveau_pci_attach_real); }
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Mon May 21 08:58:47 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: disable drm2 on modern nouveau cards (Pascal-based). our older drm doesn't have any support for modern Pascal or the second version of Maxwell (but not disabled here yet) but the driver tries to attach on any nvidia gpu. this should workaround PR#53258, and other issues reported with modern nvidia chipsets. XXX: pullup-7, pullup-8. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.8 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.9 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.8 Tue Apr 19 06:57:37 2016 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Mon May 21 08:58:47 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.8 2016/04/19 06:57:37 mrg Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.9 2018/05/21 08:58:47 mrg Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.8 2016/04/19 06:57:37 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.9 2018/05/21 08:58:47 mrg Exp $"); #include #include @@ -91,6 +91,30 @@ nouveau_pci_match(device_t parent, cfdat if (PCI_CLASS(pa->pa_class) != PCI_CLASS_DISPLAY) return 0; +#define IS_BETWEEN(x,y) \ + (PCI_PRODUCT(pa->pa_id) >= (x) && PCI_PRODUCT(pa->pa_id) <= (y)) + + /* + * NetBSD drm2 doesn't support Pascal-based cards: + * 0x1580-0x15ff GP100 + * 0x1b00-0x1b7f GP102 + * 0x1b80-0x1bff GP104 + * 0x1c00-0x1c7f GP106 + * 0x1c80-0x1cff GP107 + * 0x1d00-0x1d7f GP108 + * 0x1d80-0x1dff GV100 + */ + + if (IS_BETWEEN(0x1580, 0x15ff) || + IS_BETWEEN(0x1b00, 0x1b7f) || + IS_BETWEEN(0x1b80, 0x1bff) || + IS_BETWEEN(0x1c00, 0x1c7f) || + IS_BETWEEN(0x1c80, 0x1cff) || + IS_BETWEEN(0x1d00, 0x1d7f) || + IS_BETWEEN(0x1d80, 0x1dff)) + return 0; +#undef IS_BETWEEN + return 6; /* XXX Beat genfb_pci... */ }
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Thu May 31 09:18:31 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: disable matching nouveau on pascal and the second generation of maxwell cards that are not supported by this version of drm. this should fix various modern systems vs nvidia issues, eg PR 53188. XXX: pullup-7, pullup-8. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.9 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.10 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.9 Mon May 21 08:58:47 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Thu May 31 09:18:31 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.9 2018/05/21 08:58:47 mrg Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.10 2018/05/31 09:18:31 mrg Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.9 2018/05/21 08:58:47 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.10 2018/05/31 09:18:31 mrg Exp $"); #include #include @@ -115,6 +115,36 @@ nouveau_pci_match(device_t parent, cfdat return 0; #undef IS_BETWEEN +#define IS_BETWEEN(x,y) \ + (PCI_PRODUCT(pa->pa_id) >= (x) && PCI_PRODUCT(pa->pa_id) <= (y)) + /* + * NetBSD drm2 needs missing-so-far firmware for Maxwell-based cards: + * 0x1380-0x13bf GM107 + */ + if (IS_BETWEEN(0x1380, 0x13bf)) + return 0; + + /* + * NetBSD drm2 doesn't support Pascal-based cards: + * 0x1580-0x15ff GP100 + * 0x1b00-0x1b7f GP102 + * 0x1b80-0x1bff GP104 + * 0x1c00-0x1c7f GP106 + * 0x1c80-0x1cff GP107 + * 0x1d00-0x1d7f GP108 + * 0x1d80-0x1dff GV100 + */ + + if (IS_BETWEEN(0x1580, 0x15ff) || + IS_BETWEEN(0x1b00, 0x1b7f) || + IS_BETWEEN(0x1b80, 0x1bff) || + IS_BETWEEN(0x1c00, 0x1c7f) || + IS_BETWEEN(0x1c80, 0x1cff) || + IS_BETWEEN(0x1d00, 0x1d7f) || + IS_BETWEEN(0x1d80, 0x1dff)) + return 0; +#undef IS_BETWEEN + return 6; /* XXX Beat genfb_pci... */ }
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Thu May 31 23:46:59 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: the previous change doubled the check for pascal. fix it so that we only check for later maxwell and pascal once each, as intended. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.10 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.11 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.10 Thu May 31 09:18:31 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Thu May 31 23:46:59 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.10 2018/05/31 09:18:31 mrg Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.11 2018/05/31 23:46:59 mrg Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.10 2018/05/31 09:18:31 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.11 2018/05/31 23:46:59 mrg Exp $"); #include #include @@ -93,30 +93,6 @@ nouveau_pci_match(device_t parent, cfdat #define IS_BETWEEN(x,y) \ (PCI_PRODUCT(pa->pa_id) >= (x) && PCI_PRODUCT(pa->pa_id) <= (y)) - - /* - * NetBSD drm2 doesn't support Pascal-based cards: - * 0x1580-0x15ff GP100 - * 0x1b00-0x1b7f GP102 - * 0x1b80-0x1bff GP104 - * 0x1c00-0x1c7f GP106 - * 0x1c80-0x1cff GP107 - * 0x1d00-0x1d7f GP108 - * 0x1d80-0x1dff GV100 - */ - - if (IS_BETWEEN(0x1580, 0x15ff) || - IS_BETWEEN(0x1b00, 0x1b7f) || - IS_BETWEEN(0x1b80, 0x1bff) || - IS_BETWEEN(0x1c00, 0x1c7f) || - IS_BETWEEN(0x1c80, 0x1cff) || - IS_BETWEEN(0x1d00, 0x1d7f) || - IS_BETWEEN(0x1d80, 0x1dff)) - return 0; -#undef IS_BETWEEN - -#define IS_BETWEEN(x,y) \ - (PCI_PRODUCT(pa->pa_id) >= (x) && PCI_PRODUCT(pa->pa_id) <= (y)) /* * NetBSD drm2 needs missing-so-far firmware for Maxwell-based cards: * 0x1380-0x13bf GM107
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: kre Date: Sun Jan 27 05:03:57 UTC 2019 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: Fix merge botch To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/external/bsd/drm2/nouveau/files.nouveau Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.24 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.25 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.24 Sun Jan 27 02:08:43 2019 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Sun Jan 27 05:03:57 2019 @@ -1,6 +1,4 @@ -# $NetBSD: files.nouveau,v 1.24 2019/01/27 02:08:43 pgoyette Exp $ - -version 20180827 +# $NetBSD: files.nouveau,v 1.25 2019/01/27 05:03:57 kre Exp $ version 20180827
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 16:04:32 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: Tag with nouveau, not just nouveau_pci, to get CWARNFLAGS.nouveau. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/external/bsd/drm2/nouveau/files.nouveau Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.19 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.20 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.19 Mon Aug 27 15:31:27 2018 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Mon Aug 27 16:04:32 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.19 2018/08/27 15:31:27 riastradh Exp $ +# $NetBSD: files.nouveau,v 1.20 2018/08/27 16:04:32 riastradh Exp $ define nouveaufbbus { } device nouveau: drmkms, drmkms_ttm, nouveaufbbus @@ -97,7 +97,7 @@ file external/bsd/drm2/dist/drm/nouveau/ file external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_acpi.c nouveau file external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_base.c nouveau file external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_ctrl.c nouveau -file external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_pci.c nouveau_pci +file external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_pci.c nouveau & nouveau_pci file external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_tegra.c nouveau file external/bsd/drm2/dist/drm/nouveau/nvkm/engine/device/nouveau_nvkm_engine_device_user.c nouveau file external/bsd/drm2/dist/drm/nouveau/nvkm/engine/disp/nouveau_nvkm_engine_disp_base.c nouveau
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Tue Aug 28 03:34:07 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_module.c nouveau_pci.c Log Message: Move nouveau pci initialization to nouveau_pci where it belongs. Somehow I forgot this was a separate module. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/external/bsd/drm2/nouveau/nouveau_module.c cvs rdiff -u -r1.20 -r1.21 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_module.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.8 src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.9 --- src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.8 Mon Aug 27 15:31:27 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_module.c Tue Aug 28 03:34:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_module.c,v 1.8 2018/08/27 15:31:27 riastradh Exp $ */ +/* $NetBSD: nouveau_module.c,v 1.9 2018/08/28 03:34:07 riastradh Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_module.c,v 1.8 2018/08/27 15:31:27 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_module.c,v 1.9 2018/08/28 03:34:07 riastradh Exp $"); #include #include @@ -41,10 +41,6 @@ __KERNEL_RCSID(0, "$NetBSD: nouveau_modu #include -#ifdef _KERNEL_OPT -#include "opt_drmkms_pci.h" -#endif - MODULE(MODULE_CLASS_DRIVER, nouveau, "drmkms"); /* XXX drmkms_i2c, drmkms_ttm */ #ifdef _MODULE @@ -53,26 +49,9 @@ MODULE(MODULE_CLASS_DRIVER, nouveau, "dr struct drm_sysctl_def nouveau_def = DRM_SYSCTL_INIT(); -#if NDRMKMS_PCI > 0 -extern struct drm_driver *const nouveau_drm_driver_stub; /* XXX */ -extern struct drm_driver *const nouveau_drm_driver_pci; /* XXX */ -#endif - static int nouveau_init(void) { -#if NDRMKMS_PCI > 0 - int error; - - *nouveau_drm_driver_pci = *nouveau_drm_driver_stub; - nouveau_drm_driver_pci->set_busid = drm_pci_set_busid; - nouveau_drm_driver_pci->request_irq = drm_pci_request_irq; - nouveau_drm_driver_pci->free_irq = drm_pci_free_irq; - - error = drm_pci_init(nouveau_drm_driver_pci, NULL); - if (error) - return error; -#endif nvkm_devices_init(); drm_sysctl_init(&nouveau_def); @@ -86,9 +65,6 @@ nouveau_fini(void) drm_sysctl_fini(&nouveau_def); nvkm_devices_fini(); -#if NDRMKMS_PCI > 0 - drm_pci_exit(nouveau_drm_driver_pci, NULL); -#endif } static int Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.20 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.21 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.20 Mon Aug 27 14:18:54 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Tue Aug 28 03:34:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.20 2018/08/27 14:18:54 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.21 2018/08/28 03:34:07 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.20 2018/08/27 14:18:54 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.21 2018/08/28 03:34:07 riastradh Exp $"); #include #include @@ -286,19 +286,19 @@ nouveau_pci_task_schedule(device_t self, } } +extern struct drm_driver *const nouveau_drm_driver_stub; /* XXX */ +extern struct drm_driver *const nouveau_drm_driver_pci; /* XXX */ + static int nouveau_pci_modcmd(modcmd_t cmd, void *arg __unused) { - int error; switch (cmd) { case MODULE_CMD_INIT: - error = drm_pci_init(nouveau_drm_driver_pci, NULL); - if (error) { - aprint_error("nouveau_pci: failed to init: %d\n", - error); - return error; - } + *nouveau_drm_driver_pci = *nouveau_drm_driver_stub; + nouveau_drm_driver_pci->set_busid = drm_pci_set_busid; + nouveau_drm_driver_pci->request_irq = drm_pci_request_irq; + nouveau_drm_driver_pci->free_irq = drm_pci_free_irq; #if 0 /* XXX nouveau acpi */ nouveau_register_dsm_handler(); #endif @@ -307,7 +307,6 @@ nouveau_pci_modcmd(modcmd_t cmd, void *a #if 0 /* XXX nouveau acpi */ nouveau_unregister_dsm_handler(); #endif - drm_pci_exit(nouveau_drm_driver_pci, NULL); break; default: return ENOTTY;
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: christos Date: Fri Oct 12 01:16:20 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: nouveau_nv50_display.c and nouveau_nvif_client.c have variable structures not at the end of a structure. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/external/bsd/drm2/nouveau/files.nouveau Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.21 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.22 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.21 Mon Aug 27 12:06:01 2018 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Thu Oct 11 21:16:20 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.21 2018/08/27 16:06:01 riastradh Exp $ +# $NetBSD: files.nouveau,v 1.22 2018/10/12 01:16:20 christos Exp $ version 20180827 @@ -27,6 +27,7 @@ makeoptions nouveau CPPFLAGS+="-DCONFIG_ makeoptions nouveau "CWARNFLAGS.nouveau"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau"+="-Wno-shadow" +makeoptions nouveau "CWARNFLAGS.clang"+="-Wno-gnu-variable-sized-type-not-at-end" file external/bsd/drm2/nouveau/nouveau_module.c nouveau
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Sun Oct 14 17:25:22 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: Limit warning suppression to nouveau files. Make this match what I have in my drmkms update. Please don't touch files under sys/external/bsd/drm2 without consulting me while I'm updating drmkms! To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/external/bsd/drm2/nouveau/files.nouveau Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.22 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.23 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.22 Fri Oct 12 01:16:20 2018 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Sun Oct 14 17:25:21 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.22 2018/10/12 01:16:20 christos Exp $ +# $NetBSD: files.nouveau,v 1.23 2018/10/14 17:25:21 riastradh Exp $ version 20180827 @@ -27,7 +27,7 @@ makeoptions nouveau CPPFLAGS+="-DCONFIG_ makeoptions nouveau "CWARNFLAGS.nouveau"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau"+="-Wno-shadow" -makeoptions nouveau "CWARNFLAGS.clang"+="-Wno-gnu-variable-sized-type-not-at-end" +makeoptions nouveau "CWARNFLAGS.nouveau"+="${${ACTIVE_CC} == clang:? -Wno-error=gnu-variable-sized-type-not-at-end :}" file external/bsd/drm2/nouveau/nouveau_module.c nouveau
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Mon Dec 24 08:26:04 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: this works well enough to start and have basic accel only on GTX 750, so enable those cards. maybe can enable some pascal cards too. thanks to fly for fixing nouveau drm2 so it was worth trying :-) To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.21 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.22 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.21 Tue Aug 28 03:34:07 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Mon Dec 24 08:26:04 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.21 2018/08/28 03:34:07 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.22 2018/12/24 08:26:04 mrg Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.21 2018/08/28 03:34:07 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.22 2018/12/24 08:26:04 mrg Exp $"); #include #include @@ -98,13 +98,6 @@ nouveau_pci_match(device_t parent, cfdat #define IS_BETWEEN(x,y) \ (PCI_PRODUCT(pa->pa_id) >= (x) && PCI_PRODUCT(pa->pa_id) <= (y)) /* - * NetBSD drm2 needs missing-so-far firmware for Maxwell-based cards: - * 0x1380-0x13bf GM107 - */ - if (IS_BETWEEN(0x1380, 0x13bf)) - return 0; - - /* * NetBSD drm2 doesn't support Pascal-based cards: * 0x1580-0x15ff GP100 * 0x1b00-0x1b7f GP102
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Mon Dec 24 08:40:33 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: don't attach to new turing based nouveau cards. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.22 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.23 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.22 Mon Dec 24 08:26:04 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Mon Dec 24 08:40:33 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.22 2018/12/24 08:26:04 mrg Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.23 2018/12/24 08:40:33 mrg Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.22 2018/12/24 08:26:04 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.23 2018/12/24 08:40:33 mrg Exp $"); #include #include @@ -98,7 +98,7 @@ nouveau_pci_match(device_t parent, cfdat #define IS_BETWEEN(x,y) \ (PCI_PRODUCT(pa->pa_id) >= (x) && PCI_PRODUCT(pa->pa_id) <= (y)) /* - * NetBSD drm2 doesn't support Pascal-based cards: + * NetBSD drm2 doesn't support Pascal, Volta or Turing based cards: * 0x1580-0x15ff GP100 * 0x1b00-0x1b7f GP102 * 0x1b80-0x1bff GP104 @@ -106,6 +106,9 @@ nouveau_pci_match(device_t parent, cfdat * 0x1c80-0x1cff GP107 * 0x1d00-0x1d7f GP108 * 0x1d80-0x1dff GV100 + * 0x1e00-0x1e7f TU102 + * 0x1e80-0x1eff TU104 + * 0x1f00-0x1f7f TU106 */ if (IS_BETWEEN(0x1580, 0x15ff) || @@ -114,7 +117,10 @@ nouveau_pci_match(device_t parent, cfdat IS_BETWEEN(0x1c00, 0x1c7f) || IS_BETWEEN(0x1c80, 0x1cff) || IS_BETWEEN(0x1d00, 0x1d7f) || - IS_BETWEEN(0x1d80, 0x1dff)) + IS_BETWEEN(0x1d80, 0x1dff) || + IS_BETWEEN(0x1e00, 0x1e7f) || + IS_BETWEEN(0x1e80, 0x1eff) || + IS_BETWEEN(0x1f00, 0x1f7f)) return 0; #undef IS_BETWEEN
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 00:46:10 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau2netbsd Log Message: Makefile got moved to Kbuild. Make sure variables expand. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/nouveau/nouveau2netbsd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau2netbsd diff -u src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.3 src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.4 --- src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.3 Mon Aug 27 00:46:04 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau2netbsd Mon Aug 27 00:46:10 2018 @@ -1,6 +1,6 @@ #!/bin/sh -# $NetBSD: nouveau2netbsd,v 1.3 2018/08/27 00:46:04 riastradh Exp $ +# $NetBSD: nouveau2netbsd,v 1.4 2018/08/27 00:46:10 riastradh Exp $ # # $ /path/to/nouveau2netbsd > /path/to/files.nouveau.new # @@ -30,11 +30,11 @@ trap clean EXIT HUP INT TERM filemap="$(mktemp -t ${0##*/})" -cat Makefile\ +cat Kbuild\ | sed -e 's,^include \(.*\)$,.include "\1",'\ | sed -e 's,^ifdef \(.*\)$,.if !empty(\1:M[yY][eE][sS]),' \ | sed -e 's,^endif$,.endif,' \ -| make -f /dev/stdin -V nouveau-y src=. \ +| make -f /dev/stdin -V '$(nouveau-y)' src=.\ | tr ' ' '\n'\ | sed -e 's,^$,,' \ | sort -u\
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 00:46:04 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau2netbsd Log Message: Allow caller to specify mv so I can stage this in git. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/external/bsd/drm2/nouveau/nouveau2netbsd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau2netbsd diff -u src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.2 src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.3 --- src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.2 Tue Aug 5 19:49:13 2014 +++ src/sys/external/bsd/drm2/nouveau/nouveau2netbsd Mon Aug 27 00:46:04 2018 @@ -1,6 +1,6 @@ #!/bin/sh -# $NetBSD: nouveau2netbsd,v 1.2 2014/08/05 19:49:13 riastradh Exp $ +# $NetBSD: nouveau2netbsd,v 1.3 2018/08/27 00:46:04 riastradh Exp $ # # $ /path/to/nouveau2netbsd > /path/to/files.nouveau.new # @@ -12,6 +12,8 @@ set -Ceu +: ${MV:=mv} + # Location of the Nouveau sources relative to $NETBSDSRCDIR. nouveau_top=external/bsd/drm2/dist/drm/nouveau @@ -78,7 +80,7 @@ cat Makefile\ while read from to; do if [ "x$from" != "x$to" ]; then - mv -f -- "$from" "$to" + ${MV} -f -- "$from" "$to" fi # Probably not necessary -- Linux tends not to have RCS ids -- # but a precaution out of paranoia.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 05:35:43 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: Replace nouveau per-file warning options by nouveau-wide options. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/external/bsd/drm2/nouveau/files.nouveau Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.14 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.15 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.14 Thu Feb 11 04:43:32 2016 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Mon Aug 27 05:35:42 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.14 2016/02/11 04:43:32 riastradh Exp $ +# $NetBSD: files.nouveau,v 1.15 2018/08/27 05:35:42 riastradh Exp $ define nouveaufbbus { } device nouveau: drmkms, drmkms_ttm, nouveaufbbus @@ -22,242 +22,8 @@ makeoptions nouveau CPPFLAGS+="-I$S/exte makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG=5" makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG_DEFAULT=3" -# XXX If you find a way to apply the warning flags to all Nouveau -# sources, please apply it here and remove this stupidly gigantic list! -makeoptions nouveau "CWARNFLAGS.nouveau_agp.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_bios.c"+="-Wno-shadow" -makeoptions nouveau "CWARNFLAGS.nouveau_bo.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_connector.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_core_client.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_core_gpuobj.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_core_ramht.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_display.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_dispnv04_dfp.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_dispnv04_tvnv04.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_bsp_nv84.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_bsp_nv98.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_dispnv04_tvmodesnv17.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_bsp_nvc0.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_bsp_nve0.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_copy_nva3.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_copy_nvc0.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_copy_nve0.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_crypt_nv84.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_crypt_nv98.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_device_base.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_device_ctrl.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_disp_gm107.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_disp_nv04.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_disp_nv50.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_disp_nv84.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_disp_nv94.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_disp_nva0.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_disp_nva3.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_disp_nvd0.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_disp_nve0.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_disp_nvf0.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_dmaobj_base.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_dmaobj_nv04.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_dmaobj_nv50.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_dmaobj_nvc0.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_dmaobj_nvd0.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_fifo_gk20a.c"+="-Wno-missing-field-initializers" -makeoptions nouveau "CWARNFLAGS.nouveau_engine_fifo_nv0
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 05:45:14 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: regen files.nouveau To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/external/bsd/drm2/nouveau/files.nouveau Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.15 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.16 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.15 Mon Aug 27 05:35:42 2018 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Mon Aug 27 05:45:14 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.15 2018/08/27 05:35:42 riastradh Exp $ +# $NetBSD: files.nouveau,v 1.16 2018/08/27 05:45:14 riastradh Exp $ define nouveaufbbus { } device nouveau: drmkms, drmkms_ttm, nouveaufbbus @@ -28,305 +28,6 @@ makeoptions nouveau "CWARNFLAGS.nouveau" file external/bsd/drm2/nouveau/nouveau_module.c nouveau # Generated from nouveau2netbsd. -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_client.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_engctx.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_engine.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_enum.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_event.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_gpuobj.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_handle.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_mm.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_namedb.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_object.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_option.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_parent.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_printk.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_ramht.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_subdev.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/bsp/nouveau_engine_bsp_nv84.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/bsp/nouveau_engine_bsp_nv98.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/bsp/nouveau_engine_bsp_nvc0.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/bsp/nouveau_engine_bsp_nve0.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/copy/nouveau_engine_copy_nva3.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/copy/nouveau_engine_copy_nvc0.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/copy/nouveau_engine_copy_nve0.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/crypt/nouveau_engine_crypt_nv84.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/crypt/nouveau_engine_crypt_nv98.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_ctrl.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_gm100.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nv04.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nv10.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nv20.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nv30.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nv40.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nv50.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nvc0.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nve0.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_base.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_dacnv50.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_dport.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_gm107.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_hdanva3.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_hdanvd0.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_hdminv84.c nouveau -file external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engin
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 06:35:09 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: Teach nouveau to read its own header files. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/external/bsd/drm2/nouveau/files.nouveau Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.16 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.17 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.16 Mon Aug 27 05:45:14 2018 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Mon Aug 27 06:35:09 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.16 2018/08/27 05:45:14 riastradh Exp $ +# $NetBSD: files.nouveau,v 1.17 2018/08/27 06:35:09 riastradh Exp $ define nouveaufbbus { } device nouveau: drmkms, drmkms_ttm, nouveaufbbus @@ -15,8 +15,9 @@ file external/bsd/drm2/nouveau/nouveau_v file external/bsd/drm2/nouveau/nouveaufb.c nouveaufb makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau" -makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/core" -makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/core/include" +makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/include" +makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/include/nvkm" +makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/nvkm" makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/nouveau" makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG=5"
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 06:41:36 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: engine/device.h -> core/device.h, nouveau -> nvkm To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.11 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.12 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.11 Thu May 31 23:46:59 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Mon Aug 27 06:41:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.11 2018/05/31 23:46:59 mrg Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.12 2018/08/27 06:41:35 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.11 2018/05/31 23:46:59 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.12 2018/08/27 06:41:35 riastradh Exp $"); #include #include @@ -40,7 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: nouveau_pci. #include -#include +#include #include "nouveau_drm.h" #include "nouveau_pci.h" @@ -61,7 +61,7 @@ struct nouveau_pci_softc { } sc_task_u; struct drm_device *sc_drm_dev; struct pci_dev sc_pci_dev; - struct nouveau_device *sc_nv_dev; + struct nvkm_device *sc_nv_dev; }; static int nouveau_pci_match(device_t, cfdata_t, void *); @@ -149,8 +149,8 @@ nouveau_pci_attach(device_t parent, devi devname = (uint64_t)device_unit(device_parent(self)) << 32; devname |= pa->pa_bus << 16; /* XXX errno Linux->NetBSD */ - error = -nouveau_device_create(&sc->sc_pci_dev, NOUVEAU_BUS_PCI, - devname, device_xname(self), nouveau_config, nouveau_debug, + error = -nvkm_device_pci_new(&sc->sc_pci_dev, + nouveau_config, nouveau_debug, true, true, ~0ULL, &sc->sc_nv_dev); if (error) { aprint_error_dev(self, "unable to create nouveau device: %d\n",
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 06:41:25 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_module.c Log Message: nouveau_objects_init is no more. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/external/bsd/drm2/nouveau/nouveau_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_module.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.4 src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.5 --- src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.4 Sat Oct 17 12:02:44 2015 +++ src/sys/external/bsd/drm2/nouveau/nouveau_module.c Mon Aug 27 06:41:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_module.c,v 1.4 2015/10/17 12:02:44 jmcneill Exp $ */ +/* $NetBSD: nouveau_module.c,v 1.5 2018/08/27 06:41:25 riastradh Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_module.c,v 1.4 2015/10/17 12:02:44 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_module.c,v 1.5 2018/08/27 06:41:25 riastradh Exp $"); #include #include @@ -39,8 +39,7 @@ __KERNEL_RCSID(0, "$NetBSD: nouveau_modu #include #include -#include -#include +#include MODULE(MODULE_CLASS_DRIVER, nouveau, "drmkms"); /* XXX drmkms_i2c, drmkms_ttm */ @@ -55,7 +54,6 @@ extern struct drm_driver *const nouveau_ static int nouveau_init(void) { - nouveau_objects_init(); nouveau_devices_init(); drm_sysctl_init(&nouveau_def); @@ -68,7 +66,6 @@ nouveau_fini(void) drm_sysctl_fini(&nouveau_def); nouveau_devices_fini(); - nouveau_objects_fini(); } static int
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 07:35:42 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: Update object reference API, now with types! To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.12 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.13 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.12 Mon Aug 27 06:41:35 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Mon Aug 27 07:35:41 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.12 2018/08/27 06:41:35 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.13 2018/08/27 07:35:41 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.12 2018/08/27 06:41:35 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.13 2018/08/27 07:35:41 riastradh Exp $"); #include #include @@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: nouveau_pci. #include #include +#include #include "nouveau_drm.h" #include "nouveau_pci.h" @@ -215,7 +216,7 @@ nouveau_pci_detach(device_t self, int fl return error; sc->sc_drm_dev = NULL; -out1: nouveau_object_ref(NULL, (void *)&sc->sc_nv_dev); +out1: nvkm_device_del(&sc->sc_nv_dev); out0: pmf_device_deregister(self); return 0; }
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 07:56:25 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: The PCI driver is now named as such. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.13 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.14 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.13 Mon Aug 27 07:35:41 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Mon Aug 27 07:56:25 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.13 2018/08/27 07:35:41 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.14 2018/08/27 07:56:25 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.13 2018/08/27 07:35:41 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.14 2018/08/27 07:56:25 riastradh Exp $"); #include #include @@ -78,7 +78,7 @@ CFATTACH_DECL_NEW(nouveau_pci, sizeof(st nouveau_pci_match, nouveau_pci_attach, nouveau_pci_detach, NULL); /* Kludge to get this from nouveau_drm.c. */ -extern struct drm_driver *const nouveau_drm_driver; +extern struct drm_driver *const nouveau_drm_driver_pci; static int nouveau_pci_match(device_t parent, cfdata_t match, void *aux) @@ -160,8 +160,8 @@ nouveau_pci_attach(device_t parent, devi } /* XXX errno Linux->NetBSD */ - error = -drm_pci_attach(self, pa, &sc->sc_pci_dev, nouveau_drm_driver, - 0, &sc->sc_drm_dev); + error = -drm_pci_attach(self, pa, &sc->sc_pci_dev, + nouveau_drm_driver_pci, 0, &sc->sc_drm_dev); if (error) { aprint_error_dev(self, "unable to attach drm: %d\n", error); return; @@ -279,7 +279,7 @@ nouveau_pci_modcmd(modcmd_t cmd, void *a switch (cmd) { case MODULE_CMD_INIT: - error = drm_pci_init(nouveau_drm_driver, NULL); + error = drm_pci_init(nouveau_drm_driver_pci, NULL); if (error) { aprint_error("nouveau_pci: failed to init: %d\n", error); @@ -293,7 +293,7 @@ nouveau_pci_modcmd(modcmd_t cmd, void *a #if 0 /* XXX nouveau acpi */ nouveau_unregister_dsm_handler(); #endif - drm_pci_exit(nouveau_drm_driver, NULL); + drm_pci_exit(nouveau_drm_driver_pci, NULL); break; default: return ENOTTY;
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 13:39:07 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: Nix vestigial temporary. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.14 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.15 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.14 Mon Aug 27 07:56:25 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Mon Aug 27 13:39:07 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.14 2018/08/27 07:56:25 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.15 2018/08/27 13:39:07 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.14 2018/08/27 07:56:25 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.15 2018/08/27 13:39:07 riastradh Exp $"); #include #include @@ -133,7 +133,6 @@ nouveau_pci_attach(device_t parent, devi { struct nouveau_pci_softc *const sc = device_private(self); const struct pci_attach_args *const pa = aux; - uint64_t devname; int error; pci_aprint_devinfo(pa, NULL); @@ -147,8 +146,6 @@ nouveau_pci_attach(device_t parent, devi sc->sc_task_state = NOUVEAU_TASK_ATTACH; SIMPLEQ_INIT(&sc->sc_task_u.attach); - devname = (uint64_t)device_unit(device_parent(self)) << 32; - devname |= pa->pa_bus << 16; /* XXX errno Linux->NetBSD */ error = -nvkm_device_pci_new(&sc->sc_pci_dev, nouveau_config, nouveau_debug, true, true, ~0ULL,
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 14:12:30 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: Let upstream code attempt match for nouveau. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.18 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.19 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.18 Mon Aug 27 14:12:14 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Mon Aug 27 14:12:29 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.18 2018/08/27 14:12:14 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.19 2018/08/27 14:12:29 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.18 2018/08/27 14:12:14 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.19 2018/08/27 14:12:29 riastradh Exp $"); #include #include @@ -84,6 +84,9 @@ static int nouveau_pci_match(device_t parent, cfdata_t match, void *aux) { const struct pci_attach_args *const pa = aux; + struct pci_dev pdev; + struct nvkm_device *device; + int ret; if (PCI_VENDOR(pa->pa_id) != PCI_VENDOR_NVIDIA && PCI_VENDOR(pa->pa_id) != PCI_VENDOR_NVIDIA_SGS) @@ -122,6 +125,15 @@ nouveau_pci_match(device_t parent, cfdat return 0; #undef IS_BETWEEN + linux_pci_dev_init(&pdev, NULL, parent, pa, 0); + ret = nvkm_device_pci_new(&pdev, NULL, "error", true, false, 0, + &device); + if (ret == 0) /* don't want to hang onto it */ + nvkm_device_del(&device); + linux_pci_dev_destroy(&pdev); + if (ret) /* failure */ + return 0; + return 6; /* XXX Beat genfb_pci... */ }
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 14:17:21 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_module.c Log Message: Hook up the nouveau pci driver so it does anything. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/external/bsd/drm2/nouveau/nouveau_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_module.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.6 src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.7 --- src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.6 Mon Aug 27 13:43:52 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_module.c Mon Aug 27 14:17:21 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_module.c,v 1.6 2018/08/27 13:43:52 riastradh Exp $ */ +/* $NetBSD: nouveau_module.c,v 1.7 2018/08/27 14:17:21 riastradh Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_module.c,v 1.6 2018/08/27 13:43:52 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_module.c,v 1.7 2018/08/27 14:17:21 riastradh Exp $"); #include #include @@ -49,11 +49,23 @@ MODULE(MODULE_CLASS_DRIVER, nouveau, "dr struct drm_sysctl_def nouveau_def = DRM_SYSCTL_INIT(); -extern struct drm_driver *const nouveau_drm_driver; /* XXX */ +extern struct drm_driver *const nouveau_drm_driver_stub; /* XXX */ +extern struct drm_driver *const nouveau_drm_driver_pci; /* XXX */ static int nouveau_init(void) { + int error; + + *nouveau_drm_driver_pci = *nouveau_drm_driver_stub; + nouveau_drm_driver_pci->set_busid = drm_pci_set_busid; + nouveau_drm_driver_pci->request_irq = drm_pci_request_irq; + nouveau_drm_driver_pci->free_irq = drm_pci_free_irq; + + error = drm_pci_init(nouveau_drm_driver_pci, NULL); + if (error) + return error; + nvkm_devices_init(); drm_sysctl_init(&nouveau_def); @@ -66,6 +78,7 @@ nouveau_fini(void) drm_sysctl_fini(&nouveau_def); nvkm_devices_fini(); + drm_pci_exit(nouveau_drm_driver_pci, NULL); } static int
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 27 14:18:54 UTC 2018 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: Clarify nvkm_device_pci_create arguments. Use bogus parent for match prints. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.19 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.20 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.19 Mon Aug 27 14:12:29 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Mon Aug 27 14:18:54 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.19 2018/08/27 14:12:29 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.20 2018/08/27 14:18:54 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.19 2018/08/27 14:12:29 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.20 2018/08/27 14:18:54 riastradh Exp $"); #include #include @@ -125,9 +125,9 @@ nouveau_pci_match(device_t parent, cfdat return 0; #undef IS_BETWEEN - linux_pci_dev_init(&pdev, NULL, parent, pa, 0); - ret = nvkm_device_pci_new(&pdev, NULL, "error", true, false, 0, - &device); + linux_pci_dev_init(&pdev, parent /* XXX bogus */, parent, pa, 0); + ret = nvkm_device_pci_new(&pdev, NULL, "error", + /* detect */ true, /* mmio */ false, /* subdev_mask */ 0, &device); if (ret == 0) /* don't want to hang onto it */ nvkm_device_del(&device); linux_pci_dev_destroy(&pdev); @@ -163,7 +163,8 @@ nouveau_pci_attach(device_t parent, devi /* XXX errno Linux->NetBSD */ error = -nvkm_device_pci_new(&sc->sc_pci_dev, - nouveau_config, nouveau_debug, true, true, ~0ULL, + nouveau_config, nouveau_debug, + /* detect */ true, /* mmio */ true, /* subdev_mask */ ~0ULL, &sc->sc_nv_dev); if (error) { aprint_error_dev(self, "unable to create nouveau device: %d\n",
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: joerg Date: Fri Jan 29 22:49:06 UTC 2016 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: Restrict -Wno-unused-but-set-variable to gcc. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/external/bsd/drm2/nouveau/files.nouveau Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.12 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.13 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.12 Thu Oct 22 23:16:23 2015 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Fri Jan 29 22:49:06 2016 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.12 2015/10/22 23:16:23 jmcneill Exp $ +# $NetBSD: files.nouveau,v 1.13 2016/01/29 22:49:06 joerg Exp $ define nouveaufbbus { } device nouveau: drmkms, drmkms_ttm, nouveaufbbus @@ -129,7 +129,7 @@ makeoptions nouveau "CWARNFLAGS.nouveau_ makeoptions nouveau "CWARNFLAGS.nouveau_engine_vp_nvc0.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_vp_nve0.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_nv50_fence.c"+="-Wno-shadow" -makeoptions nouveau "CWARNFLAGS.nouveau_nv50_display.c"+="-Wno-unused-but-set-variable" +makeoptions nouveau "CWARNFLAGS.nouveau_nv50_display.c"+="${${ACTIVE_CC} == gcc:? -Wno-unused-but-set-variable :}" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_bar_base.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_bar_nv50.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_bar_nvc0.c"+="-Wno-missing-field-initializers"
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Thu Feb 11 04:43:32 UTC 2016 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: Set nouveau to a more reasonable debug level. Match the compile-time and default run-time settings in Linux. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/external/bsd/drm2/nouveau/files.nouveau Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.13 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.14 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.13 Fri Jan 29 22:49:06 2016 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Thu Feb 11 04:43:32 2016 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.13 2016/01/29 22:49:06 joerg Exp $ +# $NetBSD: files.nouveau,v 1.14 2016/02/11 04:43:32 riastradh Exp $ define nouveaufbbus { } device nouveau: drmkms, drmkms_ttm, nouveaufbbus @@ -19,9 +19,8 @@ makeoptions nouveau CPPFLAGS+="-I$S/exte makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/core/include" makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/nouveau" -# XXX DEBUG ALL THE BUGS! -makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG=1000" -makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG_DEFAULT=6" +makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG=5" +makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG_DEFAULT=3" # XXX If you find a way to apply the warning flags to all Nouveau # sources, please apply it here and remove this stupidly gigantic list!
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Wed Dec 3 22:59:22 UTC 2014 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: nouveau_nv50_fence.c needs -Wno-shadow. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/external/bsd/drm2/nouveau/files.nouveau Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u src/sys/external/bsd/drm2/nouveau/files.nouveau:1.3 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.4 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.3 Sat Aug 23 08:03:34 2014 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Wed Dec 3 22:59:22 2014 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.3 2014/08/23 08:03:34 riastradh Exp $ +# $NetBSD: files.nouveau,v 1.4 2014/12/03 22:59:22 riastradh Exp $ device nouveau: drmkms, drmkms_pci, drmkms_ttm, genfb, wsemuldisplaydev attach nouveau at pci @@ -111,6 +111,7 @@ makeoptions nouveau "CWARNFLAGS.nouveau_ makeoptions nouveau "CWARNFLAGS.nouveau_engine_vp_nv98.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_vp_nvc0.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_engine_vp_nve0.c"+="-Wno-missing-field-initializers" +makeoptions nouveau "CWARNFLAGS.nouveau_nv50_fence.c"+="-Wno-shadow" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_bar_base.c"+="-Wno-missing-field-initializers" makeoptions nouveau "CWARNFLAGS.nouveau_subdev_bar_nvc0.c"+="-Wno-missing-field-initializers"
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Tue Aug 5 17:39:07 UTC 2014 Added Files: src/sys/external/bsd/drm2/nouveau: nouveau2netbsd Log Message: Add kludgey nouveau2netbsd script in preparation for re-import. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/drm2/nouveau/nouveau2netbsd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/external/bsd/drm2/nouveau/nouveau2netbsd diff -u /dev/null src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.1 --- /dev/null Tue Aug 5 17:39:07 2014 +++ src/sys/external/bsd/drm2/nouveau/nouveau2netbsd Tue Aug 5 17:39:07 2014 @@ -0,0 +1,112 @@ +#!/bin/sh + +# $NetBSD: nouveau2netbsd,v 1.1 2014/08/05 17:39:07 riastradh Exp $ +# +# $ /path/to/nouveau2netbsd > /path/to/files.nouveau.new +# +# Run from the top-level Nouveau source directory. This stupid kludge +# reinterprets the GNU makefile as a BSD makefile to extract the source +# file names, renames the ones that have obscure and/or colliding +# basenames to be less obscure and unlikely (though not guaranteed) to +# collide, and spits out config(5) directives for all of them. + +set -Ceu + +# Location of the Nouveau sources relative to $NETBSDSRCDIR. +nouveau_top=external/bsd/drm2/dist/drm/nouveau + +# config(5) flag for the Nouveau driver. +nouveau_flag=nouveau + +filemap= + +clean () +{ + [ -z "$filemap" ] || rm -f -- "$filemap" || : +} +trap clean EXIT HUP INT TERM + +filemap="$(mktemp -t ${0##*/})" + +cat Makefile\ +| sed -e 's,^include \(.*\)$,.include "\1",'\ +| sed -e 's,^ifdef \(.*\)$,.if !empty(\1:M[yY][eE][sS]),' \ +| sed -e 's,^endif$,.endif,' \ +| make -f /dev/stdin -V nouveau-y src=. \ +| tr ' ' '\n'\ +| sed -e 's,^$,,' \ +| sort -u\ +| sed -e 's,\.o$,.c,' \ +| awk ' + BEGIN { + duplicates = 0 + } + $1 ~ "nouveau_[^/]*$" { + if (seen[$1]) + printf("Duplicate basename: %s\n", $1) + seen[$1] = $1 + printf("%s %s\n", $1, $1) + next + } + { + if (index($1, "/")) { + dir = $1 + sub("/[^/]*$", "/", dir) + } else { + dir = "" + } + base = $1 + sub("^core/", "", base) + gsub("/", "_", base) + if (seen[base]) { + printf("Duplicate basename: %s %s\n", seen[base], $1) \ + > "/dev/stderr" + duplicates = 1 + } + if (duplicates) + next + seen[base] = $1 + printf("%s %s\n", $1, dir "nouveau_" base) + } + END { + if (duplicates) { + printf("Time to rewite me!\n") > "/dev/stderr" + exit 1 + } + } +' >> "$filemap" + +while read from to; do + if [ "x$from" != "x$to" ]; then + mv -f -- "$from" "$to" + fi +# Probably not necessary -- Linux tends not to have RCS ids -- +# but a precaution out of paranoia. +cleantags "$to" + case $to in + *.c) + awk ' + BEGIN { +done = 0 +printf("/*\t%c%s%c\t*/\n\n", "$","NetBSD","$") + } + /^#include/ && !done { +printf("#include \n") +printf("__KERNEL_RCSID(0, \"%c%s%c\");\n", +"$","NetBSD","$") +printf("\n") +done = 1 + } + { +print + } + ' < "$to" > "$to".tmp + ;; + esac + mv -f -- "$to".tmp "$to" + printf 'file\t%s\t%s\n' "$nouveau_top/$to" "$nouveau_flag" +done < "$filemap" | sort + +# We sort the output again at the end because we renamed some files but +# left $TOP/nouveau_* unchanged, so their sort order relative to the +# ones that got renamed may have changed.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Tue Aug 5 19:49:13 UTC 2014 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau2netbsd Log Message: Tweak heuristic for placing __KERNEL_RCSID in nouveau2netbsd. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/nouveau/nouveau2netbsd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau2netbsd diff -u src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.1 src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.2 --- src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.1 Tue Aug 5 17:39:07 2014 +++ src/sys/external/bsd/drm2/nouveau/nouveau2netbsd Tue Aug 5 19:49:13 2014 @@ -1,6 +1,6 @@ #!/bin/sh -# $NetBSD: nouveau2netbsd,v 1.1 2014/08/05 17:39:07 riastradh Exp $ +# $NetBSD: nouveau2netbsd,v 1.2 2014/08/05 19:49:13 riastradh Exp $ # # $ /path/to/nouveau2netbsd > /path/to/files.nouveau.new # @@ -85,12 +85,17 @@ while read from to; do cleantags "$to" case $to in *.c) + # Heuristically apply NetBSD RCS ids: a comment at the + # top of the file, and a __KERNEL_RCSID before the + # first cpp line, which, with any luck, should be the + # first non-comment line and lie between the copyright + # notice and the header. awk ' BEGIN { done = 0 printf("/*\t%c%s%c\t*/\n\n", "$","NetBSD","$") } - /^#include/ && !done { + /^#/ && !done { printf("#include \n") printf("__KERNEL_RCSID(0, \"%c%s%c\");\n", "$","NetBSD","$")
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Wed Aug 6 13:36:08 UTC 2014 Added Files: src/sys/external/bsd/drm2/nouveau: files.nouveau nouveau_module.c Log Message: Add local support files for nouveau. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/drm2/nouveau/files.nouveau \ src/sys/external/bsd/drm2/nouveau/nouveau_module.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/external/bsd/drm2/nouveau/files.nouveau diff -u /dev/null src/sys/external/bsd/drm2/nouveau/files.nouveau:1.1 --- /dev/null Wed Aug 6 13:36:08 2014 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Wed Aug 6 13:36:07 2014 @@ -0,0 +1,352 @@ +# $NetBSD: files.nouveau,v 1.1 2014/08/06 13:36:07 riastradh Exp $ + +device nouveau: drmkms, drmkms_pci, drmkms_ttm, genfb, wsemuldisplaydev +attach nouveau at pci + +makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau" +makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/core" +makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/core/include" + +# XXX DEBUG ALL THE BUGS! +makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG=1000" +makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG_DEFAULT=6" + +makeoptions nouveau "CWARNFLAGS.nouveau_core_client.c"+="-Wno-missing-field-initializers" +makeoptions nouveau "CWARNFLAGS.nouveau_core_gpuobj.c"+="-Wno-missing-field-initializers" + +file external/bsd/drm2/nouveau/nouveau_module.c nouveau + +# Generated from nouveau2netbsd. +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_client.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_engctx.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_engine.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_enum.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_event.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_gpuobj.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_handle.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_mm.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_namedb.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_object.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_option.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_parent.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_printk.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_ramht.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/core/nouveau_core_subdev.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/bsp/nouveau_engine_bsp_nv84.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/bsp/nouveau_engine_bsp_nv98.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/bsp/nouveau_engine_bsp_nvc0.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/bsp/nouveau_engine_bsp_nve0.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/copy/nouveau_engine_copy_nva3.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/copy/nouveau_engine_copy_nvc0.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/copy/nouveau_engine_copy_nve0.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/crypt/nouveau_engine_crypt_nv84.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/crypt/nouveau_engine_crypt_nv98.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_base.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_ctrl.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_gm100.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nv04.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nv10.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nv20.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nv30.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nv40.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nv50.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nvc0.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/device/nouveau_engine_device_nve0.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_base.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_dacnv50.c nouveau +file external/bsd/drm2/dist/drm/nouveau/core/engine/disp/nouveau_engine_disp_dpo
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Fri Mar 6 15:08:02 UTC 2015 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: Spurious blank line. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/external/bsd/drm2/nouveau/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.1 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.2 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.1 Fri Mar 6 01:43:07 2015 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Fri Mar 6 15:08:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.1 2015/03/06 01:43:07 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.2 2015/03/06 15:08:02 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.1 2015/03/06 01:43:07 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.2 2015/03/06 15:08:02 riastradh Exp $"); #include #include @@ -114,7 +114,6 @@ nouveau_attach(device_t parent, device_t sc->sc_task_state = NOUVEAU_TASK_ATTACH; SIMPLEQ_INIT(&sc->sc_task_u.attach); - /* XXX errno Linux->NetBSD */ error = -drm_pci_attach(self, pa, &sc->sc_pci_dev, nouveau_drm_driver, 0, &sc->sc_drm_dev);