FreeBSD Bugzilla – Attachment 218135 Details for
Bug 249448
graphics/mesa-libs: conflicts with x11/nvidia-driver, x11/nvidia-driver-390 (/usr/local/lib/libGLESv1_CM.so)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
v4 patch with nvidia-driver and linux-nvidia-libs updated to 450.66
nvidia-driver-450.66_with_Bug249448.diff (text/plain), 15.57 KB, created by
Tomoaki AOKI
on 2020-09-21 08:52:38 UTC
(
hide
)
Description:
v4 patch with nvidia-driver and linux-nvidia-libs updated to 450.66
Filename:
MIME Type:
Creator:
Tomoaki AOKI
Created:
2020-09-21 08:52:38 UTC
Size:
15.57 KB
patch
obsolete
>Modified: x11/linux-nvidia-libs/Makefile >============================================================================== >--- x11/linux-nvidia-libs/Makefile.orig 2020-07-06 21:58:17.486227000 +0900 >+++ x11/linux-nvidia-libs/Makefile 2020-09-19 22:45:36.692631000 +0900 >@@ -2,6 +2,6 @@ > > PORTNAME= nvidia-libs >-DISTVERSION?= 440.100 >+DISTVERSION?= 450.66 > # Always try to set PORTREVISION as it can be overridden by the slave ports > PORTREVISION?= 0 > CATEGORIES= x11 linux >@@ -94,7 +94,28 @@ > PLIST_RE+= '\,${LINUXBASE}.*libEGL_nvidia\.so,d' > .endif > >+.if ${NVVERSION} >= 450.057 >+LINUX_LIBS+= libGLESv1_CM_nvidia.so.${PORTVERSION} \ >+ libGLESv2_nvidia.so.${PORTVERSION} \ >+ libGLX_nvidia.so.${PORTVERSION} \ >+ libnvidia-ptxjitcompiler.so.${PORTVERSION} >+LINUX_LINKS+= libGLESv1_CM_nvidia.so.${PORTVERSION} libGLESv1_CM_nvidia.so.1 \ >+ libGLESv2_nvidia.so.${PORTVERSION} libGLESv2_nvidia.so.2 \ >+ libGLX_nvidia.so.${PORTVERSION} libGLX_nvidia.so.0 \ >+ libGLX_nvidia.so.${PORTVERSION} libGLX_indirect.so.0 \ >+ libnvidia-ptxjitcompiler.so.${PORTVERSION} libnvidia-ptxjitcompiler.so.1 \ >+ libnvidia-ptxjitcompiler.so.${PORTVERSION} libnvidia-ptxjitcompiler.so >+LINUX32_LIBS+= libGLESv1_CM_nvidia.so.${PORTVERSION} \ >+ libGLESv2_nvidia.so.${PORTVERSION} \ >+ libGLX_nvidia.so.${PORTVERSION} \ >+ libnvidia-ptxjitcompiler.so.${PORTVERSION} >+LINUX32_LINKS+= libGLESv1_CM_nvidia.so.${PORTVERSION} libGLESv1_CM_nvidia.so.1 \ >+ libGLESv2_nvidia.so.${PORTVERSION} libGLESv2_nvidia.so.2 \ >+ libGLX_nvidia.so.${PORTVERSION} libGLX_nvidia.so.0 \ >+ libGLX_nvidia.so.${PORTVERSION} libGLX_indirect.so.0 \ >+ libnvidia-ptxjitcompiler.so.${PORTVERSION} libnvidia-ptxjitcompiler.so.1 \ >+ libnvidia-ptxjitcompiler.so.${PORTVERSION} libnvidia-ptxjitcompiler.so >-.if ${NVVERSION} >= 361.016 >+.elif ${NVVERSION} >= 361.016 && ${NVVERSION} < 450.057 > LINUX_LIBS+= libGLESv1_CM_nvidia.so.${PORTVERSION} \ > libGLESv2_nvidia.so.${PORTVERSION} \ > libGLX_nvidia.so.${PORTVERSION} \ >Modified: x11/linux-nvidia-libs/distinfo >============================================================================== >--- x11/linux-nvidia-libs/distinfo.orig 2020-07-06 21:58:17.486227000 +0900 >+++ x11/linux-nvidia-libs/distinfo 2020-09-19 22:45:36.692631000 +0900 >@@ -1,6 +1,6 @@ > TIMESTAMP = 1482026038 >-SHA256 (NVIDIA-Linux-x86_64-440.100.run) = 649684fab4f37b178afb6cae012e7f9736377d89fa8abdfca26f24a13bbacf1f >-SIZE (NVIDIA-Linux-x86_64-440.100.run) = 144653408 >+SHA256 (NVIDIA-Linux-x86_64-450.66.run) = ba0646928d3d1f5fda07136bd539daab131d03ad628f64d4f7f3feb51f50dba8 >+SIZE (NVIDIA-Linux-x86_64-450.66.run) = 141068918 > SHA256 (NVIDIA-Linux-x86_64-390.138.run) = 5ffb19e6c86c28e51d710f9679386e3c755161cf747bf3e83647a3486859d666 > SIZE (NVIDIA-Linux-x86_64-390.138.run) = 83780873 > SHA256 (NVIDIA-Linux-x86-390.138.run) = 7bf67323a393e857a09f979f155baa1ed13183653add0c344edf4d409f977878 >Modified: x11/linux-nvidia-libs/pkg-plist >============================================================================== >--- x11/linux-nvidia-libs/pkg-plist.orig 2020-05-18 19:23:19.486227000 +0900 >+++ x11/linux-nvidia-libs/pkg-plist 2020-09-19 22:45:36.692631000 +0900 >@@ -48,7 +48,6 @@ > %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-encode.so > %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-encode.so.1 > %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-encode.so.%%SHLIB_VERSION%% >-%%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-fatbinaryloader.so.%%SHLIB_VERSION%% > %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-fbc.so > %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-fbc.so.1 > %%LINUX32%%%%LINUXBASE%%/usr/lib/libnvidia-fbc.so.%%SHLIB_VERSION%% >@@ -119,7 +118,6 @@ > %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-encode.so > %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-encode.so.1 > %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-encode.so.%%SHLIB_VERSION%% >-%%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-fatbinaryloader.so.%%SHLIB_VERSION%% > %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-fbc.so > %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-fbc.so.1 > %%LINUXBASE%%%%LINUX_LIBDIR%%/libnvidia-fbc.so.%%SHLIB_VERSION%% > >Modified: x11/nvidia-driver/Makefile >============================================================================== >--- x11/nvidia-driver/Makefile.orig 2020-06-30 18:29:23.486227000 +0900 >+++ x11/nvidia-driver/Makefile 2020-09-19 22:45:36.692631000 +0900 >@@ -11,7 +11,7 @@ > # or `x11/nvidia-driver-304'). > > PORTNAME= nvidia-driver >-DISTVERSION?= 440.100 >+DISTVERSION?= 450.66 > # Always try to set PORTREVISION as it can be overridden by the slave ports > PORTREVISION?= 0 > CATEGORIES= x11 >@@ -44,13 +44,23 @@ SUB_FILES= pkg-message nvidia.conf > .if ${NVVERSION} < 410.057 > SUB_FILES+= pkg-deinstall pkg-install > .endif >+.if ${NVVERSION} >= 450.057 > SUB_PATCHES= extra-patch-src-Makefile \ > extra-patch-src-nv-freebsd.h \ > extra-patch-src-nv-misc.h \ >+ extra-patch-450-src-nvidia_ctl.c \ >+ extra-patch-src-nvidia_dev.c \ >+ extra-patch-src-nvidia_linux.c \ >+ extra-patch-src-nvidia_pci.c >+.else >+SUB_PATCHES= extra-patch-src-Makefile \ >+ extra-patch-src-nv-freebsd.h \ >+ extra-patch-src-nv-misc.h \ > extra-patch-src-nvidia_ctl.c \ > extra-patch-src-nvidia_dev.c \ > extra-patch-src-nvidia_linux.c \ > extra-patch-src-nvidia_pci.c >+.endif > DOCSDIR= ${PREFIX}/share/doc/NVIDIA_GLX-1.0 > MODULESDIR= lib/xorg/modules > PORTDOCS= * >@@ -67,7 +77,9 @@ NVSRC= . > NVSRC= nvidia > .endif > >-.if ${NVVERSION} >= 358.009 >+.if ${NVVERSION} >= 450.057 >+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-450-src_nvidia-modeset_nvidia-modeset-freebsd.c >+.else if ${NVVERSION} >= 358.009 > # Initialize memory allocations to avoid spurious "lock re-initialization" > # errors. A little more detail can be found in bug 201340 starting around > # comment #50. >@@ -261,6 +273,8 @@ > ${MV} -f ${STAGEDIR}${PREFIX}/lib/libEGL.so.1 \ > ${STAGEDIR}${PREFIX}/lib/libEGL-NVIDIA.so.1 > ${RM} ${STAGEDIR}${PREFIX}/lib/libEGL.so >+ ${RM} ${STAGEDIR}${PREFIX}/lib/libGLESv1_CM.so >+ ${RM} ${STAGEDIR}${PREFIX}/lib/libGLESv1_CM.so.1 > ${LN} -sf libGLESv2-NVIDIA.so.2 \ > ${STAGEDIR}${PREFIX}/lib/libGLESv2-NVIDIA.so > ${MV} -f ${STAGEDIR}${PREFIX}/lib/libGLESv2.so.2 \ >Modified: x11/nvidia-driver/distinfo >============================================================================== >--- x11/nvidia-driver/distinfo.orig 2020-06-30 18:29:23.423968000 +0900 >+++ x11/nvidia-driver/distinfo 2020-09-19 22:56:33.690534000 +0900 >@@ -1,6 +1,6 @@ > TIMESTAMP = 1482026038 >-SHA256 (NVIDIA-FreeBSD-x86_64-440.100.tar.gz) = da5abe605560890405976785eb28e6d9fa79181ac7d158e52e5327d4d0faef5f >-SIZE (NVIDIA-FreeBSD-x86_64-440.100.tar.gz) = 82523267 >+SHA256 (NVIDIA-FreeBSD-x86_64-450.66.tar.gz) = 8c8ccfc2c9e2e888f3342a9b520ef95b483a1d2f01587d02c2014ffab01d3abb >+SIZE (NVIDIA-FreeBSD-x86_64-450.66.tar.gz) = 82963662 > SHA256 (NVIDIA-FreeBSD-x86_64-390.138.tar.gz) = 51cb38cd826ba34c1cc71db5bd3ef645b4cfb5647311e255b4631e5c41d0ba07 > SIZE (NVIDIA-FreeBSD-x86_64-390.138.tar.gz) = 65280213 > SHA256 (NVIDIA-FreeBSD-x86-390.138.tar.gz) = ca06e877af81e2e895a92fc9ec6f5bc106a48a0223912992d5cb0f482c9dac9a >Modified: x11/nvidia-driver/files/nvidia.conf.in >=================================================================== >--- x11/nvidia-driver/files/nvidia.conf.in (revision 548962) >+++ x11/nvidia-driver/files/nvidia.conf.in (working copy) >@@ -6,6 +6,9 @@ > %%NVGL%%libEGL.so libEGL-NVIDIA.so > %%NVGL%%libEGL.so.1 libEGL-NVIDIA.so.1 > >+%%NVGL%%libGLESv1_CM.so libGLESv1_CM_nvidia.so >+%%NVGL%%libGLESv1_CM.so.1 libGLESv1_CM_nvidia.so.1 >+ > %%NVGL%%libGLESv2.so libGLESv2-NVIDIA.so > %%NVGL%%libGLESv2.so.2 libGLESv2-NVIDIA.so.2 > >Modified: x11/nvidia-driver/pkg-plist >=================================================================== >--- x11/nvidia-driver/pkg-plist (revision 548962) >+++ x11/nvidia-driver/pkg-plist (working copy) >@@ -8,8 +8,6 @@ > lib/libEGL_nvidia.so.0 > lib/libGL-NVIDIA.so > lib/libGL-NVIDIA.so.1 >-lib/libGLESv1_CM.so >-lib/libGLESv1_CM.so.1 > lib/libGLESv1_CM_nvidia.so > lib/libGLESv1_CM_nvidia.so.1 > lib/libGLESv2-NVIDIA.so >Added: x11/nvidia-driver/files/extra-patch-450-src_nvidia-modeset_nvidia-modeset-freebsd.c >============================================================================== >--- /dev/null 00:00:00 1970 (empty, because file is newly added) >+++ x11/nvidia-driver/files/extra-patch-450-src_nvidia-modeset_nvidia-modeset-freebsd.c 2020-08-04 07:51:36.692631000 +0900 >@@ -0,0 +1,104 @@ >+--- src/nvidia-modeset/nvidia-modeset-freebsd.c.orig 2018-08-21 23:09:28 UTC >++++ src/nvidia-modeset/nvidia-modeset-freebsd.c >+@@ -26,6 +26,7 @@ >+ #include <sys/file.h> >+ #include <sys/proc.h> >+ #include <sys/stack.h> >++#include <sys/sysproto.h> >+ >+ #include "nvkms-ioctl.h" >+ #include "nvidia-modeset-os-interface.h" >+@@ -48,6 +49,7 @@ >+ #include "machine/../linux32/linux32_proto.h" >+ #endif >+ #include <compat/linux/linux_ioctl.h> >++ #include <compat/linux/linux_util.h> >+ #endif >+ >+ >+@@ -250,7 +252,7 @@ struct nvkms_ref_ptr { >+ >+ struct nvkms_ref_ptr* NVKMS_API_CALL nvkms_alloc_ref_ptr(void *ptr) >+ { >+- struct nvkms_ref_ptr *ref_ptr = nvkms_alloc(sizeof(*ref_ptr), NV_FALSE); >++ struct nvkms_ref_ptr *ref_ptr = nvkms_alloc(sizeof(*ref_ptr), NV_TRUE); >+ if (ref_ptr) { >+ mtx_init(&ref_ptr->lock, "nvkms-ref-ptr-lock", NULL, MTX_SPIN); >+ // The ref_ptr owner counts as a reference on the ref_ptr itself. >+@@ -867,33 +869,31 @@ static int nvkms_poll( >+ *************************************************************************/ >+ >+ #if defined(NVKMS_SUPPORT_LINUX_COMPAT) >++static struct linux_device_handler nvkms_linux_device_handler = { >++ .bsd_driver_name = "nvidia-modeset", >++ .linux_driver_name = "nvidia-modeset", >++ .bsd_device_name = "nvidia-modeset", >++ .linux_device_name = "nvidia-modeset", >++ .linux_major = 195, >++ .linux_minor = 254, >++ .linux_char_device = 1 >++}; >+ >+ static int nvkms_linux_ioctl_function( >+ struct thread *td, >+ struct linux_ioctl_args *args >+ ) >+ { >+- struct file *fp; >+- int status; >+- u_long cmd; >++ static const uint32_t dir[4] = { IOC_VOID, IOC_IN, IOC_OUT, IOC_INOUT }; >+ >+-#if NV_FGET_HAS_CAP_RIGHTS_T_ARG >+- cap_rights_t rights; >+- status = fget(td, args->fd, cap_rights_init(&rights, CAP_IOCTL), &fp); >+-#else >+- status = fget(td, args->fd, &fp); >+-#endif >+- >+- if (status != 0) { >+- return status; >++ if ((args->cmd & (1<<29)) != 0) { >++ /* FreeBSD has only 13 bits to encode the size. */ >++ printf("nvidia: pid %d (%s): ioctl cmd=0x%x size too large\n", >++ (int)td->td_proc->p_pid, td->td_proc->p_comm, args->cmd); >++ return (EINVAL); >+ } >+- >+- cmd = args->cmd; >+- >+- status = fo_ioctl(fp, cmd, (caddr_t)args->arg, td->td_ucred, td); >+- fdrop(fp, td); >+- >+- return status; >++ args->cmd = (args->cmd & ~IOC_DIRMASK) | dir[args->cmd >> 30]; >++ return (sys_ioctl(td, (struct ioctl_args *)args)); >+ } >+ >+ #define NVKMS_LINUX_IOCTL_MIN _IOC(0, NVKMS_IOCTL_MAGIC, NVKMS_IOCTL_CMD, 0) >+@@ -909,6 +909,7 @@ static struct linux_ioctl_handler nvkms_linux_ioctl_ha >+ static void nvkms_linux_compat_load(void) >+ { >+ #if defined(NVKMS_SUPPORT_LINUX_COMPAT) >++ linux_device_register_handler(&nvkms_linux_device_handler); >+ linux_ioctl_register_handler(&nvkms_linux_ioctl_handler); >+ #endif >+ } >+@@ -917,6 +918,7 @@ static void nvkms_linux_compat_unload(void) >+ { >+ #if defined(NVKMS_SUPPORT_LINUX_COMPAT) >+ linux_ioctl_unregister_handler(&nvkms_linux_ioctl_handler); >++ linux_device_unregister_handler(&nvkms_linux_device_handler); >+ #endif >+ } >+ >+@@ -1100,4 +1102,9 @@ MODULE_DEPEND(nvidia_modeset, /* module >+ MODULE_DEPEND(nvidia_modeset, /* module name */ >+ linux, /* prerequisite module */ >+ 1, 1, 1); /* vmin, vpref, vmax */ >++#if defined(NVCPU_X86_64) >++MODULE_DEPEND(nvidia_modeset, /* module name */ >++ linux_common, /* prerequisite module */ >++ 1, 1, 1); /* vmin, vpref, vmax */ >++#endif >+ #endif >Added: x11/nvidia-driver/files/extra-patch-450-src-nvidia_ctl.c.in >============================================================================== >--- /dev/null 00:00:00 1970 (empty, because file is newly added) >+++ x11/nvidia-driver/files/extra-patch-450-src-nvidia_ctl.c.in 2020-08-04 07:51:36.692631000 +0900 >@@ -0,0 +1,72 @@ >+--- src/%%NVSRC%%/nvidia_ctl.c.orig 2017-09-14 20:46:30 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 void nvidia_ctl_dtor(void *arg); >+ static d_ioctl_t nvidia_ctl_ioctl; >+@@ -138,6 +144,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, >+@@ -145,6 +163,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++; >+@@ -153,10 +175,25 @@ 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; >+ } >Index: x11/nvidia-driver-304/Makefile >=================================================================== >--- x11/nvidia-driver-304/Makefile (revision 548962) >+++ x11/nvidia-driver-304/Makefile (working copy) >@@ -3,7 +3,7 @@ > > DISTVERSION= 304.137 > # Explicitly set PORTREVISION as it can be overridden by the master port >-PORTREVISION= 7 >+PORTREVISION= 8 > > MASTERDIR= ${.CURDIR}/../nvidia-driver > PKGNAMESUFFIX= -304 >Index: x11/nvidia-driver-340/Makefile >=================================================================== >--- x11/nvidia-driver-340/Makefile (revision 548962) >+++ x11/nvidia-driver-340/Makefile (working copy) >@@ -3,7 +3,7 @@ > > DISTVERSION= 340.108 > # Explicitly set PORTREVISION as it can be overridden by the master port >-PORTREVISION= 1 >+PORTREVISION= 2 > > MASTERDIR= ${.CURDIR}/../nvidia-driver > PKGNAMESUFFIX= -340 >Index: x11/nvidia-driver-390/Makefile >=================================================================== >--- x11/nvidia-driver-390/Makefile (revision 548962) >+++ x11/nvidia-driver-390/Makefile (working copy) >@@ -3,7 +3,7 @@ > > DISTVERSION= 390.138 > # Explicitly set PORTREVISION as it can be overridden by the master port >-PORTREVISION= 0 >+PORTREVISION= 1 > > MASTERDIR= ${.CURDIR}/../nvidia-driver > PKGNAMESUFFIX= -390
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 249448
:
218072
|
218073
|
218074
|
218075
| 218135