summaryrefslogtreecommitdiff
path: root/sys/dev/pci/agp.c
AgeCommit message (Collapse)Author
2022-05-22fix various small typos, mainly in comments.andvar
2019-11-10in many device attach paths, allocate memory with M_WAITOK instead of M_NOWAITchs
and remove code to handle failures that can no longer happen.
2019-10-15 Use unsigned to avoid undefined behavior in agpattach(). Found by kUBSan.msaitoh
2018-08-27Fill struct agp_info::ai_devid with the PCI id.riastradh
2017-02-27 Decode AGP capability.msaitoh
2014-07-25Add d_discard to all struct cdevsw instances I could find.dholland
All have been set to "nodiscard"; some should get a real implementation.
2014-06-12Extend agp_generic_bind_memory with bounds to check.riastradh
New routine agp_generic_bind_memory_bounded. Use it in agp_i810 to replace the pile of code I wrote as a replacement which is apparently broken.
2014-03-16Change (mostly mechanically) every cdevsw/bdevsw I can find to usedholland
designated initializers. I have not built every extant kernel so I have probably broken at least one build; however I've also found and fixed some wrong cdevsw/bdevsw entries so even if so I think we come out ahead.
2012-04-06device_pmf_is_registered() is not requiredplunky
2011-04-04Neither pci_dma64_available(), pci_probe_device(), pci_mapreg_map(9),dyoung
pci_find_rom(), pci_intr_map(9), pci_enumerate_bus(), nor the match predicate passed to pciide_compat_intr_establish() should ever modify their pci_attach_args argument, so make their pci_attach_args arguments const and deal with the fallout throughout the kernel. For the most part, these changes add a 'const' where there was no 'const' before, however, some drivers and MD code used to modify pci_attach_args. Now those drivers either copy their pci_attach_args and modify the copy, or refrain from modifying pci_attach_args: Xen: according to Manuel Bouyer, writing to pci_attach_args in pci_intr_map() was a leftover from Xen 2. Probably a bug. I stopped writing it. I have not tested this change. siside(4): sis_hostbr_match() needlessly wrote to pci_attach_args. Probably a bug. I use a temporary variable. I have not tested this change. slide(4): sl82c105_chip_map() overwrote the caller's pci_attach_args. Probably a bug. Use a local pci_attach_args. I have not tested this change. viaide(4): via_sata_chip_map() and via_sata_chip_map_new() overwrote the caller's pci_attach_args. Probably a bug. Make a local copy of the caller's pci_attach_args and modify the copy. I have not tested this change. While I'm here, make pci_mapreg_submap() static. With these changes in place, I have tested the compilation of these kernels: alpha GENERIC amd64 GENERIC XEN3_DOM0 arc GENERIC atari HADES MILAN-PCIIDE bebox GENERIC cats GENERIC cobalt GENERIC evbarm-eb NSLU2 evbarm-el ADI_BRH ARMADILLO9 CP3100 GEMINI GEMINI_MASTER GEMINI_SLAVE GUMSTIX HDL_G IMX31LITE INTEGRATOR IQ31244 IQ80310 IQ80321 IXDP425 IXM1200 KUROBOX_PRO LUBBOCK MARVELL_NAS NAPPI SHEEVAPLUG SMDK2800 TEAMASA_NPWR TEAMASA_NPWR_FC TS7200 TWINTAIL ZAO425 evbmips-el AP30 DBAU1500 DBAU1550 MALTA MERAKI MTX-1 OMSAL400 RB153 WGT624V3 evbmips64-el XLSATX evbppc EV64260 MPC8536DS MPC8548CDS OPENBLOCKS200 OPENBLOCKS266 OPENBLOCKS266_OPT P2020RDB PMPPC RB800 WALNUT hp700 GENERIC i386 ALL XEN3_DOM0 XEN3_DOMU ibmnws GENERIC macppc GENERIC mvmeppc GENERIC netwinder GENERIC ofppc GENERIC prep GENERIC sandpoint GENERIC sgimips GENERIC32_IP2x sparc GENERIC_SUN4U KRUPS sparc64 GENERIC As of Sun Apr 3 15:26:26 CDT 2011, I could not compile these kernels with or without my patches in place: ### evbmips-el GDIUM nbmake: nbmake: don't know how to make /home/dyoung/pristine-nbsd/src/sys/arch/mips/mips/softintr.c. Stop ### evbarm-el MPCSA_GENERIC src/sys/arch/evbarm/conf/MPCSA_GENERIC:318: ds1672rtc*: unknown device `ds1672rtc' ### ia64 GENERIC /tmp/genassym.28085/assym.c: In function 'f111': /tmp/genassym.28085/assym.c:67: error: invalid application of 'sizeof' to incomplete type 'struct pcb' /tmp/genassym.28085/assym.c:76: error: dereferencing pointer to incomplete type ### sgimips GENERIC32_IP3x crmfb.o: In function `crmfb_attach': crmfb.c:(.text+0x2304): undefined reference to `ddc_read_edid' crmfb.c:(.text+0x2304): relocation truncated to fit: R_MIPS_26 against `ddc_read_edid' crmfb.c:(.text+0x234c): undefined reference to `edid_parse' crmfb.c:(.text+0x234c): relocation truncated to fit: R_MIPS_26 against `edid_parse' crmfb.c:(.text+0x2354): undefined reference to `edid_print' crmfb.c:(.text+0x2354): relocation truncated to fit: R_MIPS_26 against `edid_print'
2011-02-24Add Intel Pineview supportmatt
2011-02-15add AGP v3 support to agp_generic_enable from FreeBSDjmcneill
2010-11-13Don't pull in the whole uvm(9) API to access only PAGE_SIZE anduebayasi
some other constants. These are provided by sys/param.h now.
2010-10-10restore binary compatibility for amd64; requested by joerg.christos
2010-10-02Revert christos@ fix for the i386 paddr_t change and agp_allocate.jym
Make 'physical' element of the struct agp_allocate an uint32_t. This is similar to what other kernels do (at least Solaris and Linux). This patch should make xserver work again within an i386 userland in a 64 bits paddr_t world. Thanks to Iain Hibbert for reporting the break, and providing initial hints. See http://mail-index.netbsd.org/current-users/2010/09/27/msg014418.html
2010-09-28make this compile.christos
2010-09-28- fixes from Jean-Yves Migeonchristos
- handle transitional paddr_t period for i386
2010-09-27move all the compat code here, and #ifdef __i386__ from mrg.christos
2010-09-27backwards compat code for paddr_t being 32 bits.christos
2010-06-16Add AGP support for a number of Intel onboard devices, includingriz
82G41, 82B43, E7221, 82965GME, and "Iron Lake". Device types (i915, i965, G33, and G4X variants) from the Linux Intel AGP driver, and (for 82G41) from Henry Bent in PR#42906. There are a few more varieties that should be relatively low-hanging fruit ("Pineview" and "Sandy Bridge"), but will require a little bit of rejiggering of the "chiptype". OK mrg@
2010-02-24A pointer typedef entails trading too much flexibility to declare constdyoung
and non-const types, and the kernel uses both const and non-const PMF qualifiers and device suspensors, so change the pmf_qual_t and device_suspensor_t typedefs from "pointers to const" to non-pointer, non-const types.
2010-02-24- Use ctob() instead of ptoa() to obtain physical addresses from framejym
numbers. Using ptoa() will cast to vaddr_t, which might no be adequate for architectures where sizeof(paddr_t) > sizeof(vaddr_t) (like i386 PAE). - small fix inside AGP heuristics to avoid masking high order bits for systems with more than 4GB. Reviewed by bouyer@. See also http://mail-index.netbsd.org/tech-kern/2010/02/22/msg007373.html
2010-01-08Expand PMF_FN_* macros.dyoung
2009-01-27Add some more Intel G4X class chipsets. Also fix gtt_size for G4X chipsets.markd
Partially from FreeBSD. There is still an issue here as G4X chipsets report an aperture size of 0.
2008-11-29Add support for the Intel G45 AGP. From Arnaud Lacombechristos
2008-11-08Support for Intel G35 as found on Asus P5E-VM HDMI motherboard fromchristos
Milos Negovanovic
2008-10-17add missing free.christos
2008-08-22AGP support for Intel 945GME chipset, found on Acer Aspire One.tnn
2008-08-19Add agp support for Intel 946gz.matthias
2008-06-09o Split device_t/softc for agp(4).freza
o agp_ali.c: remove unused 'agp' member from agp_ali_softc. o drm: agp_find_device() returns 'void *', not a device_t. o Use device_t, cfdata_t instead of struct pointers. o Don't cast void pointers in assignments.
2008-06-08Replace device_lookup() with device_lookup_private() on getting softctsutsui
for future device_t/softc spilt.
2008-04-19Add missing agp support for ALI M1689 chipset, for PR/35416.njoly
2008-04-10use aprint_*_dev and device_xnamecegger
2008-02-29Use PMF_FN_ARGS, PMF_FN_PROTO.dyoung
2007-12-09Merge jmcneill-pm branch.jmcneill
2007-12-05Match the docs: MUTEX_DRIVER/SPIN are now only for porting code writtenad
for Solaris.
2007-11-24Add agp support for Intel Q35/G33/Q33.markd
2007-11-12Merge bunch of AGP changes from jmcneill-pm.joerg
2007-10-30PR/37201 - Yasushi Oshima -- Intel 82965G chipset supportjnemeth
2007-10-19machine/{bus,cpu,intr}.h -> sys/{bus,cpu,intr}.had
2007-08-15Add agp support for i965Q.markd
Based on a patch for FreeBSD by Eric Anholt. OKed on tech-kern some months ago.
2007-08-04Add support agp_amd64. Imported from FreeBSD.kiyohara
2007-03-06Use a mutex rather than lockmgr. Approved by Andrew Doran.xtraeme
2007-03-04Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.christos
2006-12-18Don't cleanup memory mappings twice. From Blair Sadewitzchristos
2006-11-16__unused removal on arguments; approved by core.christos
2006-10-12- sprinkle __unused on function decls.christos
- fix a couple of unused bugs - no more -Wno-unused for i386
2006-08-27complete initializationchristos
2006-08-17Fix all the -D*DEBUG* code that it was rotting away and did not even compile.christos
Mostly from Arnaud Lacombe, many thanks!
2006-07-30Add support for 82945GM and (untested) 82945P AGP. FreeBSD andsimonb
Linux both treat the 945 series exactly the same as the 915 series for AGP, so just match a few extra device IDs.