summaryrefslogtreecommitdiffstats
path: root/sys/dev/tdfx
Commit message (Collapse)AuthorAgeFilesLines
* Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.rnoland2009-12-291-1/+2
| | | | | | | | | | | | | This replaces d_mmap() with the d_mmap2() implementation and also changes the type of offset to vm_ooffset_t. Purge d_mmap2(). All driver modules will need to be rebuilt since D_VERSION is also bumped. Reviewed by: jhb@ MFC after: Not in this lifetime...
* Let tdfx(4) use si_drv1 instead of using dev2unit().ed2009-04-141-6/+4
|
* Replace all calls to minor() with dev2unit().ed2008-09-271-3/+3
| | | | | | | | | | | | | | | After I removed all the unit2minor()/minor2unit() calls from the kernel yesterday, I realised calling minor() everywhere is quite confusing. Character devices now only have the ability to store a unit number, not a minor number. Remove the confusion by using dev2unit() everywhere. This commit could also be considered as a bug fix. A lot of drivers call minor(), while they should actually be calling dev2unit(). In -CURRENT this isn't a problem, but it turns out we never had any problem reports related to that issue in the past. I suspect not many people connect more than 256 pieces of the same hardware. Reviewed by: kib
* Add the module dependency on the mem(4) module. This will fix the modulecokane2008-03-131-0/+1
| | | | | | | | | failing to load on a kernel that has "nodevice mem" in the config. It will now properly bring in the mem(4) module. Submitted by: antoine Reviewed by: imp MFC after: 1 week
* Take the functionality contained in the former "options TDFX_LINUX"yar2006-03-032-38/+88
| | | | | | | | | | | into a separate module. Accordingly, convert the option into a device named similarly. Note for MFC: Perhaps the option should stay in RELENG_6 for POLA reasons. Suggested by: scottl Reviewed by: cokane MFC after: 5 days
* Normalize a significant number of kernel malloc type names:rwatson2005-10-311-1/+1
| | | | | | | | | | | | | | | | | | | - Prefer '_' to ' ', as it results in more easily parsed results in memory monitoring tools such as vmstat. - Remove punctuation that is incompatible with using memory type names as file names, such as '/' characters. - Disambiguate some collisions by adding subsystem prefixes to some memory types. - Generally prefer lower case to upper case. - If the same type is defined in multiple architecture directories, attempt to use the same name in additional cases. Not all instances were caught in this change, so more work is required to finish this conversion. Similar changes are required for UMA zone names.
* Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, returnimp2005-03-011-7/+7
| | | | | BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx both support so that xl will snarf them on up.
* remove dead code (inside a DEBUG ifdef)sam2005-02-221-6/+2
| | | | Submitted by: Coverity Prevent analysis tool
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-064-4/+4
|
* Do the dreaded s/dev_t/struct cdev */phk2004-06-162-5/+5
| | | | Bump __FreeBSD_version accordingly.
* Add missing <sys/module.h> includesphk2004-05-301-1/+2
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-6/+6
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Device megapatch 4/6:phk2004-02-211-0/+2
| | | | | | | | Introduce d_version field in struct cdevsw, this must always be initialized to D_VERSION. Flip sense of D_NOGIANT flag to D_NEEDGIANT, this involves removing four D_NOGIANT flags and adding 145 D_NEEDGIANT flags.
* Device megapatch 1/6:phk2004-02-212-2/+0
| | | | | | | Free approx 86 major numbers with a mostly automatically generated patch. A number of strategic drivers have been left behind by caution, and a few because they still (ab)use their major number.
* Use PCIR_BAR(x) instead of PCIR_MAPS.jhb2003-09-021-1/+1
| | | | | Glanced over by: imp, gibbs Tested by: i386 LINT
* Use __FBSDID().obrien2003-08-241-3/+4
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Remove extra ';'phk2003-05-311-2/+2
| | | | Found by: FlexeLint
* - Add vm_paddr_t, a physical address type. This is required for systemsjake2003-03-251-1/+1
| | | | | | | | | | | | | | | where physical addresses larger than virtual addresses, such as i386s with PAE. - Use this to represent physical addresses in the MI vm system and in the i386 pmap code. This also changes the paddr parameter to d_mmap_t. - Fix printf formats to handle physical addresses >4G in the i386 memory detection code, and due to kvtop returning vm_paddr_t instead of u_long. Note that this is a name change only; vm_paddr_t is still the same as vm_offset_t on all currently supported platforms. Sponsored by: DARPA, Network Associates Laboratories Discussed with: re, phk (cdevsw change)
* Gigacommit to improve device-driver source compatibility betweenphk2003-03-031-13/+6
| | | | | | | | | | | | | branches: Initialize struct cdevsw using C99 sparse initializtion and remove all initializations to default values. This patch is automatically generated and has been tested by compiling LINT with all the fields in struct cdevsw in reverse order on alpha, sparc64 and i386. Approved by: re(scottl)
* Use canonical format for cdevsw initilization.phk2003-03-021-13/+13
|
* Cleanup of the d_mmap_t interface.mux2003-02-251-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | - Get rid of the useless atop() / pmap_phys_address() detour. The device mmap handlers must now give back the physical address without atop()'ing it. - Don't borrow the physical address of the mapping in the returned int. Now we properly pass a vm_offset_t * and expect it to be filled by the mmap handler when the mapping was successful. The mmap handler must now return 0 when successful, any other value is considered as an error. Previously, returning -1 was the only way to fail. This change thus accidentally fixes some devices which were bogusly returning errno constants which would have been considered as addresses by the device pager. - Garbage collect the poorly named pmap_phys_address() now that it's no longer used. - Convert all the d_mmap_t consumers to the new API. I'm still not sure wheter we need a __FreeBSD_version bump for this, since and we didn't guarantee API/ABI stability until 5.1-RELEASE. Discussed with: alc, phk, jake Reviewed by: peter Compile-tested on: LINT (i386), GENERIC (alpha and sparc64) Runtime-tested on: i386
* Make use of UID_ROOT, GID_WHEEL for make_dev() arguments.rwatson2002-12-271-1/+1
| | | | | | | Remove the setgid bit from the 3dfx device (?). Synchronize permissions with the values in MAKEDEV for consistency. Submitted by: kris
* Print pointers with %p instead of casting them to an unsigned int andjhb2002-11-071-2/+2
| | | | | then printing them with 0x%x which doesn't work when sizeof(void *) > sizeof(int).
* Disabuse this driver of the notion that it needs to includephk2002-09-282-4/+2
| | | | | | <sys/bus_private.h> to find the unit from a device_t. Spotted by: FlexeLint
* In continuation of early fileop credential changes, modify fo_ioctl() torwatson2002-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | accept an 'active_cred' argument reflecting the credential of the thread initiating the ioctl operation. - Change fo_ioctl() to accept active_cred; change consumers of the fo_ioctl() interface to generally pass active_cred from td->td_ucred. - In fifofs, initialize filetmp.f_cred to ap->a_cred so that the invocations of soo_ioctl() are provided access to the calling f_cred. Pass ap->a_td->td_ucred as the active_cred, but note that this is required because we don't yet distinguish file_cred and active_cred in invoking VOP's. - Update kqueue_ioctl() for its new argument. - Update pipe_ioctl() for its new argument, pass active_cred rather than td_ucred to MAC for authorization. - Update soo_ioctl() for its new argument. - Update vn_ioctl() for its new argument, use active_cred rather than td->td_ucred to authorize VOP_IOCTL() and the associated VOP_GETATTR(). Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Don't put a line break in string literals. GCC 3.1 complains and GCCmarcel2002-04-201-2/+2
| | | | 3.2 drops the ball.
* Replace ffind_* with fget calls.alfred2002-01-141-3/+2
| | | | | | | | Make fget MPsafe. Make fgetvp and fgetsock use the fget subsystem to reduce code bloat. Push giant down in fpathconf().
* SMP Lock struct file, filedesc and the global file list.alfred2002-01-131-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Seigo Tanimura (tanimura) posted the initial delta. I've polished it quite a bit reducing the need for locking and adapting it for KSE. Locks: 1 mutex in each filedesc protects all the fields. protects "struct file" initialization, while a struct file is being changed from &badfileops -> &pipeops or something the filedesc should be locked. 1 mutex in each struct file protects the refcount fields. doesn't protect anything else. the flags used for garbage collection have been moved to f_gcflag which was the FILLER short, this doesn't need locking because the garbage collection is a single threaded container. could likely be made to use a pool mutex. 1 sx lock for the global filelist. struct file * fhold(struct file *fp); /* increments reference count on a file */ struct file * fhold_locked(struct file *fp); /* like fhold but expects file to locked */ struct file * ffind_hold(struct thread *, int fd); /* finds the struct file in thread, adds one reference and returns it unlocked */ struct file * ffind_lock(struct thread *, int fd); /* ffind_hold, but returns file locked */ I still have to smp-safe the fget cruft, I'll get to that asap.
* KSE Milestone 2julian2001-09-121-14/+14
| | | | | | | | | | | | | | Note ALL MODULES MUST BE RECOMPILED make the kernel aware that there are smaller units of scheduling than the process. (but only allow one thread per process at this time). This is functionally equivalent to teh previousl -current except that there is a thread associated with each process. Sorry john! (your next MFC will be a doosie!) Reviewed by: peter@freebsd.org, dillon@freebsd.org X-MFC after: ha ha ha ha
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-1/+0
| | | | the bit-bucket.
* Update copyright info, and make some slight cosmetic changes.cokane2001-03-204-10/+6
|
* Change Voodoo Graphics device ID to 0x0001121a so it gets probed.cokane2001-03-201-3/+3
|
* Zap silly #if NPCI > 0 and the hoops that we jump through for the modulepeter2001-01-291-9/+0
| | | | | case. Use an 'and' case in conf/files so that it only gets compiled if pci is present.
* Added some handling code to work with SLI configs, and removed some unusedcokane2000-10-101-17/+28
| | | | older code that was phased out but not removed, heh.
* Removed detection for Voodoo Banshee and Voodoo3 cards. I forsee certaincokane2000-08-282-16/+43
| | | | | | | | | possible complications with the forthcoming DRI code, and feel that DRI should handle the device-level interaction. Read http://people.FreeBSD.org/~cokane/3dfx.html to find out more. Basically want to move toward using OpenGL and DRI for everything on these cards. Added a few defines and spacing style fixes in tdfx_vars.h
* Update include directives for Linuxulator headers after themarcel2000-08-221-3/+3
| | | | MD/MI split.
* Bring tdfx_pci.c in sync with some patches I have been testing. Adds bettercokane2000-08-011-6/+8
| | | | | stability for the Voodoo3/Banshee cards than there was before. Still has a little way to go before it is completely fixed for those cards though.
* Studied the tech docs for the Voodoo3 and Banshee, and hopefully fixed thecokane2000-07-193-21/+88
| | | | | | | | | | errors that plagued those cards with XFree86 4.0. They have two memory ranges as well as an IO port range to them. Also cleaned up the three warning messages that I got, from inb(), outb() and linuxulator. Also, I noticed that the DRI and Glide support for the Voodoo4 and 5 has been placed upon linux.3dfx.com, too bad they haven't released the tech docs yet. Apparently, they are still pushing glide for all of us, so I will try and add support once those tech docs are up.
* Stupid me, I put the opt_tdfx.h underneath a test for TDFX_LINUX, whichcokane2000-06-242-4/+9
| | | | | resides in opt_tdfx. I also cleand up that large define. Compile, tell me if it does, and I'll re-enable the tdfx entry in the makefile.
* Finish up the fixing of the linux ioctl stuff. Add line to remove the devcokane2000-06-232-1/+6
| | | | entry upon unload.
* Minor redundant #include fix.cokane2000-06-231-1/+0
|
* Fixed problem with linux ioctl code, module loading should work now.cokane2000-06-232-0/+59
|
* Put RF_SHAREABLE into the bus_alloc_resource call.cokane2000-06-221-1/+1
|
* Stick in header, $FreeBSD$.cokane2000-06-224-28/+188
|
* This really shouldn't be here, fragment left over from the tarball.cokane2000-06-211-2/+0
|
* First import of my 3dfx voodoo driver. Currently it supports the Voodoo ↵cokane2000-06-215-0/+876
Graphics and Voodoo2 perfectly. It works just like the 3dfx driver does for linux, by using a character device at /dev/3dfx of Major 107 to provide a window into the 3dfx card's memory space. This interface is used by glide and mesa as far as i know, and probably some other libraries too. Approved by: jkh
OpenPOWER on IntegriCloud