FreeBSD Bugzilla – Attachment 222183 Details for
Bug 249505
[patch]x11/nvidia-driver and x11/linux-nvidia-libs: Update to latest 460.32.03
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Ad-hoc patch for 460.39, applicable over port r564088
nvidia_460.39.diff (text/plain), 2.94 KB, created by
Tomoaki AOKI
on 2021-02-05 14:42:20 UTC
(
hide
)
Description:
Ad-hoc patch for 460.39, applicable over port r564088
Filename:
MIME Type:
Creator:
Tomoaki AOKI
Created:
2021-02-05 14:42:20 UTC
Size:
2.94 KB
patch
obsolete
>--- x11/nvidia-driver/Makefile.orig 2021-02-05 17:47:32.299334000 +0900 >+++ x11/nvidia-driver/Makefile 2021-02-05 22:41:15.548341000 +0900 >@@ -73,7 +73,8 @@ SUB_PATCHES+= extra-patch-src-nvidia_ctl.c \ > extra-patch-src-nvidia_linux.c > .else > EXTRA_PATCHES+= ${FILESDIR}/460-patch-lib-libGLX_nvidia-Makefile >-SUB_PATCHES+= 460-patch-src-nvidia_linux.c >+SUB_PATCHES+= 460-patch-src-nvidia_ctl.c \ >+ 460-patch-src-nvidia_linux.c > .endif > > OPTIONS_DEFINE= ACPI_PM LINUX WBINVD DOCS >--- /dev/null 2021-02-05 23:24:25.531346000 +0900 >+++ x11/nvidia-driver/files/460-patch-src-nvidia_ctl.c.in 2021-02-05 22:54:45.253393000 +0900 >@@ -0,0 +1,73 @@ >+--- src/%%NVSRC%%/nvidia_ctl.c.orig 2021-01-21 21:50:34 UTC >++++ src/%%NVSRC%%/nvidia_ctl.c >+@@ -13,6 +13,12 @@ >+ #include "nv.h" >+ #include "nv-freebsd.h" >+ >++#ifdef NV_SUPPORT_LINUX_COMPAT /* (COMPAT_LINUX || COMPAT_LINUX32) */ >++#include <compat/linux/linux_util.h> >++ >++const char nvidia_driver_name[] = "nvidia"; >++#endif >++ >+ static d_open_t nvidia_ctl_open; >+ static d_ioctl_t nvidia_ctl_ioctl; >+ static d_poll_t nvidia_ctl_poll; >+@@ -162,6 +168,18 @@ static int nvidia_ctl_poll( >+ >+ int nvidia_ctl_attach(void) >+ { >++#ifdef NV_SUPPORT_LINUX_COMPAT >++ struct linux_device_handler nvidia_ctl_linux_handler = { >++ .bsd_driver_name = __DECONST(char *, nvidia_driver_name), >++ .linux_driver_name = __DECONST(char *, nvidia_driver_name), >++ .bsd_device_name = __DECONST(char *, nvidia_ctl_cdevsw.d_name), >++ .linux_device_name = __DECONST(char *, nvidia_ctl_cdevsw.d_name), >++ .linux_major = NV_MAJOR_DEVICE_NUMBER, >++ .linux_minor = 255, >++ .linux_char_device = 1 >++ }; >++#endif >++ >+ if (nvidia_count == 0) { >+ nvidia_ctl_cdev = make_dev(&nvidia_ctl_cdevsw, >+ CDEV_CTL_MINOR, >+@@ -169,6 +187,10 @@ int nvidia_ctl_attach(void) >+ "%s", nvidia_ctl_cdevsw.d_name); >+ if (nvidia_ctl_cdev == NULL) >+ return ENOMEM; >++ >++#ifdef NV_SUPPORT_LINUX_COMPAT >++ (void)linux_device_register_handler(&nvidia_ctl_linux_handler); >++#endif >+ } >+ >+ nvidia_count++; >+@@ -177,10 +199,26 @@ int nvidia_ctl_attach(void) >+ >+ int nvidia_ctl_detach(void) >+ { >++#ifdef NV_SUPPORT_LINUX_COMPAT >++ struct linux_device_handler nvidia_ctl_linux_handler = { >++ .bsd_driver_name = __DECONST(char *, nvidia_driver_name), >++ .linux_driver_name = __DECONST(char *, nvidia_driver_name), >++ .bsd_device_name = __DECONST(char *, nvidia_ctl_cdevsw.d_name), >++ .linux_device_name = __DECONST(char *, nvidia_ctl_cdevsw.d_name), >++ .linux_major = NV_MAJOR_DEVICE_NUMBER, >++ .linux_minor = 255, >++ .linux_char_device = 1 >++ }; >++#endif >++ >+ nvidia_count--; >+ >+- if (nvidia_count == 0) >++ if (nvidia_count == 0) { >++#ifdef NV_SUPPORT_LINUX_COMPAT >++ (void)linux_device_unregister_handler(&nvidia_ctl_linux_handler); >++#endif >+ destroy_dev(nvidia_ctl_cdev); >++ } >+ >+ return 0; >+ }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 249505
:
218141
|
218142
|
218162
|
220379
|
220380
|
221657
|
221933
| 222183