aboutsummaryrefslogtreecommitdiffstats
path: root/x11
diff options
context:
space:
mode:
Diffstat (limited to 'x11')
-rw-r--r--x11/nvidia-driver/Makefile3
-rw-r--r--x11/nvidia-driver/files/patch-nvidia_subr.c35
2 files changed, 37 insertions, 1 deletions
diff --git a/x11/nvidia-driver/Makefile b/x11/nvidia-driver/Makefile
index 4723b5e6c3f7..3748f0fda85e 100644
--- a/x11/nvidia-driver/Makefile
+++ b/x11/nvidia-driver/Makefile
@@ -7,6 +7,7 @@
PORTNAME= nvidia-driver
PORTVERSION= 1.0.3203
+PORTREVISION= 1
CATEGORIES= x11
MASTER_SITES= http://download.nvidia.com/freebsd/1.0-3203/
DISTNAME= NVIDIA_FreeBSD-${PORTVERSION:S/0./0-/}
@@ -53,12 +54,14 @@ pre-install:
.endif
post-install:
+.if ${OSVERSION} < 500000
.for dev in 0 1 2 3
@mknod /dev/nvidia${dev} c 180 ${dev}
@${CHMOD} 0666 /dev/nvidia${dev}
.endfor
@mknod /dev/nvidiactl c 180 255
@${CHMOD} 0666 /dev/nvidiactl
+.endif
@${CAT} ${PKGMESSAGE}
.include <bsd.port.post.mk>
diff --git a/x11/nvidia-driver/files/patch-nvidia_subr.c b/x11/nvidia-driver/files/patch-nvidia_subr.c
index edd6fa4da0e6..4a4b40234a82 100644
--- a/x11/nvidia-driver/files/patch-nvidia_subr.c
+++ b/x11/nvidia-driver/files/patch-nvidia_subr.c
@@ -1,5 +1,29 @@
--- src/nvidia_subr.c.orig Wed Oct 30 15:30:58 2002
-+++ src/nvidia_subr.c Thu Mar 6 01:25:20 2003
++++ src/nvidia_subr.c Fri Mar 14 20:47:44 2003
+@@ -130,7 +130,7 @@
+ sc = device_get_softc(dev);
+ sc->dev = dev;
+
+- sc->nv_state = malloc(sizeof(nv_state_t), M_DEVBUF, M_ZERO);
++ sc->nv_state = malloc(sizeof(nv_state_t), M_DEVBUF, M_WAITOK | M_ZERO);
+ if (sc->nv_state == NULL) {
+ error = ENOMEM;
+ goto fail;
+@@ -901,12 +901,12 @@
+ void *vm;
+ u_int32_t i, size = count * PAGE_SIZE;
+
+- at = malloc(sizeof(nv_alloc_t), M_NVIDIA, M_ZERO);
++ at = malloc(sizeof(nv_alloc_t), M_NVIDIA, M_WAITOK | M_ZERO);
+ if (!at) {
+ return -ENOMEM;
+ }
+
+- vm = malloc(size, M_NVIDIA, M_ZERO);
++ vm = malloc(size, M_NVIDIA, M_WAITOK | M_ZERO);
+ if (!vm) {
+ /*
+ * This error condition is not unlikely to occur. We allocate our
@@ -925,7 +925,9 @@
* prevent random crashes.
*/
@@ -26,6 +50,15 @@
free(at, M_NVIDIA);
free(address, M_NVIDIA);
+@@ -993,7 +997,7 @@
+ vm_page_t m;
+ vm_object_t object;
+
+- at = malloc(sizeof(nv_alloc_t), M_NVIDIA, M_ZERO);
++ at = malloc(sizeof(nv_alloc_t), M_NVIDIA, M_WAITOK | M_ZERO);
+ if (!at) {
+ return -ENOMEM;
+ }
@@ -1007,13 +1011,19 @@
* will be allocated.
*/