Date: Thu, 30 Jun 2022 22:29:58 GMT From: John Baldwin <jhb@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 88501f5bcc43 - main - x11/nvidia-driver: Remove devclass from DRIVER_MODULE on recent main. Message-ID: <202206302229.25UMTwXE018773@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb (doc, src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=88501f5bcc43dd694c44f09262164c4fdcfae1a1 commit 88501f5bcc43dd694c44f09262164c4fdcfae1a1 Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-06-30 22:29:46 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2022-06-30 22:29:46 +0000 x11/nvidia-driver: Remove devclass from DRIVER_MODULE on recent main. Initialize nvidia_devclass in nvidia_modevent instead. Reviewed by: danfe Differential Revision: https://reviews.freebsd.org/D35266 --- x11/nvidia-driver/Makefile | 8 +++++++- x11/nvidia-driver/files/extra-patch-src-nvidia_subr.c.in | 12 ++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile index 4962687b0e93..ba0f4261e1eb 100644 --- a/x11/nvidia-driver/Makefile +++ b/x11/nvidia-driver/Makefile @@ -64,7 +64,8 @@ SUB_FILES+= nvidia.conf SUB_FILES+= pkg-deinstall pkg-install .endif SUB_PATCHES= extra-patch-src-Makefile \ - extra-patch-src-nv-freebsd.h + extra-patch-src-nv-freebsd.h \ + extra-patch-src-nvidia_subr.c .if ${NVVERSION} < 510.03901 SUB_PATCHES+= extra-patch-src-nvidia_dev.c \ extra-patch-src-nvidia_pci.c @@ -231,6 +232,11 @@ post-patch: .SILENT ${REINPLACE_CMD} -e '/void nvidia_dev_dtor/,+8s,.*status.*,,' \ ${WRKSRC}/src/${NVSRC}/nvidia_dev.c .endif +# After src 2a99dd30dfaa, DRIVER_MODULE should not include nvidia_devclass +.if ${OSVERSION} >= 1400058 + ${REINPLACE_CMD} -e '/^DRIVER_MODULE/s/, nvidia_devclass//' \ + ${WRKSRC}/src/${NVSRC}/nvidia_pci.c +.endif # Finally, process OPTIONS .if ${PORT_OPTIONS:MFREEBSD_AGP} ${REINPLACE_CMD} -E 's/undef (NV_SUPPORT_OS_AGP)/define \1/' \ diff --git a/x11/nvidia-driver/files/extra-patch-src-nvidia_subr.c.in b/x11/nvidia-driver/files/extra-patch-src-nvidia_subr.c.in new file mode 100644 index 000000000000..05cc03676821 --- /dev/null +++ b/x11/nvidia-driver/files/extra-patch-src-nvidia_subr.c.in @@ -0,0 +1,12 @@ +--- src/%%NVSRC%%/nvidia_subr.c.orig 2022-03-16 11:18:11 UTC ++++ src/%%NVSRC%%/nvidia_subr.c +@@ -727,6 +727,9 @@ int nvidia_modevent( + * time. + */ + sc = &nvidia_ctl_sc; ++#if __FreeBSD_version >= 1400058 ++ nvidia_devclass = devclass_create("nvidia"); ++#endif + + nvidia_stack_t_zone = uma_zcreate("nvidia_stack_t", sizeof(nvidia_stack_t), + NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202206302229.25UMTwXE018773>