Page MenuHomeFreeBSD

D35266.diff
No OneTemporary

D35266.diff

diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile
--- a/x11/nvidia-driver/Makefile
+++ b/x11/nvidia-driver/Makefile
@@ -64,7 +64,8 @@
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 @@
${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
--- /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);

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 8, 3:39 AM (21 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14526897
Default Alt Text
D35266.diff (1 KB)

Event Timeline