Date: Sat, 16 Mar 2013 07:29:53 +0000 (UTC) From: Sean Bruno <sbruno@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r314338 - in head/x11/nvidia-driver: . files Message-ID: <201303160729.r2G7TrxF058661@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: sbruno (src committer) Date: Sat Mar 16 07:29:53 2013 New Revision: 314338 URL: http://svnweb.freebsd.org/changeset/ports/314338 Log: Resolve current build breakage on head for the nvidia driver via this nice handy patch from dhw@ :-) Shoveled in via src commit bit, after some discussions in #bsdports PR: ports/176980 Submitted by: dhw@ Reviewed by: miwi@ Approved by: nobody in particular Obtained from: dogfood MFC after: 2 weeks Added: head/x11/nvidia-driver/files/r248084-patch-src-nv-freebsd.h (contents, props changed) head/x11/nvidia-driver/files/r248084-patch-src-nvidia_subr.c (contents, props changed) Modified: head/x11/nvidia-driver/Makefile (contents, props changed) Modified: head/x11/nvidia-driver/Makefile ============================================================================== --- head/x11/nvidia-driver/Makefile Sat Mar 16 07:29:22 2013 (r314337) +++ head/x11/nvidia-driver/Makefile Sat Mar 16 07:29:53 2013 (r314338) @@ -86,6 +86,10 @@ WBINVD_DESC= Flush CPU caches directly PLIST_SUB+= LINUXBASE=${LINUXBASE} SHLIB_VERSION=${PORTVERSION} \ MODULESDIR=${MODULESDIR} +. if ${OSVERSION} > 1000028 +EXTRA_PATCHES+= ${FILESDIR}/r248084-patch-src-nv-freebsd.h +EXTRA_PATCHES+= ${FILESDIR}/r248084-patch-src-nvidia_subr.c +. endif .if ${PORT_OPTIONS:MLINUX} CONFLICTS= linux[-_]dri-[0-9]* linux-f10-dri-[0-9]* Added: head/x11/nvidia-driver/files/r248084-patch-src-nv-freebsd.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/nvidia-driver/files/r248084-patch-src-nv-freebsd.h Sat Mar 16 07:29:53 2013 (r314338) @@ -0,0 +1,10 @@ +--- src/nv-freebsd.h.orig 2013-01-14 14:38:44.000000000 -0800 ++++ src/nv-freebsd.h 2013-03-09 06:36:23.000000000 -0800 +@@ -77,6 +77,7 @@ + #include <vm/vm_object.h> + #include <vm/pmap.h> + #include <vm/vm_map.h> ++#include <sys/rwlock.h> + #include <vm/vm_pager.h> + #include <vm/uma.h> + Added: head/x11/nvidia-driver/files/r248084-patch-src-nvidia_subr.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/x11/nvidia-driver/files/r248084-patch-src-nvidia_subr.c Sat Mar 16 07:29:53 2013 (r314338) @@ -0,0 +1,56 @@ +--- src/nvidia_subr.c.orig 2013-01-14 14:38:44.000000000 -0800 ++++ src/nvidia_subr.c 2013-03-09 06:47:05.000000000 -0800 +@@ -83,7 +83,7 @@ + if (!sc->BAR_objects[i]) + goto failed; + +- VM_OBJECT_LOCK(sc->BAR_objects[i]); ++ VM_OBJECT_WLOCK(sc->BAR_objects[i]); + switch (i) { + case NV_GPU_BAR_INDEX_FB: + vm_object_set_memattr(sc->BAR_objects[i], +@@ -95,7 +95,7 @@ + VM_MEMATTR_UNCACHEABLE); + break; + } +- VM_OBJECT_UNLOCK(sc->BAR_objects[i]); ++ VM_OBJECT_WUNLOCK(sc->BAR_objects[i]); + } + } + +@@ -541,9 +541,9 @@ + goto failed; + } + +- VM_OBJECT_LOCK(sc->UD_object); ++ VM_OBJECT_WLOCK(sc->UD_object); + vm_object_set_memattr(sc->UD_object, VM_MEMATTR_UNCACHEABLE); +- VM_OBJECT_UNLOCK(sc->UD_object); ++ VM_OBJECT_WUNLOCK(sc->UD_object); + } + + nv->flags |= NV_FLAG_OPEN; +@@ -965,9 +965,9 @@ + goto failed; + } + +- VM_OBJECT_LOCK(at->object); ++ VM_OBJECT_WLOCK(at->object); + vm_object_set_memattr(at->object, attr); +- VM_OBJECT_UNLOCK(at->object); ++ VM_OBJECT_WUNLOCK(at->object); + + *private = at; + SLIST_INSERT_HEAD(&sc->alloc_list, at, list); +@@ -1108,9 +1108,9 @@ + goto failed; + } + +- VM_OBJECT_LOCK(at->object); ++ VM_OBJECT_WLOCK(at->object); + vm_object_set_memattr(at->object, attr); +- VM_OBJECT_UNLOCK(at->object); ++ VM_OBJECT_WUNLOCK(at->object); + + *private = at; + SLIST_INSERT_HEAD(&sc->alloc_list, at, list);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303160729.r2G7TrxF058661>