FreeBSD Bugzilla – Attachment 226916 Details for
Bug 257456
x11/nvidia-driver: Update to 470.57.02
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Make mtx->sx patches optional for 470.x
nvidia.diff (text/plain), 8.63 KB, created by
Jung-uk Kim
on 2021-08-03 17:17:21 UTC
(
hide
)
Description:
Make mtx->sx patches optional for 470.x
Filename:
MIME Type:
Creator:
Jung-uk Kim
Created:
2021-08-03 17:17:21 UTC
Size:
8.63 KB
patch
obsolete
>diff --git a/x11/linux-nvidia-libs/Makefile b/x11/linux-nvidia-libs/Makefile >index fad5d35ed71d..21e2840d6417 100644 >--- a/x11/linux-nvidia-libs/Makefile >+++ b/x11/linux-nvidia-libs/Makefile >@@ -1,5 +1,5 @@ > PORTNAME= nvidia-libs >-DISTVERSION?= 460.84 >+DISTVERSION?= 470.57.02 > # Always try to set PORTREVISION as it can be overridden by the slave ports > PORTREVISION?= 0 > CATEGORIES= x11 linux >diff --git a/x11/linux-nvidia-libs/distinfo b/x11/linux-nvidia-libs/distinfo >index e8540e10ef13..da0598235236 100644 >--- a/x11/linux-nvidia-libs/distinfo >+++ b/x11/linux-nvidia-libs/distinfo >@@ -1,4 +1,6 @@ >-TIMESTAMP = 1620395714 >+TIMESTAMP = 1626704423 >+SHA256 (NVIDIA-Linux-x86_64-470.57.02.run) = 55d7ae104827faa79e975321fe2b60f9dd42fbff65642053443c0e56fdb4c47d >+SIZE (NVIDIA-Linux-x86_64-470.57.02.run) = 273219658 > SHA256 (NVIDIA-Linux-x86_64-460.84.run) = a10d2171d6b2c55f63791f58264f9e92829ee4b2779b9b1d011274e63b46b960 > SIZE (NVIDIA-Linux-x86_64-460.84.run) = 177840337 > SHA256 (NVIDIA-Linux-x86_64-390.144.run) = 8bb6e8de89e8f8325466af29cf0fa235c988d19137f7fe3eb6bfae1d5e305e74 >diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile >index b4e0b2906533..59ea1d1b315c 100644 >--- a/x11/nvidia-driver/Makefile >+++ b/x11/nvidia-driver/Makefile >@@ -14,7 +14,7 @@ > # ``make DISTVERSION=xxx.yy.zz -DNO_CHECKSUM'' should typically work. > > PORTNAME?= nvidia-driver >-DISTVERSION?= 460.84 >+DISTVERSION?= 470.57.02 > # Always try to set PORTREVISION as it can be overridden by the slave ports > PORTREVISION?= 0 > CATEGORIES= x11 >@@ -92,6 +92,11 @@ EXTRA_PATCHES+= ${FILESDIR}/460-patch-src-nvidia-nvidia_ctl.c \ > .endif > .if ${NVVERSION} < 470.04201 > SUB_PATCHES+= extra-patch-src-nv-misc.h >+.else >+EXTRA_PATCHES+= ${FILESDIR}/extra-patch-src_nvidia_nv-freebsd.h \ >+ ${FILESDIR}/extra-patch-src_nvidia_nvidia__ctl.c \ >+ ${FILESDIR}/extra-patch-src_nvidia_nvidia__dev.c \ >+ ${FILESDIR}/extra-patch-src_nvidia_nvidia__subr.c > .endif > > OPTIONS_DEFINE= ACPI_PM LINUX WBINVD DOCS >diff --git a/x11/nvidia-driver/distinfo b/x11/nvidia-driver/distinfo >index 263ab51efc86..4645130c6c0c 100644 >--- a/x11/nvidia-driver/distinfo >+++ b/x11/nvidia-driver/distinfo >@@ -1,6 +1,6 @@ >-TIMESTAMP = 1620395718 >-SHA256 (NVIDIA-FreeBSD-x86_64-460.84.tar.gz) = 920cca0df1bf3eedcc2dbe8fca1711b3ab0e09b7864e0bbc990dfd7d35bde0e8 >-SIZE (NVIDIA-FreeBSD-x86_64-460.84.tar.gz) = 108291070 >+TIMESTAMP = 1626704305 >+SHA256 (NVIDIA-FreeBSD-x86_64-470.57.02.tar.xz) = 1803b39ed3a9f185c6a4528181917af4a56610acfedccc98df0d60d2e498e8f2 >+SIZE (NVIDIA-FreeBSD-x86_64-470.57.02.tar.xz) = 99335120 > SHA256 (NVIDIA-FreeBSD-x86_64-390.144.tar.gz) = a3ecf4d1cb7190c43e1c910a66c5920072fef887ccab70e11b899c748d880afd > SIZE (NVIDIA-FreeBSD-x86_64-390.144.tar.gz) = 65333942 > SHA256 (NVIDIA-FreeBSD-x86-390.144.tar.gz) = 438ef26d32a596f199ac38e90a799c71111374c66572a725546c26055de7054b >diff --git a/x11/nvidia-driver/files/extra-patch-src_nvidia_nv-freebsd.h b/x11/nvidia-driver/files/extra-patch-src_nvidia_nv-freebsd.h >new file mode 100644 >index 000000000000..00048bc0239b >--- /dev/null >+++ b/x11/nvidia-driver/files/extra-patch-src_nvidia_nv-freebsd.h >@@ -0,0 +1,11 @@ >+--- src/nvidia/nv-freebsd.h.orig 2021-08-02 23:24:12 UTC >++++ src/nvidia/nv-freebsd.h >+@@ -161,7 +161,7 @@ struct nv_freebsd_file_private { >+ >+ nv_state_t *nv; >+ STAILQ_HEAD(event_queue, nvidia_event) event_queue; >+- struct mtx fops_mtx; >++ struct sx fops_sx; >+ nvidia_stack_t *fops_sp; >+ NvBool event_pending; >+ struct mtx event_mtx; >diff --git a/x11/nvidia-driver/files/extra-patch-src_nvidia_nvidia__ctl.c b/x11/nvidia-driver/files/extra-patch-src_nvidia_nvidia__ctl.c >new file mode 100644 >index 000000000000..6de2d7caacec >--- /dev/null >+++ b/x11/nvidia-driver/files/extra-patch-src_nvidia_nvidia__ctl.c >@@ -0,0 +1,38 @@ >+--- src/nvidia/nvidia_ctl.c.orig 2021-08-02 23:24:19 UTC >++++ src/nvidia/nvidia_ctl.c >+@@ -52,7 +52,7 @@ static int nvidia_ctl_open( >+ free(nvffp, M_NVIDIA); >+ return ENOMEM; >+ } >+- mtx_init(&nvffp->fops_mtx, "fops_mtx", NULL, MTX_DEF); >++ sx_init(&nvffp->fops_sx, "fops_sx"); >+ >+ nvffp->nv = nv; >+ mtx_init(&nvffp->event_mtx, "event_mtx", NULL, (MTX_DEF | MTX_RECURSE)); >+@@ -62,7 +62,7 @@ static int nvidia_ctl_open( >+ >+ if (status != 0) { >+ mtx_destroy(&nvffp->event_mtx); >+- mtx_destroy(&nvffp->fops_mtx); >++ sx_destroy(&nvffp->fops_sx); >+ NV_UMA_ZONE_FREE_STACK(nvffp->fops_sp); >+ free(nvffp, M_NVIDIA); >+ return status; >+@@ -72,7 +72,7 @@ static int nvidia_ctl_open( >+ if (status != 0) { >+ nvidia_close_ctl(nv, nvffp); >+ mtx_destroy(&nvffp->event_mtx); >+- mtx_destroy(&nvffp->fops_mtx); >++ sx_destroy(&nvffp->fops_sx); >+ NV_UMA_ZONE_FREE_STACK(nvffp->fops_sp); >+ free(nvffp, M_NVIDIA); >+ return status; >+@@ -95,7 +95,7 @@ void nvidia_ctl_dtor(void *arg) >+ } >+ mtx_destroy(&nvffp->event_mtx); >+ >+- mtx_destroy(&nvffp->fops_mtx); >++ sx_destroy(&nvffp->fops_sx); >+ NV_UMA_ZONE_FREE_STACK(nvffp->fops_sp); >+ >+ free(nvffp, M_NVIDIA); >diff --git a/x11/nvidia-driver/files/extra-patch-src_nvidia_nvidia__dev.c b/x11/nvidia-driver/files/extra-patch-src_nvidia_nvidia__dev.c >new file mode 100644 >index 000000000000..8488d077d6e7 >--- /dev/null >+++ b/x11/nvidia-driver/files/extra-patch-src_nvidia_nvidia__dev.c >@@ -0,0 +1,38 @@ >+--- src/nvidia/nvidia_dev.c.orig 2021-08-02 23:24:33 UTC >++++ src/nvidia/nvidia_dev.c >+@@ -49,7 +49,7 @@ static int nvidia_dev_open( >+ free(nvffp, M_NVIDIA); >+ return ENOMEM; >+ } >+- mtx_init(&nvffp->fops_mtx, "fops_mtx", NULL, MTX_DEF); >++ sx_init(&nvffp->fops_sx, "fops_sx"); >+ >+ nvffp->nv = nv; >+ mtx_init(&nvffp->event_mtx, "event_mtx", NULL, (MTX_DEF | MTX_RECURSE)); >+@@ -59,7 +59,7 @@ static int nvidia_dev_open( >+ >+ if (status != 0) { >+ mtx_destroy(&nvffp->event_mtx); >+- mtx_destroy(&nvffp->fops_mtx); >++ sx_destroy(&nvffp->fops_sx); >+ NV_UMA_ZONE_FREE_STACK(nvffp->fops_sp); >+ free(nvffp, M_NVIDIA); >+ return status; >+@@ -69,7 +69,7 @@ static int nvidia_dev_open( >+ if (status != 0) { >+ nvidia_close_dev(nv, nvffp); >+ mtx_destroy(&nvffp->event_mtx); >+- mtx_destroy(&nvffp->fops_mtx); >++ sx_destroy(&nvffp->fops_sx); >+ NV_UMA_ZONE_FREE_STACK(nvffp->fops_sp); >+ free(nvffp, M_NVIDIA); >+ return status; >+@@ -92,7 +92,7 @@ void nvidia_dev_dtor(void *arg) >+ } >+ mtx_destroy(&nvffp->event_mtx); >+ >+- mtx_destroy(&nvffp->fops_mtx); >++ sx_destroy(&nvffp->fops_sx); >+ NV_UMA_ZONE_FREE_STACK(nvffp->fops_sp); >+ >+ free(nvffp, M_NVIDIA); >diff --git a/x11/nvidia-driver/files/extra-patch-src_nvidia_nvidia__subr.c b/x11/nvidia-driver/files/extra-patch-src_nvidia_nvidia__subr.c >new file mode 100644 >index 000000000000..58246a3d7d9f >--- /dev/null >+++ b/x11/nvidia-driver/files/extra-patch-src_nvidia_nvidia__subr.c >@@ -0,0 +1,74 @@ >+--- src/nvidia/nvidia_subr.c.orig 2021-08-02 23:24:25 UTC >++++ src/nvidia/nvidia_subr.c >+@@ -397,7 +397,7 @@ int nvidia_handle_ioctl( >+ nr = xfer->cmd; >+ } >+ >+- mtx_lock(&nvffp->fops_mtx); >++ sx_xlock(&nvffp->fops_sx); >+ sp = nvffp->fops_sp; >+ >+ switch (nr) { >+@@ -471,7 +471,7 @@ int nvidia_handle_ioctl( >+ break; >+ } >+ >+- mtx_unlock(&nvffp->fops_mtx); >++ sx_xunlock(&nvffp->fops_sx); >+ >+ if (args != (void *)data) { >+ if (copyout(args, NvP64_VALUE(xfer->ptr), size) != 0) >+@@ -1048,7 +1048,7 @@ NV_STATUS NV_API_CALL nv_add_mapping_context_to_file( >+ >+ nvffp = nv_get_nvffp_from_nvfp(nvfp); >+ >+- mtx_lock(&nvffp->fops_mtx); >++ sx_xlock(&nvffp->fops_sx); >+ >+ nvamc = &nvffp->mmap_context; >+ >+@@ -1076,7 +1076,7 @@ NV_STATUS NV_API_CALL nv_add_mapping_context_to_file( >+ nvamc->valid = NV_TRUE; >+ >+ done: >+- mtx_unlock(&nvffp->fops_mtx); >++ sx_xunlock(&nvffp->fops_sx); >+ nv_put_file_private(priv); >+ >+ return status; >+@@ -1503,7 +1503,7 @@ int nvidia_mmap_ctl_single( >+ nv_alloc_mapping_context_t *mmap_context; >+ int status; >+ >+- mtx_lock(&nvffp->fops_mtx); >++ sx_xlock(&nvffp->fops_sx); >+ >+ mmap_context = &nvffp->mmap_context; >+ >+@@ -1532,7 +1532,7 @@ int nvidia_mmap_ctl_single( >+ status = 0; >+ >+ done: >+- mtx_unlock(&nvffp->fops_mtx); >++ sx_xunlock(&nvffp->fops_sx); >+ >+ return status; >+ } >+@@ -1553,7 +1553,7 @@ int nvidia_mmap_dev_single( >+ nv = nvffp->nv; >+ sc = nv->os_state; >+ >+- mtx_lock(&nvffp->fops_mtx); >++ sx_xlock(&nvffp->fops_sx); >+ >+ /* >+ * If no mmap context is valid on this file descriptor then this mapping >+@@ -1593,7 +1593,7 @@ int nvidia_mmap_dev_single( >+ } >+ >+ done: >+- mtx_unlock(&nvffp->fops_mtx); >++ sx_xunlock(&nvffp->fops_sx); >+ >+ return status; >+ }
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 257456
:
226784
|
226795
|
226898
| 226916