summaryrefslogtreecommitdiffstats
path: root/sys/dev/agp
Commit message (Collapse)AuthorAgeFilesLines
* Correctly handle Intel g33 chips and add support for g45 chipsrnoland2008-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
* Replace all calls to minor() with dev2unit().ed2008-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
* When device_get_children returns an error, ignore that bus' children.imp2008-08-231-1/+2
|
* Enable the support for G33/Q35/Q33 now that both the G33 and Q35 have beenjhb2008-08-011-2/+0
| | | | | | | tested: PR: amd64/126090 MFC after: 1 week
* Fix PCI id for 945GME Express Integrated Graphics Controller:gonzo2008-06-201-1/+1
| | | | | | | set to 8086:27AE PR: kern/124782 Event: Bugathon#5
* Add resume support to the agp_i810 family.remko2008-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
* Calculate the number of pages the GATT spans when reading from each pagejhb2008-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
* Add the 845M GMCH controller.remko2007-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
* Move the agp(4) driver from sys/pci to sys/dev/agp. __FreeBSD_version wasjhb2007-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
* Split agp_generic_detach() up into two routines: agp_free_cdev() destroysjhb2007-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
* - Add the device ID for the VIA VT3324 (CX700) chipset.kevlo2007-09-211-21/+83
| | | | | | - Set and Get aperture size correctly for VIA's AGP3 chipsets. Approved by: re (kensmith)
* Add the PCI id for the Intel 7221's integrated graphics controller. It isalc2007-09-151-0/+2
| | | | | | | | similar to a 915G. Approved by: re (kensmith) Reviewed by: anholt MFC after: 3 weeks
* Add support for G965/Q965/GM965/GME965/GME945 AGP.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)
* Restore agp aperture size after resume, in case it is modified after boot.takawata2007-01-061-1/+8
|
* - Clean up Aperture Access Global Enable (APEN) bit access.jkim2007-01-052-50/+41
| | | | | | | | | | | - Rename confusing AGP_INTEL_I845_MCHCFG to AGP_INTEL_I845_AGPM. - Move E7205 and E7505 from i8x5 to i8x0 family. It probably worked because the actual offset is the same. In fact, all three families have the bit at the exact same place. Only differences are name and width of the registers, i.e., NBXCFG (0x50, dword), RDCR (0x51, byte), AGPM (0x51, byte), MCHCFG (0x50, word) depending on the family of the chipsets.
* Fix style(9).jkim2007-01-051-61/+52
|
* Make agp_intel capable to work after resume from S3 state.takawata2007-01-051-33/+50
|
* The page queues lock is no longer required by vm_page_busy() oralc2006-10-221-4/+0
| | | | vm_page_wakeup(). Reduce or eliminate its use accordingly.
* Fix the wraparound of memsize >=2GB.tanimura2006-10-151-2/+3
|
* Fix style(9) nits.jkim2006-10-091-38/+37
|
* Fix 32-bit PTE in the GART table.jkim2006-10-091-1/+3
| | | | Noticed by: jmg
* Add support for 945G/GM AGP chipsets.anholt2006-09-271-13/+29
| | | | | | | | | | | | | | | | | The key problem was that the aperture size detection using the MSAC bit doesn't work -- the bit appears to be set even when it shouldn't be. Linux takes a different approach, testing for a bit of the GMADR (PCIR_BAR(2)) being set. However, as I don't think that's a safe way to test aperture size, we just allocate the resource and check its size. This also pointed out that agp_generic_attach hadn't been allocating our aperture resource, which may have caused problems in some cases. Also corrected is a minor copy-and-pasteo in an error case. PR: kern/103079 Submitted by: mnag Tested on: i945GM, i915GM MFC after: 2 weeks
* Add support for another ATI IGP 340M (RS200M) AGP bridge.anholt2006-09-011-1/+4
| | | | | | PR: kern/100958 Submitted by: Kazuo Dohzono <dohzono@axion-software.com> MFC after: 1 week
* Use aperture base address from north bridge. Some BIOS does not encodejkim2006-08-211-10/+5
| | | | | | | misc. control registers correctly and it is inconsistent with north bridge. In fact, there are too many broken BIOS implementations out there and we cannot fix every possible combination but at least it is consistent with what we advertise with ioctl(2).
* Explicitly set v3 mode only when it is requested. Don't bother otherwise.jkim2006-08-111-1/+6
|
* Fix breakage of CHIP_I855 in the last revision.anholt2006-06-271-3/+4
| | | | Submitted by: Ted Faber <faber@ISI.EDU>
* Replace the three copies of the list of pci ids with a single centralized list.anholt2006-06-251-143/+122
| | | | | Add the i945 PCI IDs commented out -- I think it should just work, but it hasn't been tested yet.
* Move SiS 760 to where it belongs.jkim2006-05-302-2/+2
| | | | | PR: 98094 Submitted by: Mike M < mmcgus at yahoo dot com >
* Add support for allocating one larger than page-sized contiguous block of memoryanholt2006-05-161-26/+110
| | | | | with a physical address. This is used for hardware ARGB cursor support on newer chipsets.
* Remove various bits of conditional Alpha code and fixup a few comments.jhb2006-05-121-10/+0
|
* Add support for the Intel E7205 chipset.anholt2006-02-171-0/+6
| | | | | PR: kern/91315 Submitted by: Joerg Pulz <Joerg.Pulz@frm2.tum.de>
* Don't add an agp child in vgapci's attach routine if the PCIY_AGPjhb2006-02-011-0/+10
| | | | | | | capability is present as not all devices supported by the agp_i810 driver (such as i915) have the AGP capability. Instead, add an identify routine to the agp_i810 driver that uses the PCI ID to determine if it should create an agp child device.
* Fix a memory leak I introduced with the hostb/vgapci stuff.jhb2006-01-171-4/+8
| | | | Reported by: Coverity (via dfr's clue-bat)
* - Use PCIR_BAR() macro for the BAR for the aperture.jhb2005-12-201-7/+1
| | | | | - Axe macros used for walking PCI capabilities list. We now ask the PCI bus to find caps for us rather than doing it in the drm and agp drivers.
* - Bump FreeBSD version for the hostb(4) and vgapci(4) drivers as well asjhb2005-12-201-36/+4
| | | | | | | | | the addition of pci_find_extcap(). - Change the drm drivers to attach to vgapci. This is #ifdef'd so the code can be shared across branches. - Use pci_find_extcap() to look for AGP and PCIE capabilities in drm. - GC all the drmsub stuff for i810/i830/i915. The agp and drm devices are now both children of vgapci.
* Change the various AGP drivers that attach to the Host-PCI bridge device tojhb2005-12-208-16/+8
| | | | | | | | | attach to the hostb driver instead. This means that agp can now be loaded at runtime (in theory at least). Also, the drivers no longer have to explicity call device_verbose() to cancel out any earlier calls to device_quiet() by the hostb(4) driver (this shows a limitation in new-bus, drivers really shouldn't be doing device_quiet() until they know they are going to drive that device, i.e. in attach).
* Change the agp_find_device() to return the first agp device that has beenjhb2005-12-201-2/+11
| | | | attached to a driver rather than always returning agp0.
* Don't map the AGP aperture into contiguous KVA. The various graphicsjhb2005-12-202-4/+1
| | | | | | | | drivers already map sections into KVA as needed anyway. Note that this will probably break the nvidia driver, but I will coordinate to get that fixed. MFC after: 2 weeks
* Destroy the /dev device before destroying the mutex or releasing resourcesjhb2005-12-201-1/+2
| | | | | | rather than afterwards. MFC after: 1 week
* Use pci_find_extcap() to search for AGP capabilities (PCIY_AGP).jhb2005-12-201-25/+4
|
* Add support for i915 GMCH AGP. This diff is a combination of work by myselfanholt2005-12-022-31/+160
| | | | | | | | | | | and some fixes from Motomichi Matsuzaki. Testing involved many people, but the final, successful testing was from rwatson who endured several rounds of "it crashes at XYZ stage" "oh, please correct this typo and try again." The Linux driver, and to a small extent the limited specs, were both used as a reference for how to program the chipset. PR: kern/80396 Submitted by: Martin Mersberger
* Add support for the i855GM, tested by an r300 user.anholt2005-11-291-1/+6
|
* 0xb1881106 seems to be an AGP bridge and some BIOSes incorrectly handlejkim2005-11-141-16/+72
| | | | | the bridge. Therefore, we give the same treatment as we did for nForce3-250 and ULi chipsets. VIA AGPv3 code was copied from agp_via.c.
* - Add a work-around for nForce3-250. Aperture base address encoded in misc.jkim2005-09-272-8/+175
| | | | | | | | | | | | | | | | | control register and AGP bridge seems to be inconsistent with some BIOS. Instead of relying on BIOS settings, we just take the initial aperture size and encode them for both miscellaneous control register and AGP bridge. Some idea was borrowed from agp_nvidia.c. - Add preliminary ULi M1689 chipset support. The idea was taken from Linux because hardware and documentation are unavailable. Not tested. - Add more VIA chipset PCI IDs taken from Linux driver. Approved by: anholt (mentor) Tested by: Adam Gregoire <ebola at psychoholics dot org> Ganael Laplanche <ganael.laplanche at martymac dot com> K Wieland <kwieland at wustl dot edu>
* Add a new AGP driver for ATI IGP chipsets. The driver is based on reading ofanholt2005-09-172-0/+398
| | | | | | | | | the Linux driver, since specs are unavailable. Many thanks to Adam Kirchhoff for multiple useful testing cycles, and Ralf Wostrack for the final fix to get it working. PR: i386/75251 Submitted by: anholt
* Fix agp_nvidia.c to behave more like the linux driver, fixing DRI on Radeonanholt2005-09-161-11/+20
| | | | | | | | | | | | 9200 according to one responder. The primary issue was not setting some bits to say that the entries were active, but also fix one place where some memory wasn't being used as volatile as it should. While here, change some use of ffs to a relatively short case statement, to make it more obvious what's going on. PR: kern/71638, kern/72372, kern/71547? Submitted by: Andrew J. Caines <A.J.Caines@halplant.com>, Robin Schoonover <end@endif.cjb.net>, Jason Henson <jason@ec.rr.com>
* Make the initialization in the AGPv3 case match that of Linux. Fixes hangs onanholt2005-06-261-8/+28
| | | | | | | X startup with DRI enabled, with a v3-capable card. Tested by: Tom McLaughlin <tmclaugh@sdf.lonestar.org> Approved by: re (scottl)
* Add nForce3-250.obrien2005-04-081-0/+2
|
* nVidia AGP chipsets beyond nForce2 are AMD64-specific.obrien2005-04-022-1/+3
| | | | | | So move the AGP support to there. Submitted by: Jung-uk Kim <jkim@niksun.com>
* Add device id for the Ali M1671 host to AGP bridge.cognet2005-02-271-0/+2
|
OpenPOWER on IntegriCloud