aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/agp
Commit message (Collapse)AuthorAgeFilesLines
* Switch the vm_object mutex to be a rwlock. This will enable in theAttilio Rao2013-03-092-13/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | future further optimizations where the vm_object lock will be held in read mode most of the time the page cache resident pool of pages are accessed for reading purposes. The change is mostly mechanical but few notes are reported: * The KPI changes as follow: - VM_OBJECT_LOCK() -> VM_OBJECT_WLOCK() - VM_OBJECT_TRYLOCK() -> VM_OBJECT_TRYWLOCK() - VM_OBJECT_UNLOCK() -> VM_OBJECT_WUNLOCK() - VM_OBJECT_LOCK_ASSERT(MA_OWNED) -> VM_OBJECT_ASSERT_WLOCKED() (in order to avoid visibility of implementation details) - The read-mode operations are added: VM_OBJECT_RLOCK(), VM_OBJECT_TRYRLOCK(), VM_OBJECT_RUNLOCK(), VM_OBJECT_ASSERT_RLOCKED(), VM_OBJECT_ASSERT_LOCKED() * The vm/vm_pager.h namespace pollution avoidance (forcing requiring sys/mutex.h in consumers directly to cater its inlining functions using VM_OBJECT_LOCK()) imposes that all the vm/vm_pager.h consumers now must include also sys/rwlock.h. * zfs requires a quite convoluted fix to include FreeBSD rwlocks into the compat layer because the name clash between FreeBSD and solaris versions must be avoided. At this purpose zfs redefines the vm_object locking functions directly, isolating the FreeBSD components in specific compat stubs. The KPI results heavilly broken by this commit. Thirdy part ports must be updated accordingly (I can think off-hand of VirtualBox, for example). Sponsored by: EMC / Isilon storage division Reviewed by: jeff Reviewed by: pjd (ZFS specific review) Discussed with: alc Tested by: pho Notes: svn path=/head/; revision=248084
* Fix reversed condition in the logic to wait for the chipset buffersKonstantin Belousov2013-01-271-1/+1
| | | | | | | | | | | flush wait on the Gen2 chipsets. Confirmed by the inspection of the Linux agp code. Submitted by: Taku YAMAMOTO <taku@tackymt.homeip.net> MFC after: 2 weeks Notes: svn path=/head/; revision=245976
* Remove unneeded semicolons.Antoine Brodin2013-01-017-8/+8
| | | | | | | Reviewed by: md5 of the object files Notes: svn path=/head/; revision=244926
* Add pci id for the xeon hd4000 (IvyBridge server GT2)Baptiste Daroussin2012-12-111-0/+5
| | | | | | | | | Submitted by: François Tigeot <ftigeot@wolfpond.org> Obtained from: dragonfly MFC after: 3 days Notes: svn path=/head/; revision=244114
* Remove unneeded header from agp: opt_bus.hEitan Adler2012-11-1511-21/+0
| | | | | | | | | | Tested with "make universe" Approved by: cperciva MFC after: 1 week Notes: svn path=/head/; revision=243095
* This isn't functionally identical. In some cases a hint to disableEitan Adler2012-10-229-0/+19
| | | | | | | | | | | unit 0 would in fact disable all units. This reverts r241856 Approved by: cperciva (implicit) Notes: svn path=/head/; revision=241885
* Now that device disabling is generic, remove extraneous code from theEitan Adler2012-10-229-19/+0
| | | | | | | | | | | device drivers that used to provide this feature. Reviewed by: des Approved by: cperciva MFC after: 1 week Notes: svn path=/head/; revision=241856
* After the PHYS_TO_VM_PAGE() function was de-inlined, the main reasonKonstantin Belousov2012-08-052-0/+2
| | | | | | | | | | | | | | | | to pull vm_param.h was removed. Other big dependency of vm_page.h on vm_param.h are PA_LOCK* definitions, which are only needed for in-kernel code, because modules use KBI-safe functions to lock the pages. Stop including vm_param.h into vm_page.h. Include vm_param.h explicitely for the kernel code which needs it. Suggested and reviewed by: alc MFC after: 2 weeks Notes: svn path=/head/; revision=239065
* Revert revision 238172 of agp_i810.c. Correctness is considered moreMarcel Moolenaar2012-07-091-1/+2
| | | | | | | | | important than avoiding confusion. Feedback from: kib, jhb Notes: svn path=/head/; revision=238301
* agp.c:Marcel Moolenaar2012-07-062-4/+2
| | | | | | | | | | | | | | | | | | | | | | Don't use Maxmem when the amount of memory is meant. Use realmem instead. Maxmem is not only a MD variable, it represents the highest physical memory address in use. On systems where memory is sparsely layed-out the highest memory address and the amount of memory are not interchangeable. Scaling the AGP aperture based on the actual amount of memory (= realmem) rather than the available memory (= physmem) makes sure there's consistent behaviour across architectures. agp_i810.c: While arguably the use of Maxmem can be considered correct, replace its use with realmem anyway. agp_i810.c is specific to amd64, i386 & pc98, which have a dense physical memory layout. Avoiding Maxmem here is done with an eye on copy-n-paste behaviour in general and to avoid confusion caused by using realmem in agp.c and Maxmem in agp_i810.c. In both cases, remove the inclusion of md_var.h Notes: svn path=/head/; revision=238172
* Correct device id for GPU on some server SandyBridge model.Konstantin Belousov2012-06-231-1/+1
| | | | | | | | Submitted and tested by: Thomas Zander <thomas.e.zander googlemail com> MFC after: 3 days Notes: svn path=/head/; revision=237484
* A rewrite of the i810 bits of the agp(4) driver. New driver supportsKonstantin Belousov2012-05-227-638/+2260
| | | | | | | | | | | operations required by GEMified i915.ko. It also attaches to SandyBridge and IvyBridge CPU northbridges now. Sponsored by: The FreeBSD Foundation MFC after: 1 month Notes: svn path=/head/; revision=235782
* Do a sweep of the tree replacing calls to pci_find_extcap() with calls toJohn Baldwin2011-03-231-1/+1
| | | | | | | pci_find_cap() instead. Notes: svn path=/head/; revision=219902
* Add a driver for the Apple Uninorth AGP host bridge found in all PowerPCNathan Whitehorn2010-10-312-11/+325
| | | | | | | Macintoshes with an AGP bus. Notes: svn path=/head/; revision=214603
* Do not mention VM_ALLOC_RETRY in comment, and normalize the terminologyKonstantin Belousov2010-07-081-2/+2
| | | | | | | | | | (blocking -> sleeping). Reviewed by: alc MFC after: 3 days Notes: svn path=/head/; revision=209793
* Add a missing linefeedBrian Somers2010-06-191-1/+1
| | | | | | | | | PR: 147337 Submitted by: cyberleo at cyberleo dot net MFC after: 1 week Notes: svn path=/head/; revision=209329
* Push down the acquisition of the page queues lock into vm_page_unwire().Alan Cox2010-05-052-6/+0
| | | | | | | | | | Update the comment describing which lock should be held on entry to vm_page_wire(). Reviewed by: kib Notes: svn path=/head/; revision=207644
* Acquire the page lock around vm_page_unwire(). For consistency, extend theAlan Cox2010-05-032-1/+7
| | | | | | | | | | | scope of the object lock in agp_i810.c. (In this specific case, the scope of the object lock shouldn't matter, but I don't want to create a bad example that might be copied to a case where it did matter.) Reviewed by: kib Notes: svn path=/head/; revision=207574
* Add support of Intel Pineview chips, aka IGD.Robert Noland2010-03-121-4/+20
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=205102
* Add pci ids for Intel Ironlake chipsets.Robert Noland2010-03-121-0/+4
| | | | | | | | | | | These behave just like g45 for agp. Tested by: Torfinn Ingolfsen MFC after: 3 days Notes: svn path=/head/; revision=205096
* Remove extraneous semicolons, no functional changes.Martin Blapp2010-01-071-1/+1
| | | | | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week Notes: svn path=/head/; revision=201758
* Update d_mmap() to accept vm_ooffset_t and vm_memattr_t.Robert Noland2009-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... Notes: svn path=/head/; revision=201223
* Fix a handful of issues with via agp support.Robert Noland2009-12-211-32/+24
| | | | | | | | | | | | | | | | * Read the pci capability register to identify AGP 3 support * Add missing smaller aperture sizes for AGP3 chips. * Fix the aperture size calculation on AGP2 chips. All sizes between 32M and 256M reported as 256M. * Add \n to error string. This all seems to get the CLE266 EPIA-M board agp working properly, now back to work on drm. MFC after: 2 weeks Notes: svn path=/head/; revision=200764
* Add pci id's for Intel G41 chipsetRobert Noland2009-10-111-0/+2
| | | | | | | | Submitted by: Artyom Mirgorodsky <man@email.com.ua> MFC after: 3 days Notes: svn path=/head/; revision=197950
* John Baldwin suggested that 'stolen memory' only happens in the case ofNick Hibma2009-09-141-8/+6
| | | | | | | | | | i810 and therefore is useful info there. Aperture size and stolen memory are now printed on one line. Submitted by: jhb Notes: svn path=/head/; revision=197191
* Move the printing of aperture size and stolen memory behind bootverbose.Nick Hibma2009-09-101-9/+9
| | | | | | | | | None of the other AGP drivers actually displays this information at all, MFC after: 1 week Notes: svn path=/head/; revision=197076
* strict kobj signatures: fixes in agp driverAndriy Gapon2009-06-115-26/+24
| | | | | | | | | | offset parameter has vm_offset_t type in calling code and in kobj method Reviewed by: imp, rnoland, lulf, current@ Approved by: jhb (mentor) Notes: svn path=/head/; revision=194017
* Use si_drv1 instead of dev2unit() inside agp(4).Ed Schouten2009-04-141-10/+6
| | | | | | | Reviewed by: rnoland Notes: svn path=/head/; revision=191057
* vm_offset_t is unsigned and therefore can not be negative.Robert Noland2009-03-205-10/+10
| | | | | | | | | | | | Avoid unnessecary compares. Found with: Coverity Prevent(tm) CID: 2362,4215,4214,4209,4208,2363,4211,4210,4213,4212 MFC after: 3 days Notes: svn path=/head/; revision=190169
* Fix prototypes to be consistent.Warner Losh2009-03-096-11/+11
| | | | Notes: svn path=/head/; revision=189578
* Fix AGP debugging code:Wojciech A. Koszek2009-02-061-3/+4
| | | | | | | | | | | | | | | - correct format strings - fill opt_agp.h if AGP_DEBUG is defined - bring AGP_DEBUG to LINT by mentioning it in NOTES This should hopefully fix a warning that was... Found by: Coverity Prevent(tm) CID: 3676 Tested on: amd64, i386 Notes: svn path=/head/; revision=188247
* - Add few VIA bridges to agp_via.c and connect it to amd64 buildJung-uk Kim2009-01-231-0/+9
| | | | | | | | as they support Intel Core/Core 2 and VIA Nano processors. - Align "optional agp" in conf/files.* for consistency while I am here. Notes: svn path=/head/; revision=187633
* Add support for AMD64 Family 10h processors.Jung-uk Kim2009-01-121-3/+5
| | | | | | | | PR: kern/128331 MFC after: 3 days Notes: svn path=/head/; revision=187100
* Fix up handling of Intel G4X chips some more.Robert Noland2008-12-231-5/+12
| | | | | | | | | | | | | | Note that you need at least xf86-video-intel 2.4.3 for this to work. The G4X doesn't put the GATT into the same area of stolen memory as all the other chips and older versions of the driver didn't handle that properly. Tested by: ganbold Approved by: kib MFC after: 2 weeks Notes: svn path=/head/; revision=186434
* Clear busy state on the pages which are after the one that failed the bindKonstantin Belousov2008-12-231-3/+5
| | | | | | | | | | | attempt. Reported and tested by: ganbold Reviewed by: rnoland MFC after: 2 weeks Notes: svn path=/head/; revision=186433
* Deal with 0 length args...Robert Noland2008-12-211-1/+1
| | | | | | | Approved by: kib Notes: svn path=/head/; revision=186385
* Fix AGP_DEBUG macro to use c99 __VA_ARGS__ and build if enabled.Robert Noland2008-12-211-6/+3
| | | | | | | Approved by: kib Notes: svn path=/head/; revision=186384
* Correctly handle Intel g33 chips and add support for g45 chipsRobert Noland2008-10-022-19/+135
| | | | | | | | | | | g33 based chips use a different method of identifying the gtt size. g45 based chips gtt is located in a different area of stolen memory. Approved by: jhb (mentor) MFC after: 2 weeks Notes: svn path=/head/; revision=183555
* Replace all calls to minor() with dev2unit().Ed Schouten2008-09-271-1/+1
| | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=183397
* When device_get_children returns an error, ignore that bus' children.Warner Losh2008-08-231-1/+2
| | | | Notes: svn path=/head/; revision=182068
* Enable the support for G33/Q35/Q33 now that both the G33 and Q35 have beenJohn Baldwin2008-08-011-2/+0
| | | | | | | | | | tested: PR: amd64/126090 MFC after: 1 week Notes: svn path=/head/; revision=181124
* Fix PCI id for 945GME Express Integrated Graphics Controller:Oleksandr Tymoshenko2008-06-201-1/+1
| | | | | | | | | | set to 8086:27AE PR: kern/124782 Event: Bugathon#5 Notes: svn path=/head/; revision=179901
* Add resume support to the agp_i810 family.Remko Lodder2008-03-121-0/+17
| | | | | | | | | | Submitted by: "Robert Noland" <rnoland at 2hip dot net> Reviewed by: anholt Approved by: anholt, imp (mentor) MFC after: 1 week Notes: svn path=/head/; revision=177115
* Calculate the number of pages the GATT spans when reading from each pageJohn Baldwin2008-03-071-3/+4
| | | | | | | | | | | | | | | to flush the TLB instead of hardcoding a size of 33 pages. Apertures of 32MB and 64MB only use a 16 page GATT and an aperture of 128MB only uses a 32 page GATT, so without this the code could walk off the end of the pointer and cause a page fault if the next page was unmapped. Also, for aperture sizes > 128MB, not all of the pages would be read. The Linux driver has the same bug. MFC after: 1 week Tested by: Frédéric PRACA frederic.praca of freebsd-fr.org Notes: svn path=/head/; revision=176896
* Add the 845M GMCH controller.Remko Lodder2007-11-261-0/+2
| | | | | | | | | | PR: 114802 Approved by: imp (mentor), anholt (private mail) Submitted by: Alex Goncharov <algo1 at comcast dot net> MFC After: 3 days Notes: svn path=/head/; revision=173946
* Move the agp(4) driver from sys/pci to sys/dev/agp. __FreeBSD_version wasJohn Baldwin2007-11-1213-25/+25
| | | | | | | | | | | | bumped to 800004 to note the change though userland apps should not be affected since they use <sys/agpio.h> rather than the headers in sys/dev/agp. Discussed with: anholt Repocopy by: simon Notes: svn path=/head/; revision=173573
* Split agp_generic_detach() up into two routines: agp_free_cdev() destroysJohn Baldwin2007-10-3011-38/+39
| | | | | | | | | | | | /dev/agpgart and agp_free_res() frees resources like the BAR for the aperture. Splitting this up lets chipset-specific detach routines manipulate the aperture during their detach routines without panicing. MFC after: 1 week Reviewed by: anholt Notes: svn path=/head/; revision=173203
* - Add the device ID for the VIA VT3324 (CX700) chipset.Kevin Lo2007-09-211-21/+83
| | | | | | | | | - Set and Get aperture size correctly for VIA's AGP3 chipsets. Approved by: re (kensmith) Notes: svn path=/head/; revision=172262
* Add the PCI id for the Intel 7221's integrated graphics controller. It isAlan Cox2007-09-151-0/+2
| | | | | | | | | | | similar to a 915G. Approved by: re (kensmith) Reviewed by: anholt MFC after: 3 weeks Notes: svn path=/head/; revision=172187
* Add support for G965/Q965/GM965/GME965/GME945 AGP.Eric Anholt2007-07-134-230/+387
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a function to agp.c to set the aperture resource ID if it's not the usual AGP_APBASE. Previously, agp.c had been assuming AGP_APBASE, which resulted in incorrect agp_info, and contortions by agp_i810.c to work around it. This also adds functions to agp.c for default AGP_GET_APERTURE() and AGP_SET_APERTURE(), which return the aperture resource size and disallow aperture size changes. Moving to these for our AGP drivers will likely result in stability improvements. This should fix 855-class aperture size detection. Additionally, refuse to attach agp_i810 when some RAM is above 4GB and the GART can't reference memory that high. This should be very rare. The correct solution would be bus_dma conversion for agp, which is beyond the scope of this change. Other AGP drivers could likely use this change as well. G33/Q35/Q33 AGP support is also included, but disconnected by default due to lack of testing. PR: kern/109724 (855 aperture issue) Submitted by: FUJIMOTO Kou<fujimoto@j.dendai.ac.jp> Approved by: re (hrs) Notes: svn path=/head/; revision=171433