Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Aug 2004 13:52:24 -0400
From:      Brian Fundakowski Feldman <green@freebsd.org>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        freebsd-current@freebsd.org
Subject:   Re: New nvidia drivers available
Message-ID:  <20040815175224.GA94005@green.homeunix.org>
In-Reply-To: <200408141934.24107.dfr@nlsystems.com>
References:  <200408141934.24107.dfr@nlsystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Aug 14, 2004 at 07:34:24PM +0100, Doug Rabson wrote:
> The latest 6113 build of the nvidia graphics drivers has just appeared 
> on nvidia's web site. Check out 
> http://www.nvidia.com/object/freebsd_1.0-6113.html if you are currently 
> using the nvidia proprietary drivers. This driver works nicely on 
> FreeBSD-current and while this version is not thread-safe, it does not 
> conflict with libpthread or libthr's use of %gs so you don't have to 
> map everything down to libc_r any more :-).
> 
> There will be a thread-safe driver available for FreeBSD-current 
> sometime after I commit the pthread parts of the TLS support code.

Seems to work great other than a lock ordering issue wrt page faults.
I switched all the lockmgr() locks to sx locks and I get this:

lock order reversal
 1st 0xc1e09324 rm.mutex_lock (rm.mutex_lock) @ nvidia_os.c:609
 2nd 0xc3aec1a0 dev.api_lock (dev.api_lock) @ nvidia_subr.c:741
KDB: stack backtrace:
kdb_backtrace(c06323c2,c3aec1a0,c45f41c0,c45f41c0,c45f4386) at kdb_backtrace+0x2e
witness_checkorder(c3aec1a0,9,c45f4386,2e5,c04d78a6) at witness_checkorder+0x6b2
_sx_xlock(c3aec1a0,c45f4386,2e5,d76c07bc,c45da851) at _sx_xlock+0x7e
nv_lock_api(c3ae5700,0,d9,c3080200,c3080200) at nv_lock_api+0x29
nvidia_dev_mmap(c3080200,f0000000,d76c07dc,1,f0000) at nvidia_dev_mmap+0x31
dev_pager_getpages(c2e807bc,d76c08a4,1,0,d76c0868) at dev_pager_getpages+0xce
vm_fault(c274fb90,28a4b000,1,0,c1bb5000) at vm_fault+0x94e
trap_pfault(d76c0960,0,28a4b000,d76c0984,28a4b000) at trap_pfault+0xf7
trap(18,10,10,f0000000,c3ae5700) at trap+0x350
calltrap() at calltrap+0x5
--- trap 0xc, eip = 0xc05ff911, esp = 0xd76c09a0, ebp = 0xd76c09b0 ---
fubyte(28a4b000,2,c3f54800,d76c09f4,c443b87a) at fubyte+0x1d
nv_get_user_phys_address(28a4b000,1,0,c4430639,2000000) at nv_get_user_phys_address+0x30
_nv001233rm(c1a5c400,c3ca4000,c253bc00,c067f098,0) at _nv001233rm+0x92
_nv006271rm(c1d00002,2050200,2,0,0) at _nv006271rm+0x143
_nv006527rm(d76c0c58,4,0,c067f878,1) at _nv006527rm+0x65
_nv006196rm(c485ad20,c3977700,24,d76c0c58,c062bb0a) at _nv006196rm+0x113
rm_ioctl(c485ad20,c3977700,24,d76c0c58,c0284624) at rm_ioctl+0x1d
nvidia_handle_ioctl(c3aeb900,c0284624,d76c0c58,3,c1bb5000) at nvidia_handle_ioctl+0x73
nvidia_ctl_ioctl(c3aeb900,c0284624,d76c0c58,3,c1bb5000) at nvidia_ctl_ioctl+0xcc
spec_ioctl(d76c0b80,d76c0c2c,c0519f15,d76c0b80,1) at spec_ioctl+0x1ae
spec_vnoperate(d76c0b80,1,c06371e4,30e,c06762e0) at spec_vnoperate+0x18
vn_ioctl(c1ffc94c,c0284624,d76c0c58,c198e480,c1bb5000) at vn_ioctl+0x1b5
ioctl(c1bb5000,d76c0d14,c,d76c0d3c,3) at ioctl+0x4f2
syscall(2f,2f,2f,bfbfed4c,0) at syscall+0x272
Xint0x80_syscall() at Xint0x80_syscall+0x1f
--- syscall (54, FreeBSD ELF32, ioctl), eip = 0x2826293f, esp = 0xbfbfec8c, ebp = 0xbfbfeca8 ---

I was able to get the port going with these changes:
<http://green.homeunix.org/~green/nvidia-driver-port.tar.bz2>;

-- 
Brian Fundakowski Feldman                           \'[ FreeBSD ]''''''''''\
  <> green@FreeBSD.org                               \  The Power to Serve! \
 Opinions expressed are my own.                       \,,,,,,,,,,,,,,,,,,,,,,\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040815175224.GA94005>