summaryrefslogtreecommitdiffstats
path: root/sys/dev/agp
Commit message (Collapse)AuthorAgeFilesLines
* MFC r313982, r314068:pfg2017-03-141-1/+1
| | | | | | sys: Replace zero with NULL for pointers. Found with: devel/coccinelle
* sys: use our roundup2/rounddown2() macros when param.h is available.pfg2016-04-211-3/+3
| | | | | | | | | | rounddown2 tends to produce longer lines than the original code and when the code has a high indentation level it was not really advantageous to do the replacement. This tries to strike a balance between readability using the macros and flexibility of having the expressions, so not everything is converted.
* dev/agp: use our nitems() macro when it is avaliable through param.h.pfg2016-04-193-10/+9
| | | | | | Consistently capitalize the macros used in the driver. No functional change.
* agp: Do not attach to Intel GEN6+dumbbell2016-03-122-531/+33
| | | | | | | | | | | | | The i915 video driver doesn't depend on agp(4) anymore for Sandybridge and later GPUs. Therefore, there is no need to attach agp(4) to those devices. While here, fix `agp_i965_res_spec` to include the aperture base for GEN4 and GEN5. Reviewed by: kib Approved by: kib Differential Revision: https://reviews.freebsd.org/D5586
* drm/i915: Update to match Linux 3.8.13dumbbell2016-03-082-31/+223
| | | | | | | | | This update brings initial support for Haswell GPUs. Tested by: Many users of FreeBSD, PC-BSD and HardenedBSD Relnotes: yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D5554
* Remove break after return.kevlo2015-01-231-5/+5
|
* Initial attachment of the agp(4) to Haswell IGP. There is no handlingkib2014-11-111-0/+58
| | | | | | | of cacheablility control bits in GTT PTEs yet. Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Based on some BIOS configuration (GGC register in host bridge, bit 1),kib2014-11-111-1/+2
| | | | | | | | | | IGP may declare subclass as either VGA-compatible, or non-VGA. The difference is that in the later case, IGP does not claim VGA cycles. Other than that, the device functions normally, and agp_i810 should attach to it. Sponsored by: The FreeBSD Foundation MFC after: 1 week
* On 965 and higher, map GTT as write-combining.kib2014-11-111-8/+43
| | | | | Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Revert agp_intel.c part of the r274040 for now. There is a confusionkib2014-11-041-0/+95
| | | | | | | | | | | on my part about north bridge/GPU pci ids and use of aperture. Leave the agp_intel.c out of static compilation on amd64, it makes the things consistent with agp.ko. Pointed out by: tijl Sponsored by: The FreeBSD Foundation MFC after: 13 days
* agp_intel.c provides support for AGP on Intel chipsets from 440/BX tokib2014-11-031-95/+0
| | | | | | | | | | | | | | | 875. This intersects with the agp_i810.c, which supports all Intels from i810 to Core i5/7. Both agp_intel.c and agp_i810.c are compiled into kernel when device agp is specified in config, and agp_i810 attach seems to be selected by chance due to linking order. Strip support for 810 and later from agp_intel.c. Since 440-class chipsets do not support any long-mode capable CPUs, remove agp_intel.c from amd64 kernel file list. Note that agp_intel.c is not compiled into agp.ko on amd64 already. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* - agp_generic_unbind_memory: flush AGP TLB before unwiring pagestijl2014-11-021-2/+5
| | | | | | - agp_bind_pages: assert that pages have been wired down MFC after: 1 month
* In agp_amd_bind_page don't flush the AGP TLB. It's done by the callingtijl2014-11-021-3/+0
| | | | function.
* In agp(4) avoid the need to flush all cpu caches with wbinvd betweentijl2014-11-027-65/+40
| | | | | | | | | | | | | | | updating the GTT and flushing the AGP TLB by storing the GTT in write-combining memory. On x86 flushing the AGP TLB is done by an I/O operation or a store to a MMIO register in uncacheable memory. Both cases imply that WC buffers are flushed so no memory barriers are needed. On powerpc there is no WC memory type. It maps to uncacheable memory and two stores to uncacheable memory, such as to the GTT and then to an MMIO register, are strongly ordered, so no memory barriers are needed either. MFC after: 1 month
* Avoid possible overflow in agp_generic_alloc_memory.tijl2014-10-301-1/+1
| | | | MFC after: 1 week
* Add two new functions to the AGP driver KPI to bind/unbind arbitrary setstijl2014-10-302-0/+86
| | | | | | | of pages into the GTT. Reviewed by: kib MFC after: 1 month
* - Modify vm_page_unwire() and vm_page_enqueue() to directly acceptattilio2014-06-162-3/+3
| | | | | | | | | | | | | | | | | | the queue where to enqueue pages that are going to be unwired. - Add stronger checks to the enqueue/dequeue for the pagequeues when adding and removing pages to them. Of course, for unmanaged pages the queue parameter of vm_page_unwire() will be ignored, just as the active parameter today. This makes adding new pagequeues quicker. This change effectively modifies the KPI. __FreeBSD_version will be, however, bumped just when the full cache of free pages will be evicted. Sponsored by: EMC / Isilon storage division Reviewed by: alc Tested by: pho
* Fix undefined behavior: (1 << 31) is not defined as 1 is an int and thiseadler2013-11-301-2/+2
| | | | | | | | | | | | | shifts into the sign bit. Instead use (1U << 31) which gets the expected result. This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases. A similar change was made in OpenBSD. Discussed with: -arch, rdivacky Reviewed by: cperciva
* Remove the deprecated VM_ALLOC_RETRY flag for the vm_page_grab(9).kib2013-08-222-2/+2
| | | | | | | | The flag was mandatory since r209792, where vm_page_grab(9) was changed to only support the alloc retry semantic. Suggested and reviewed by: alc Sponsored by: The FreeBSD Foundation
* The soft and hard busy mechanism rely on the vm object lock to work.attilio2013-08-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unify the 2 concept into a real, minimal, sxlock where the shared acquisition represent the soft busy and the exclusive acquisition represent the hard busy. The old VPO_WANTED mechanism becames the hard-path for this new lock and it becomes per-page rather than per-object. The vm_object lock becames an interlock for this functionality: it can be held in both read or write mode. However, if the vm_object lock is held in read mode while acquiring or releasing the busy state, the thread owner cannot make any assumption on the busy state unless it is also busying it. Also: - Add a new flag to directly shared busy pages while vm_page_alloc and vm_page_grab are being executed. This will be very helpful once these functions happen under a read object lock. - Move the swapping sleep into its own per-object flag The KPI is heavilly changed this is why the version is bumped. It is very likely that some VM ports users will need to change their own code. Sponsored by: EMC / Isilon storage division Discussed with: alc Reviewed by: jeff, kib Tested by: gavin, bapt (older version) Tested by: pho, scottl
* Hide the details for the assertion for VM_OBJECT_LOCK operations.attilio2013-02-211-1/+1
| | | | | | | | Rename current VM_OBJECT_LOCK_ASSERT(foo, RA_WLOCKED) into VM_OBJECT_ASSERT_WLOCKED(foo) Sponsored by: EMC / Isilon storage division Requested by: alc
* Rename VM_OBJECT_LOCK(), VM_OBJECT_UNLOCK() and VM_OBJECT_TRYLOCK() toattilio2013-02-202-12/+12
| | | | | | their "write" versions. Sponsored by: EMC / Isilon storage division
* Switch vm_object lock to be a rwlock.attilio2013-02-202-1/+3
| | | | | | | | * VM_OBJECT_LOCK and VM_OBJECT_UNLOCK are mapped to write operations * VM_OBJECT_SLEEP() is introduced as a general purpose primitve to get a sleep operation using a VM_OBJECT_LOCK() as protection * The approach must bear with vm_pager.h namespace pollution so many files require including directly rwlock.h
* Fix reversed condition in the logic to wait for the chipset bufferskib2013-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
* Remove unneeded semicolons.antoine2013-01-017-8/+8
| | | | Reviewed by: md5 of the object files
* Add pci id for the xeon hd4000 (IvyBridge server GT2)bapt2012-12-111-0/+5
| | | | | | Submitted by: François Tigeot <ftigeot@wolfpond.org> Obtained from: dragonfly MFC after: 3 days
* Remove unneeded header from agp: opt_bus.headler2012-11-1511-21/+0
| | | | | | | Tested with "make universe" Approved by: cperciva MFC after: 1 week
* This isn't functionally identical. In some cases a hint to disableeadler2012-10-229-0/+19
| | | | | | | | unit 0 would in fact disable all units. This reverts r241856 Approved by: cperciva (implicit)
* Now that device disabling is generic, remove extraneous code from theeadler2012-10-229-19/+0
| | | | | | | | device drivers that used to provide this feature. Reviewed by: des Approved by: cperciva MFC after: 1 week
* After the PHYS_TO_VM_PAGE() function was de-inlined, the main reasonkib2012-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
* Revert revision 238172 of agp_i810.c. Correctness is considered moremarcel2012-07-091-1/+2
| | | | | | important than avoiding confusion. Feedback from: kib, jhb
* agp.c:marcel2012-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
* Correct device id for GPU on some server SandyBridge model.kib2012-06-231-1/+1
| | | | | Submitted and tested by: Thomas Zander <thomas.e.zander googlemail com> MFC after: 3 days
* A rewrite of the i810 bits of the agp(4) driver. New driver supportskib2012-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
* Do a sweep of the tree replacing calls to pci_find_extcap() with calls tojhb2011-03-231-1/+1
| | | | pci_find_cap() instead.
* Add a driver for the Apple Uninorth AGP host bridge found in all PowerPCnwhitehorn2010-10-312-11/+325
| | | | Macintoshes with an AGP bus.
* Do not mention VM_ALLOC_RETRY in comment, and normalize the terminologykib2010-07-081-2/+2
| | | | | | | (blocking -> sleeping). Reviewed by: alc MFC after: 3 days
* Add a missing linefeedbrian2010-06-191-1/+1
| | | | | | PR: 147337 Submitted by: cyberleo at cyberleo dot net MFC after: 1 week
* Push down the acquisition of the page queues lock into vm_page_unwire().alc2010-05-052-6/+0
| | | | | | | Update the comment describing which lock should be held on entry to vm_page_wire(). Reviewed by: kib
* Acquire the page lock around vm_page_unwire(). For consistency, extend thealc2010-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
* Add support of Intel Pineview chips, aka IGD.rnoland2010-03-121-4/+20
| | | | MFC after: 3 days
* Add pci ids for Intel Ironlake chipsets.rnoland2010-03-121-0/+4
| | | | | | | | These behave just like g45 for agp. Tested by: Torfinn Ingolfsen MFC after: 3 days
* Remove extraneous semicolons, no functional changes.mbr2010-01-071-1/+1
| | | | | Submitted by: Marc Balmer <marc@msys.ch> MFC after: 1 week
* 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...
* Fix a handful of issues with via agp support.rnoland2009-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
* Add pci id's for Intel G41 chipsetrnoland2009-10-111-0/+2
| | | | | Submitted by: Artyom Mirgorodsky <man@email.com.ua> MFC after: 3 days
* John Baldwin suggested that 'stolen memory' only happens in the case ofn_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
* Move the printing of aperture size and stolen memory behind bootverbose.n_hibma2009-09-101-9/+9
| | | | | | None of the other AGP drivers actually displays this information at all, MFC after: 1 week
* strict kobj signatures: fixes in agp driveravg2009-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)
* Use si_drv1 instead of dev2unit() inside agp(4).ed2009-04-141-10/+6
| | | | Reviewed by: rnoland
OpenPOWER on IntegriCloud