summaryrefslogtreecommitdiffstats
path: root/drivers/char/agp
Commit message (Collapse)AuthorAgeFilesLines
* [AGPGART] allow drm populated agp memory types cleanupsAndrew Morton2007-02-102-14/+4
| | | | | | | | | Fix whitespace, braces, use kzalloc(). Cc: Dave Airlie <airlied@linux.ie> Cc: Thomas Hellstrom <thomas@tungstengraphics.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] intel-agp: Use ARRAY_SIZE macro when appropriateAhmed S. Darwish2007-02-061-1/+2
| | | | | | | use ARRAY_SIZE macro already defined in kernel.h Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com> Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] Add agp-type-to-mask-type method missing from some drivers.Thomas Hellstrom2007-02-052-0/+2
| | | | Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] Don't try to remap i810 registers on resume.Dave Jones2007-02-041-6/+8
| | | | | | | | We don't unmap them on the suspend path, so on resume trying to remap will fail, and then result in an oops the next time something tries to access them. Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] Allow drm-populated agp memory typesThomas Hellstrom2007-02-0318-75/+291
| | | | | | | | | | | | | | | | | | | | This patch allows drm to populate an agpgart structure with pages of its own. It's needed for the new drm memory manager which dynamically flips pages in and out of AGP. The patch modifies the generic functions as well as the intel agp driver. The intel drm driver is currently the only one supporting the new memory manager. Other agp drivers may need some minor fixing up once they have a corresponding memory manager enabled drm driver. AGP memory types >= AGP_USER_TYPES are not populated by the agpgart driver, but the drm is expected to do that, as well as taking care of cache- and tlb flushing when needed. It's not possible to request these types from user space using agpgart ioctls. The Intel driver also gets a new memory type for pages that can be bound cached to the intel GTT. Signed-off-by: Thomas Hellstrom <thomas@tungstengraphics.com> Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] compat ioctlZwane Mwaikambo2007-02-035-14/+407
| | | | | | | | | | | | | | | The following video card requires the agpgart driver ioctl interface in order to detect video memory. 00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03) Tested on a Thinkpad Z61t, Xorg.0.log from a 32bit debian Xorg is at; http://montezuma.homeunix.net/Xorg.0.log Signed-off-by: Zwane Mwaikambo <zwane@infradead.org> Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] Add new IDs to VIA AGP.Dave Jones2007-01-282-3/+20
| | | | | | | | Culled from the VIA codedrop. Also fixes up one ID used in amd64-agp to use the VIA part number instead of the board name in its ID. Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] Remove pointless assignment.Dave Jones2007-01-281-5/+5
| | | | | | | No point in clearing local pointers then returning. Also fix up some CodingStyle nits. Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] Remove pointless typedef in ati-agpDave Jones2007-01-281-13/+13
| | | | | | | This seems to exist just to save people typing 'struct' a few times, and doesn't provide any additional value. Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] Prevent (unlikely) memory leak in amd_create_gatt_pages()Dave Jones2007-01-281-0/+5
| | | | | | | If we fail an alloc, unwind the previous allocs that succeeded. Spotted-by: Alan Grimes <agrimes@speakeasy.net> Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] intel_agp: restore graphics device's pci space early in resumeWang Zhenyu2007-01-171-0/+9
| | | | | | | | | | | Currently in resuming path graphics device's pci space restore is behind host bridge, so resume function wrongly accesses graphics device's space. This makes resuming failure which crashed X. here's a patch to restore device's pci space early, which makes resuming ok with X. Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com> Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] drivers/char/agp/sgi-agp.c: check kmalloc() return valueakpm@osdl.org2007-01-021-4/+5
| | | | | | | | drivers/char/agp/sgi-agp.c: check kmalloc() return value Signed-off-by: Amit Choudhary <amit2030@gmail.com> Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org>
* [AGPGART] Fix PCI-posting flush typo.Thomas Hellstrom2006-12-281-1/+1
| | | | | | | | | Unfortunately there was a typo in one of the patches I sent, (The one now committed to the agpgart tree). It may cause a bus error on i810 type hardware. Signed-off-by: Thomas Hellstrom <thomas@tungstengraphics.com> Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] fix detection of aperture size versus GTT size on G965Eric Anholt2006-12-222-52/+62
| | | | | | | | | | | | | | | | | | On the G965, the GTT size may be larger than is required to cover the aperture. (In fact, on all hardware we've seen, the GTT is 512KB to the aperture's 256MB). A previous commit forced the aperture size to 512MB on G965 to match GTT, which would likely result in hangs at best if users tried to rely on agpgart's aperture size information. Instead, we use the resource length for the aperture size and the system's reported GTT size when available for the GTT size. Because the MSAC registers which had been read for aperture size detection on i9xx chips just cause a change in the resource size, we can use generic code for aperture detection on all i9xx. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] Remove unnecessary flushes when inserting and removing pages.Thomas Hellstrom2006-12-222-23/+50
| | | | | | | | | | | | | | | | | | This patch is to speed up flipping of pages in and out of the AGP aperture as needed by the new drm memory manager. A number of global cache flushes are removed as well as some PCI posting flushes. The following guidelines have been used: 1) Memory that is only mapped uncached and that has been subject to a global cache flush after the mapping was changed to uncached does not need any more cache flushes. Neither before binding to the aperture nor after unbinding. 2) Only do one PCI posting flush after a sequence of writes modifying page entries in the GATT. Signed-off-by: Thomas Hellstrom <thomas@tungstengraphics.com> Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] K8M890 support for amd-k8.Gabriel Mansi2006-12-181-0/+9
| | | | Signed-off-by: Dave Jones <davej@redhat.com>
* Merge ../linusDave Jones2006-12-125-10/+452
|\
| * [PATCH] agp-amd64: section mismatches with HOTPLUG=nRandy Dunlap2006-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | When CONFIG_HOTPLUG=n, agp_amd64_resume() calls nforce3_agp_init(), which is __devinit == __init, so has been discarded and is not usable for resume. WARNING: drivers/char/agp/amd64-agp.o - Section mismatch: reference to .init.text: from .text between 'agp_amd64_resume' (at offset 0x249) and 'amd64_tlbflush' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [AGP] Allocate AGP pages with GFP_DMA32 by defaultLinus Torvalds2006-11-222-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not all graphic page remappers support physical addresses over the 4GB mark for remapping, so while some do (the AMD64 GART always did, and I just fixed the i965 to do so properly), we're safest off just forcing GFP_DMA32 allocations to make sure graphics pages get allocated in the low 32-bit address space by default. AGP sub-drivers that really care, and can do better, could just choose to implement their own allocator (or we could add another "64-bit safe" default allocator for their use), but quite frankly, you're not likely to care in practice. So for now, this trivial change means that we won't be allocating pages that we can't map correctly by mistake on x86-64. [ On traditional 32-bit x86, this could never happen, because GFP_KERNEL would never allocate any highmem memory anyway ] Acked-by: Andi Kleen <ak@suse.de> Acked-by: Dave Jones <davej@redhat.com> Cc: Eric Anholt <eric@anholt.net> Cc: Keith Packard <keithp@keithp.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * [AGP] Fix intel 965 AGP memory mapping functionLinus Torvalds2006-11-221-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a i965-specific "mask_memory()" function that knows about the extended physical addresses that the i965 supports. This allows us to correctly map in physical memory in the >4GB range into the GTT. Also simplify/clean-up the i965 case for the aperture sizing by just returning the fixed 512kB size from "fetch_size()". We don't really care that not all of the aperture may be visible - the only thing that cares about the aperture size is the Intel "stolen memory" calculation, which depends on the fixed size. Cc: Keith Packard <keithp@keithp.com> Cc: Eric Anholt <eric@anholt.net> Cc: Dave Jones <davej@redhat.com> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgartLinus Torvalds2006-10-211-19/+35
| |\ | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart: [AGPGART] uninorth: Add module param 'aperture' for aperture size
| * | [PARISC] Add support for Quicksilver AGPGARTKyle McMartin2006-10-043-1/+426
| | | | | | | | | | | | Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
* | | [AGPGART] VIA and SiS AGP chipsets are x86-onlyMatthew Wilcox2006-12-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | There's no point in troubling the Alpha, IA-64, PowerPC and PARISC people with SiS and VIA options. Andrew thinks it helps find bugs, but there's no evidence of that. Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: Dave Jones <davej@redhat.com>
* | | [AGPGART] agp-amd64: section mismatches with HOTPLUG=nRandy Dunlap2006-12-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When CONFIG_HOTPLUG=n, agp_amd64_resume() calls nforce3_agp_init(), which is __devinit == __init, so has been discarded and is not usable for resume. WARNING: drivers/char/agp/amd64-agp.o - Section mismatch: reference to .init.text: from .text between 'agp_amd64_resume' (at offset 0x249) and 'amd64_tlbflush' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Dave Jones <davej@redhat.com>
* | | [AGPGART] Fix up misprogrammed bridges with incorrect AGPv2 rates.Dave Jones2006-11-031-0/+25
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some dumb bridges are programmed to disobey the AGP2 spec. This is likely a BIOS misprogramming rather than poweron default, or it would be a lot more common. AGPv2 spec 6.1.9 states: "The RATE field indicates the data transfer rates supported by this device. A.G.P. devices must report all that apply." Fix them up as best we can. This will prevent errors like.. agpgart: Found an AGP 3.5 compliant device at 0000:00:00.0. agpgart: req mode 1f000201 bridge_agpstat 1f000a14 vga_agpstat 2f000217. agpgart: Device is in legacy mode, falling back to 2.x agpgart: Putting AGP V2 device at 0000:00:00.0 into 0x mode agpgart: Putting AGP V2 device at 0000:01:00.0 into 0x mode agpgart: Putting AGP V2 device at 0000:01:00.1 into 0x mode https://bugs.freedesktop.org/show_bug.cgi?id=8816 Signed-off-by: Dave Jones <davej@redhat.com>
* | [AGPGART] uninorth: Add module param 'aperture' for aperture sizeMichel Dänzer2006-10-151-19/+35
|/ | | | | | | | | | | | In contrast to most if not all PC BIOSes, OpenFirmware (OF) on PowerMacs with UniNorth bridges does not allow changing the aperture size. The size set up by OF is usually 16 MB, which is too low for graphics intensive environments. Hence, add a module parameter that allows changing the aperture size at driver initialization time. When the parameter is not specified, the default is 32 MB. Signed-off-by: Michel Dänzer <michel@tungstengraphics.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] printk fixups.Dave Jones2006-09-281-3/+6
| | | | Signed-off-by: Dave Jones <davej@redhat.com>
* [AGPGART] Use pci_get_slot not pci_find_slotAlan Cox2006-09-261-2/+6
| | | | | Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Dave Jones <davej@redhat.com>
* Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgartLinus Torvalds2006-09-227-64/+199
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart: [AGPGART] Rework AGPv3 modesetting fallback. [AGPGART] Add suspend callback for i965 [AGPGART] Fix number of aperture sizes in 830 gart structs. [AGPGART] Intel 965 Express support. [AGPGART] agp.h: constify struct agp_bridge_data::version [AGPGART] const'ify VIA AGP PCI table. [AGPGART] CONFIG_PM=n slim: drivers/char/agp/intel-agp.c [AGPGART] CONFIG_PM=n slim: drivers/char/agp/efficeon-agp.c [AGPGART] Const'ify the agpgart driver version. [AGPGART] remove private page protection map
| * [AGPGART] Rework AGPv3 modesetting fallback.Dave Jones2006-09-101-15/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes the logic to handle AGPx8->AGPx4 fallback failed, as can be seen in https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=197346 The failures occured if the bridge was in AGPx8 mode, but the user hadn't specified a mode in their X config. We weren't setting the mode to the highest mode capable by the video card+bridge (as we do in the AGPv2 case), which was leading to all kinds of mayhem including us believing that after falling back from AGPx8, that we couldn't do x4 mode (which is disastrous in AGPv3, as those are the only two modes possible). Signed-off-by: Dave Jones <davej@redhat.com>
| * [AGPGART] Add suspend callback for i965Dave Jones2006-09-101-0/+2
| | | | | | | | Signed-off-by: Dave Jones <davej@redhat.com>
| * [AGPGART] Fix number of aperture sizes in 830 gart structs.Dave Jones2006-09-061-2/+2
| | | | | | | | | | Spotted by Eric Anholt. Signed-off-by: Dave Jones <davej@redhat.com>
| * [AGPGART] Intel 965 Express support.Eric Anholt2006-09-061-11/+152
| | | | | | | | | | | | From: Alan Hourihane <alanh@tungstengraphics.com> From: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Jones <davej@redhat.com>
| * [AGPGART] agp.h: constify struct agp_bridge_data::versionAlexey Dobriyan2006-09-051-1/+1
| | | | | | | | | | | | | | | | drivers/char/agp/backend.c: In function `agp_backend_initialize': drivers/char/agp/backend.c:141: warning: assignment discards qualifiers from pointer target type Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Dave Jones <davej@redhat.com>
| * [AGPGART] const'ify VIA AGP PCI table.Dave Jones2006-08-111-2/+2
| | | | | | | | Signed-off-by: Dave Jones <davej@redhat.com>
| * [AGPGART] CONFIG_PM=n slim: drivers/char/agp/intel-agp.cAlexey Dobriyan2006-08-111-0/+4
| | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Dave Jones <davej@redhat.com>
| * [AGPGART] CONFIG_PM=n slim: drivers/char/agp/efficeon-agp.cAlexey Dobriyan2006-08-111-7/+9
| | | | | | | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Dave Jones <davej@redhat.com>
| * [AGPGART] Const'ify the agpgart driver version.Dave Jones2006-08-111-1/+1
| | | | | | | | Signed-off-by: Dave Jones <davej@redhat.com>
| * [AGPGART] remove private page protection mapHugh Dickins2006-07-261-25/+2
| | | | | | | | | | | | | | | | | | AGP keeps its own copy of the protection_map, upcoming DRM changes will also require access to this map from modules. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Dave Airlie <airlied@linux.ie> Signed-off-by: Dave Jones <davej@redhat.com>
* | [POWERPC] video & agp: Constify & voidify get_property()Jeremy Kerr2006-07-311-2/+2
|/ | | | | | | | | | | Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powerpc-specific video & agp driver changes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] make more file_operation structs staticArjan van de Ven2006-07-031-1/+1
| | | | | | | | | | | | Mark the static struct file_operations in drivers/char as const. Making them const prevents accidental bugs, and moves them to the .rodata section so that they no longer do any false sharing; in addition with the proper debug option they are then protected against corruption.. [akpm@osdl.org: build fix] Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-302-2/+0
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* Merge ../linusDave Jones2006-06-297-65/+36
|\ | | | | | | | | | | Conflicts: drivers/char/agp/Kconfig
| * [PATCH] Remove redundant NULL checks before [kv]free - in drivers/Jesper Juhl2006-06-271-3/+2
| | | | | | | | | | | | | | | | | | Remove redundant NULL chck before kfree + tiny CodingStyle cleanup for drivers/ Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivialLinus Torvalds2006-06-263-3/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial: typo fixes Clean up 'inline is not at beginning' warnings for usb storage Storage class should be first i386: Trivial typo fixes ixj: make ixj_set_tone_off() static spelling fixes fix paniced->panicked typos Spelling fixes for Documentation/atomic_ops.txt move acknowledgment for Mark Adler to CREDITS remove the bouncing email address of David Campbell
| | * spelling fixesAndreas Mohr2006-06-263-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | acquired (aquired) contiguous (contigious) successful (succesful, succesfull) surprise (suprise) whether (weather) some other misspellings Signed-off-by: Andreas Mohr <andi@lisas.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
| * | [PATCH] x86_64: Rename IOMMU option, fix help and mark option embedded.Andi Kleen2006-06-262-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Rename the GART_IOMMU option to IOMMU to make clear it's not just for AMD - Rewrite the help text to better emphatise this fact - Make it an embedded option because too many people get it wrong. To my astonishment I discovered the aacraid driver tests this symbol directly. This looks quite broken to me - it's an internal implementation detail of the PCI DMA API. Can the maintainer please clarify what this test was intended to do? Cc: linux-scsi@vger.kernel.org Cc: alan@redhat.com Cc: markh@osdl.org Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * | [PATCH] x86_64: Clean and enhance up K8 northbridge access codeAndi Kleen2006-06-261-52/+25
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Factor out the duplicated access/cache code into a single file * Shared between i386/x86-64. - Share flush code between AGP and IOMMU * Fix a bug: AGP didn't wait for end of flush before - Drop 8 northbridges limit and allocate dynamically - Add lock to serialize AGP and IOMMU GART flushes - Add PCI ID for next AMD northbridge - Random related cleanups The old K8 NUMA discovery code is unchanged. New systems should all use SRAT for this. Cc: "Navin Boppuri" <navin.boppuri@newisys.com> Cc: Dave Jones <davej@redhat.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
| * Merge branch 'release' of ↵Linus Torvalds2006-06-231-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 * 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6: (65 commits) ACPI: suppress power button event on S3 resume ACPI: resolve merge conflict between sem2mutex and processor_perflib.c ACPI: use for_each_possible_cpu() instead of for_each_cpu() ACPI: delete newly added debugging macros in processor_perflib.c ACPI: UP build fix for bugzilla-5737 Enable P-state software coordination via _PDC P-state software coordination for speedstep-centrino P-state software coordination for acpi-cpufreq P-state software coordination for ACPI core ACPI: create acpi_thermal_resume() ACPI: create acpi_fan_suspend()/acpi_fan_resume() ACPI: pass pm_message_t from acpi_device_suspend() to root_suspend() ACPI: create acpi_device_suspend()/acpi_device_resume() ACPI: replace spin_lock_irq with mutex for ec poll mode ACPI: Allow a WAN module enable/disable on a Thinkpad X60. sem2mutex: acpi, acpi_link_lock ACPI: delete unused acpi_bus_drivers_lock sem2mutex: drivers/acpi/processor_perflib.c ACPI add ia64 exports to build acpi_memhotplug as a module ACPI: asus_acpi_init(): propagate correct return value ... Manual resolve of conflicts in: arch/i386/kernel/cpu/cpufreq/acpi-cpufreq.c arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c include/acpi/processor.h
| | * Pull acpica into release branchLen Brown2006-06-151-1/+1
| | |\
OpenPOWER on IntegriCloud