CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Tue Jul 2 20:09:01 UTC 2024 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau2netbsd Log Message: nouveau: Update nouveau2netbsd to prepare for new import. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 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.6 src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.7 --- src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.6 Tue Apr 16 14:26:53 2024 +++ src/sys/external/bsd/drm2/nouveau/nouveau2netbsd Tue Jul 2 20:09:01 2024 @@ -1,6 +1,6 @@ #!/bin/sh -# $NetBSD: nouveau2netbsd,v 1.6 2024/04/16 14:26:53 riastradh Exp $ +# $NetBSD: nouveau2netbsd,v 1.7 2024/07/02 20:09:01 riastradh Exp $ # # $ /path/to/nouveau2netbsd > /path/to/files.nouveau.new # @@ -36,6 +36,11 @@ cat Kbuild\ | sed -e 's,^endif$,.endif,' \ | env \ env CONFIG_ACPI=y \ + env CONFIG_COMPAT=y \ + env CONFIG_DRM_NOUVEAU_SVM=y \ + env CONFIG_LEDS_CLASS=y \ + env CONFIG_NOUVEAU=y \ + env CONFIG_NOUVEAU_BACKLIGHT=y \ env CONFIG_X86=y \ env src=. \ make -f /dev/stdin -V '$(nouveau-y)'\ @@ -83,7 +88,9 @@ cat Kbuild\ ' >> "$filemap" while read from to; do - if [ "x$from" != "x$to" ]; then + # If the move already happened, that's fine: the makefile + # detects duplicates. + if [ "x$from" != "x$to" -a \! -f "$to" ]; then ${MV} -f -- "$from" "$to" fi printf 'file\t%s\t%s\n' "$nouveau_top/$to" "$nouveau_flag"
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Tue Jul 2 20:09:01 UTC 2024 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau2netbsd Log Message: nouveau: Update nouveau2netbsd to prepare for new import. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 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.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Tue Apr 16 14:26:53 UTC 2024 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau2netbsd Log Message: nouveau: Rework nouveau2netbsd hack to get ACPI stuff. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 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.5 src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.6 --- src/sys/external/bsd/drm2/nouveau/nouveau2netbsd:1.5 Mon Aug 27 00:46:21 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau2netbsd Tue Apr 16 14:26:53 2024 @@ -1,6 +1,6 @@ #!/bin/sh -# $NetBSD: nouveau2netbsd,v 1.5 2018/08/27 00:46:21 riastradh Exp $ +# $NetBSD: nouveau2netbsd,v 1.6 2024/04/16 14:26:53 riastradh Exp $ # # $ /path/to/nouveau2netbsd > /path/to/files.nouveau.new # @@ -32,9 +32,13 @@ filemap="$(mktemp -t ${0##*/})" cat Kbuild\ | sed -e 's,^include \(.*\)$,.include "\1",'\ -| sed -e 's,^ifdef \(.*\)$,.if !empty(\1:M[yY][eE][sS]),' \ +| sed -e 's,^ifdef \(.*\)$,.if !empty(\1:M[yY]),' \ | sed -e 's,^endif$,.endif,' \ -| make -f /dev/stdin -V '$(nouveau-y)' src=.\ +| env \ + env CONFIG_ACPI=y \ + env CONFIG_X86=y \ + env src=. \ + make -f /dev/stdin -V '$(nouveau-y)'\ | tr ' ' '\n'\ | sed -e 's,^$,,' \ | sort -u\
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Tue Apr 16 14:26:53 UTC 2024 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau2netbsd Log Message: nouveau: Rework nouveau2netbsd hack to get ACPI stuff. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 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.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 7 16:34:57 UTC 2023 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: nouveau: Suspend ioctls while device is suspended. XXX pullup-10 To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 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.37 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.38 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.37 Wed Mar 1 08:42:34 2023 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Mon Aug 7 16:34:57 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.37 2023/03/01 08:42:34 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.38 2023/08/07 16:34:57 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.37 2023/03/01 08:42:34 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.38 2023/08/07 16:34:57 riastradh Exp $"); #ifdef _KERNEL_OPT #include "genfb.h" @@ -55,6 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: nouveau_pci. #include #endif +#include #include #include @@ -316,16 +317,31 @@ static bool nouveau_pci_suspend(device_t self, const pmf_qual_t *qual __unused) { struct nouveau_pci_softc *const sc = device_private(self); + struct drm_device *const dev = sc->sc_drm_dev; + int ret; + + drm_suspend_ioctl(dev); + + ret = nouveau_pmops_suspend(dev); + if (ret) + return false; - return nouveau_pmops_suspend(sc->sc_drm_dev) == 0; + return true; } static bool nouveau_pci_resume(device_t self, const pmf_qual_t *qual) { struct nouveau_pci_softc *const sc = device_private(self); + struct drm_device *const dev = sc->sc_drm_dev; + int ret; + + ret = nouveau_pmops_resume(sc->sc_drm_dev); + if (ret) + goto out; - return nouveau_pmops_resume(sc->sc_drm_dev) == 0; +out: drm_resume_ioctl(dev); + return ret == 0; } static void
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Mon Aug 7 16:34:57 UTC 2023 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: nouveau: Suspend ioctls while device is suspended. XXX pullup-10 To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 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.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Sun Jul 17 15:36:51 UTC 2022 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_module.c Log Message: nouveau: Depend on drmkms_ttm module. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 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.10 src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.11 --- src/sys/external/bsd/drm2/nouveau/nouveau_module.c:1.10 Sun Dec 19 10:32:59 2021 +++ src/sys/external/bsd/drm2/nouveau/nouveau_module.c Sun Jul 17 15:36:51 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_module.c,v 1.10 2021/12/19 10:32:59 riastradh Exp $ */ +/* $NetBSD: nouveau_module.c,v 1.11 2022/07/17 15:36:51 riastradh Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_module.c,v 1.10 2021/12/19 10:32:59 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_module.c,v 1.11 2022/07/17 15:36:51 riastradh Exp $"); #include #include @@ -40,7 +40,7 @@ __KERNEL_RCSID(0, "$NetBSD: nouveau_modu #include -MODULE(MODULE_CLASS_DRIVER, nouveau, "drmkms"); /* XXX drmkms_i2c, drmkms_ttm */ +MODULE(MODULE_CLASS_DRIVER, nouveau, "drmkms,drmkms_ttm"); /* XXX drmkms_i2c */ #ifdef _MODULE #include "ioconf.c"
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Sun Jul 17 15:36:51 UTC 2022 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_module.c Log Message: nouveau: Depend on drmkms_ttm module. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 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.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:45:35 UTC 2021 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: nouveau: adjust the list of PCI devices to match linux 5.6 drm supports all the cards previously listed as unsupported. make those supported, and, add the newer list of unsupported (the supported list goes to GTX 20 series.) Author: phone Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 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.34 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.35 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.34 Sun Dec 19 12:28:12 2021 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Sun Dec 19 12:45:35 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.34 2021/12/19 12:28:12 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.35 2021/12/19 12:45:35 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.34 2021/12/19 12:28:12 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.35 2021/12/19 12:45:35 riastradh Exp $"); #ifdef _KERNEL_OPT #if defined(__arm__) || defined(__aarch64__) @@ -109,26 +109,19 @@ nouveau_pci_match(device_t parent, cfdat return 0; /* - * NetBSD drm2 doesn't support Pascal, Volta or Turing based cards: - * 0x1580-0x15ff GP100 - * 0x1b00-0x1b7f GP102 - * 0x1b80-0x1bff GP104 - * 0x1c00-0x1c7f GP106 - * 0x1c80-0x1cff GP107 - * 0x1d00-0x1d7f GP108 - * 0x1d80-0x1dff GV100 - * 0x1e00-0x1e7f TU102 - * 0x1e80-0x1eff TU104 - * 0x1f00-0x1f7f TU106 - * 0x1f80-0x1fff TU117 - * 0x2180-0x21ff TU116 + * NetBSD drm2/5.6 doesn't support Ampere (GTX 30 series) based cards: + * 0x2080-0x20ff GA100 + * 0x2200-0x227f GA102 + * 0x2300-0x237f GA103 + * 0x2480-0x24ff GA104 + * 0x2500-0x257f GA106 + * 0x2580-0x25ff GA107 * - * reduce this to >= 1580, so that new chipsets not explictly - * listed above will be picked up. - * - * XXX perhaps switch this to explicitly match known list. + * TU116 (GTX 16xx) occupies the space from 0x2180-0x21ff. */ - if (PCI_PRODUCT(pa->pa_id) >= 0x1580) + if (PCI_PRODUCT(pa->pa_id) >= 0x1fff && PCI_PRODUCT(pa->pa_id) < 0x2180) + return 0; + if (PCI_PRODUCT(pa->pa_id) >= 0x21ff) return 0; linux_pci_dev_init(, parent /* XXX bogus */, parent, pa, 0);
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Sun Dec 19 12:45:35 UTC 2021 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: nouveau: adjust the list of PCI devices to match linux 5.6 drm supports all the cards previously listed as unsupported. make those supported, and, add the newer list of unsupported (the supported list goes to GTX 20 series.) Author: phone Committer: Taylor R Campbell To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 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.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:05:20 UTC 2021 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: nouveau: Call nouveau_drm_device_init. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 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.30 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.31 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.30 Sun Dec 19 11:05:13 2021 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Sun Dec 19 11:05:20 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.30 2021/12/19 11:05:13 riastradh Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.31 2021/12/19 11:05:20 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.30 2021/12/19 11:05:13 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.31 2021/12/19 11:05:20 riastradh Exp $"); #ifdef _KERNEL_OPT #if defined(__arm__) || defined(__aarch64__) @@ -223,6 +223,13 @@ nouveau_pci_attach_real(device_t self) sc->sc_pci_attached = true; /* XXX errno Linux->NetBSD */ + error = -nouveau_drm_device_init(sc->sc_drm_dev); + if (error) { + aprint_error_dev(self, "unable to init nouveau: %d\n", error); + return; + } + + /* XXX errno Linux->NetBSD */ error = -drm_dev_register(sc->sc_drm_dev, 0); if (error) { aprint_error_dev(self, "unable to register drm: %d\n", error);
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Sun Dec 19 11:05:20 UTC 2021 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: nouveau: Call nouveau_drm_device_init. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 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.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Sun Dec 19 10:48:22 UTC 2021 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: Compile all of nouveau with -Wno-pointer-arith. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 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.32 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.33 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.32 Sun Dec 19 00:32:03 2021 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Sun Dec 19 10:48:22 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.32 2021/12/19 00:32:03 riastradh Exp $ +# $NetBSD: files.nouveau,v 1.33 2021/12/19 10:48:22 riastradh Exp $ version 20180827 @@ -29,14 +29,12 @@ makeoptions nouveau CPPFLAGS+="-DCONFIG_ makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG_DEFAULT=3" makeoptions nouveau "CWARNFLAGS.nouveau"+="-Wno-missing-field-initializers" +makeoptions nouveau "CWARNFLAGS.nouveau"+="-Wno-pointer-arith" makeoptions nouveau "CWARNFLAGS.nouveau"+="-Wno-shadow" makeoptions nouveau "CWARNFLAGS.nouveau"+="${${ACTIVE_CC} == clang:? -Wno-error=gnu-variable-sized-type-not-at-end :}" makeoptions nouveau "CWARNFLAGS.nouveau"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}" makeoptions nouveau "CWARNFLAGS.nouveau_nvkm_subdev_bios_timing.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=int-in-bool-context :}" makeoptions nouveau "CWARNFLAGS.nouveau_nvkm_subdev_clk_gt215.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=int-in-bool-context :}" -makeoptions nouveau "CWARNFLAGS.nouveau_nvkm_subdev_instmem_base.c"+="-Wno-pointer-arith" -makeoptions nouveau "CWARNFLAGS.nouveau_nvkm_subdev_bios_shadowpci.c"+="-Wno-pointer-arith" -makeoptions nouveau "CWARNFLAGS.nouveau_nvkm_subdev_instmem_nv40.c"+="-Wno-pointer-arith" 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 Dec 19 10:48:22 UTC 2021 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: Compile all of nouveau with -Wno-pointer-arith. To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 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.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Sun Dec 19 00:32:11 UTC 2021 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c nouveaufb.c Log Message: nouveau_drm.h was renamed upstream to nouveau_drv.h. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c cvs rdiff -u -r1.4 -r1.5 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/nouveau_pci.c diff -u src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.26 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.27 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.26 Mon Feb 3 16:52:13 2020 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Sun Dec 19 00:32:11 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.26 2020/02/03 16:52:13 jmcneill Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.27 2021/12/19 00:32:11 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.26 2020/02/03 16:52:13 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.27 2021/12/19 00:32:11 riastradh Exp $"); #ifdef _KERNEL_OPT #if defined(__arm__) || defined(__aarch64__) @@ -53,7 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: nouveau_pci. #include #endif -#include "nouveau_drm.h" +#include "nouveau_drv.h" #include "nouveau_pci.h" MODULE(MODULE_CLASS_DRIVER, nouveau_pci, "nouveau,drmkms_pci"); Index: src/sys/external/bsd/drm2/nouveau/nouveaufb.c diff -u src/sys/external/bsd/drm2/nouveau/nouveaufb.c:1.4 src/sys/external/bsd/drm2/nouveau/nouveaufb.c:1.5 --- src/sys/external/bsd/drm2/nouveau/nouveaufb.c:1.4 Mon Dec 12 19:45:56 2016 +++ src/sys/external/bsd/drm2/nouveau/nouveaufb.c Sun Dec 19 00:32:11 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveaufb.c,v 1.4 2016/12/12 19:45:56 maya Exp $ */ +/* $NetBSD: nouveaufb.c,v 1.5 2021/12/19 00:32:11 riastradh Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveaufb.c,v 1.4 2016/12/12 19:45:56 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveaufb.c,v 1.5 2021/12/19 00:32:11 riastradh Exp $"); #include #include @@ -42,7 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: nouveaufb.c, #include #include "nouveau_bo.h" -#include "nouveau_drm.h" +#include "nouveau_drv.h" #include "nouveau_fbcon.h" #include "nouveau_pci.h" #include "nouveaufb.h"
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Sun Dec 19 00:32:11 UTC 2021 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c nouveaufb.c Log Message: nouveau_drm.h was renamed upstream to nouveau_drv.h. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c cvs rdiff -u -r1.4 -r1.5 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.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Sun Dec 19 00:32:03 UTC 2021 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Removed Files: src/sys/external/bsd/drm2/nouveau: nouveau_sysfs.c Log Message: Delete nouveau_sysfs.c, removed upstream. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/external/bsd/drm2/nouveau/files.nouveau cvs rdiff -u -r1.1 -r0 src/sys/external/bsd/drm2/nouveau/nouveau_sysfs.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.31 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.32 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.31 Sun Dec 19 00:25:34 2021 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Sun Dec 19 00:32:03 2021 @@ -1,4 +1,4 @@ -# $NetBSD: files.nouveau,v 1.31 2021/12/19 00:25:34 riastradh Exp $ +# $NetBSD: files.nouveau,v 1.32 2021/12/19 00:32:03 riastradh Exp $ version 20180827 @@ -12,7 +12,6 @@ device nouveaufb: nouveaufbbus, drmfb, d attach nouveaufb at nouveaufbbus # Local additions. External sources are listd below. -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
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: riastradh Date: Sun Dec 19 00:32:03 UTC 2021 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Removed Files: src/sys/external/bsd/drm2/nouveau: nouveau_sysfs.c Log Message: Delete nouveau_sysfs.c, removed upstream. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/external/bsd/drm2/nouveau/files.nouveau cvs rdiff -u -r1.1 -r0 src/sys/external/bsd/drm2/nouveau/nouveau_sysfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
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.
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, _pci_attach_real); }
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Sat Oct 5 22:37:50 UTC 2019 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: list the PCI ID range for new nvidia TU117 and TU116. adjust the check to simply be >= 0x1580, which is the first pciid not support. should fix PR#54600. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 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.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: mrg Date: Sat Oct 5 22:37:50 UTC 2019 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: list the PCI ID range for new nvidia TU117 and TU116. adjust the check to simply be >= 0x1580, which is the first pciid not support. should fix PR#54600. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 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.24 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.25 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.24 Wed Jul 3 20:47:22 2019 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Sat Oct 5 22:37:49 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.24 2019/07/03 20:47:22 wiz Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.25 2019/10/05 22:37:49 mrg Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.24 2019/07/03 20:47:22 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.25 2019/10/05 22:37:49 mrg Exp $"); #include #include @@ -97,8 +97,6 @@ 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, Volta or Turing based cards: * 0x1580-0x15ff GP100 @@ -111,20 +109,16 @@ nouveau_pci_match(device_t parent, cfdat * 0x1e00-0x1e7f TU102 * 0x1e80-0x1eff TU104 * 0x1f00-0x1f7f TU106 + * 0x1f80-0x1fff TU117 + * 0x2180-0x21ff TU116 + * + * reduce this to >= 1580, so that new chipsets not explictly + * listed above will be picked up. + * + * XXX perhaps switch this to explicitly match known list. */ - - 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) || - IS_BETWEEN(0x1e00, 0x1e7f) || - IS_BETWEEN(0x1e80, 0x1eff) || - IS_BETWEEN(0x1f00, 0x1f7f)) + if (PCI_PRODUCT(pa->pa_id) >= 0x1580) return 0; -#undef IS_BETWEEN linux_pci_dev_init(, parent /* XXX bogus */, parent, pa, 0); ret = nvkm_device_pci_new(, NULL, "error",
Re: CVS commit: src/sys/external/bsd/drm2/nouveau
On Fri, Jul 05, 2019 at 10:25:50PM +0200, Thomas Klausner wrote: > On Wed, Jul 03, 2019 at 10:56:09PM +, m...@netbsd.org wrote: > > On Wed, Jul 03, 2019 at 08:47:22PM +, Thomas Klausner wrote: > > > Module Name: src > > > Committed By: wiz > > > Date: Wed Jul 3 20:47:22 UTC 2019 > > > > > > Modified Files: > > > src/sys/external/bsd/drm2/nouveau: nouveau_pci.c > > > > > > Log Message: > > > Improve nouveau pci attachment code so it waits for the availability of / > > > before trying to load firmware. > > > > > > > Which firmware is it loading? we should probably ship it... > > I've tried to provide the nvidia firmware from Debian's > firmware-nonfree_20161130.orig.tar.xz > > Putting the files into > > /usr/libdata/firmware/nvidia/gm206/gr > > or > > /usr/libdata/firmware/nouveau/gm206/gr > > isn't enough, it still doesn't find them. Is the full searched path printed > somewhere? > Thomas nouveau code doesn't make it super obvious, but try /usr/libdata/firmware/nouveau/nvidia/gm206/gr/ If that fails, printf drvname and imgname in sys/dev/firmload.c:firmware_open This is our usual source for firmware, https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/
Re: CVS commit: src/sys/external/bsd/drm2/nouveau
On Wed, Jul 03, 2019 at 08:47:22PM +, Thomas Klausner wrote: > Module Name: src > Committed By: wiz > Date: Wed Jul 3 20:47:22 UTC 2019 > > Modified Files: > src/sys/external/bsd/drm2/nouveau: nouveau_pci.c > > Log Message: > Improve nouveau pci attachment code so it waits for the availability of / > before trying to load firmware. > Which firmware is it loading? we should probably ship it...
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: wiz Date: Wed Jul 3 20:47:22 UTC 2019 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: Improve nouveau pci attachment code so it waits for the availability of / before trying to load firmware. Fixes my PR 54274. LGTM mrg To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 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.
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: wiz Date: Wed Jul 3 20:47:22 UTC 2019 Modified Files: src/sys/external/bsd/drm2/nouveau: nouveau_pci.c Log Message: Improve nouveau pci attachment code so it waits for the availability of / before trying to load firmware. Fixes my PR 54274. LGTM mrg To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 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.23 src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.24 --- src/sys/external/bsd/drm2/nouveau/nouveau_pci.c:1.23 Mon Dec 24 08:40:33 2018 +++ src/sys/external/bsd/drm2/nouveau/nouveau_pci.c Wed Jul 3 20:47:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: nouveau_pci.c,v 1.23 2018/12/24 08:40:33 mrg Exp $ */ +/* $NetBSD: nouveau_pci.c,v 1.24 2019/07/03 20:47:22 wiz Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.23 2018/12/24 08:40:33 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nouveau_pci.c,v 1.24 2019/07/03 20:47:22 wiz Exp $"); #include #include @@ -52,6 +52,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, @@ -67,6 +68,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_pci_attach_real(device_t); static int nouveau_pci_detach(device_t, int); static bool nouveau_pci_suspend(device_t, const pmf_qual_t *); @@ -110,7 +112,7 @@ nouveau_pci_match(device_t parent, cfdat * 0x1e80-0x1eff TU104 * 0x1f00-0x1f7f TU106 */ - + if (IS_BETWEEN(0x1580, 0x15ff) || IS_BETWEEN(0x1b00, 0x1b7f) || IS_BETWEEN(0x1b80, 0x1bff) || @@ -144,22 +146,37 @@ nouveau_pci_attach(device_t parent, devi { struct nouveau_pci_softc *const sc = device_private(self); const struct pci_attach_args *const pa = aux; - int error; pci_aprint_devinfo(pa, NULL); - sc->sc_dev = self; + if (!pmf_device_register(self, _pci_suspend, _pci_resume)) + aprint_error_dev(self, "unable to establish power handler\n"); - /* Initialize the Linux PCI device descriptor. */ - linux_pci_dev_init(>sc_pci_dev, self, device_parent(self), pa, 0); + /* + * Trivial initialization first; the rest will come after we + * have mounted the root file system and can load firmware + * images. + */ + sc->sc_dev = NULL; + sc->sc_pa = *pa; - if (!pmf_device_register(self, _pci_suspend, - _pci_resume)) - aprint_error_dev(self, "unable to establish power handler\n"); + config_mountroot(self, _pci_attach_real); +} +static void +nouveau_pci_attach_real(device_t self) +{ + struct nouveau_pci_softc *const sc = device_private(self); + const struct pci_attach_args *const pa = >sc_pa; + int error; + + sc->sc_dev = self; sc->sc_task_state = NOUVEAU_TASK_ATTACH; SIMPLEQ_INIT(>sc_task_u.attach); + /* Initialize the Linux PCI device descriptor. */ + linux_pci_dev_init(>sc_pci_dev, self, device_parent(self), pa, 0); + /* XXX errno Linux->NetBSD */ error = -nvkm_device_pci_new(>sc_pci_dev, nouveau_config, nouveau_debug, @@ -204,6 +221,10 @@ nouveau_pci_detach(device_t self, int fl struct nouveau_pci_softc *const sc = device_private(self); int error; + if (sc->sc_dev == NULL) + /* Not done attaching. */ + return EBUSY; + /* XXX Check for in-use before tearing it all down... */ error = config_detach_children(self, flags); if (error)
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: wiz Date: Mon Jun 24 13:36:07 UTC 2019 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: nouveau uses firmload, add dependency. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 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.26 src/sys/external/bsd/drm2/nouveau/files.nouveau:1.27 --- src/sys/external/bsd/drm2/nouveau/files.nouveau:1.26 Mon Feb 4 08:18:08 2019 +++ src/sys/external/bsd/drm2/nouveau/files.nouveau Mon Jun 24 13:36:07 2019 @@ -1,9 +1,9 @@ -# $NetBSD: files.nouveau,v 1.26 2019/02/04 08:18:08 mrg Exp $ +# $NetBSD: files.nouveau,v 1.27 2019/06/24 13:36:07 wiz Exp $ version 20180827 define nouveaufbbus { } -device nouveau: drmkms, drmkms_ttm, nouveaufbbus +device nouveau: drmkms, drmkms_ttm, nouveaufbbus, firmload attach nouveau at pci with nouveau_pci: drmkms_pci file external/bsd/drm2/nouveau/nouveau_pci.c nouveau_pci
CVS commit: src/sys/external/bsd/drm2/nouveau
Module Name:src Committed By: wiz Date: Mon Jun 24 13:36:07 UTC 2019 Modified Files: src/sys/external/bsd/drm2/nouveau: files.nouveau Log Message: nouveau uses firmload, add dependency. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 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.
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: 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.
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: 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.
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.
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: 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.
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: 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: 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.
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(_def); @@ -86,9 +65,6 @@ nouveau_fini(void) drm_sysctl_fini(_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: 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.
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: 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.
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(, NULL, parent, pa, 0); - ret = nvkm_device_pci_new(, NULL, "error", true, false, 0, - ); + linux_pci_dev_init(, parent /* XXX bogus */, parent, pa, 0); + ret = nvkm_device_pci_new(, NULL, "error", + /* detect */ true, /* mmio */ false, /* subdev_mask */ 0, ); if (ret == 0) /* don't want to hang onto it */ nvkm_device_del(); linux_pci_dev_destroy(); @@ -163,7 +163,8 @@ nouveau_pci_attach(device_t parent, devi /* XXX errno Linux->NetBSD */ error = -nvkm_device_pci_new(>sc_pci_dev, - nouveau_config, nouveau_debug, true, true, ~0ULL, + nouveau_config, nouveau_debug, + /* detect */ true, /* mmio */ true, /* subdev_mask */ ~0ULL, >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 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.
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.
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(_def); @@ -66,6 +78,7 @@ nouveau_fini(void) drm_sysctl_fini(_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: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(, NULL, parent, pa, 0); + ret = nvkm_device_pci_new(, NULL, "error", true, false, 0, + ); + if (ret == 0) /* don't want to hang onto it */ + nvkm_device_del(); + linux_pci_dev_destroy(); + 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: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.
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_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_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 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.
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.
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_pci_dev, nouveau_drm_driver, - 0, >sc_drm_dev); + error = -drm_pci_attach(self, pa, >sc_pci_dev, + nouveau_drm_driver_pci, 0, >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 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_nv_dev); +out1: nvkm_device_del(>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: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.
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_pci_dev, NOUVEAU_BUS_PCI, - devname, device_xname(self), nouveau_config, nouveau_debug, + error = -nvkm_device_pci_new(>sc_pci_dev, + nouveau_config, nouveau_debug, true, true, ~0ULL, >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(_def); @@ -68,7 +66,6 @@ nouveau_fini(void) drm_sysctl_fini(_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 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.
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.
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: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.
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
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.
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
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.
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 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: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.
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.
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: 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.
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 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.
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.
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: 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.
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, _pci_suspend, _pci_resume)) aprint_error_dev(self, "unable to establish power handler\n"); - config_mountroot(self, _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_pa; - uint64_t devname; - int error; - sc->sc_task_state = NOUVEAU_TASK_ATTACH; SIMPLEQ_INIT(>sc_task_u.attach);
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.
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: 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.
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: 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.
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, _pci_suspend, _pci_resume)) aprint_error_dev(self, "unable to establish power handler\n"); + config_mountroot(self, _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_pa; + uint64_t devname; + int error; + sc->sc_task_state = NOUVEAU_TASK_ATTACH; SIMPLEQ_INIT(>sc_task_u.attach);
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
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.
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.
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: 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(_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(_init_once, _init); -#endif -} - static void nouveau_fini(void) { drm_sysctl_fini(_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: nouveau_pci.c,v 1.4 2015/10/17
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.
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.
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 sys/cdefs.h -__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 sys/types.h #include sys/device.h @@ -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);
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: 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.
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_dport.c nouveau
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.
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 sys/cdefs.h\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 sys/cdefs.h\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: 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.
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.