summaryrefslogtreecommitdiff
path: root/drivers/char/agp/generic.c
AgeCommit message (Collapse)Author
2006-11-22[AGP] Allocate AGP pages with GFP_DMA32 by defaultLinus Torvalds
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>
2006-09-28[AGPGART] printk fixups.Dave Jones
Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-10[AGPGART] Rework AGPv3 modesetting fallback.Dave Jones
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>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-05-30[AGPGART] Remove pointless code from agp_generic_create_gatt_table()Dave Jones
Signed-off-by: Dave Jones <davej@redhat.com>
2006-02-28[AGPGART] Lots of CodingStyle/whitespace cleanups.Dave Jones
Eliminate trailing whitespace. s/if(/if (/ s/for(/for (/ Signed-off-by: Dave Jones <davej@redhat.com>
2005-11-09Fix AGP compile on non-x86 architecturesLinus Torvalds
AGP shouldn't use "global_flush_tlb()" to flush the AGP mappings, that i spurely an x86'ism. The proper AGP mapping flusher that should be used is "flush_agp_mappings()", which on x86 obviously happens to do a global TLB flush. This makes AGP (or at least the config _I_ happen to use) compile again on ppc64. Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-08[PATCH] AGP performance fixesAlan Hourihane
AGP allocation/deallocation is suffering major performance issues due to the nature of global_flush_tlb() being called on every change_page_attr() call. For small allocations this isn't really seen, but when you start allocating 50000 pages of AGP space, for say, texture memory, then things can take seconds to complete. In some cases the situation is doubled or even quadrupled in the time due to SMP, or a deallocation, then a new reallocation. I've had a case of upto 20 seconds wait time to deallocate and reallocate AGP space. This patch fixes the problem by making it the caller's responsibility to call global_flush_tlb(), and so removes it from every instance of mapping a page into AGP space until the time that all change_page_attr() changes are done. Signed-off-by: Dave Jones <davej@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org>
2005-11-04[AGPGART] When we encounter reserved mode bits, print them out.Dave Jones
Signed-off-by: Dave Jones <davej@redhat.com>
2005-10-20[AGPGART] Replace kmalloc+memset's with kzalloc'sDave Jones
Signed-off-by: Dave Jones <davej@redhat.com>
2005-08-17Fix up various printk levels and whitespace corrections.Dave Jones
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Jones <davej@redhat.com>
2005-08-11[AGPGART] Drop duplicate setting of info->mode in agp_copy_info()Dave Jones
Spotted by Jeremy Fitzhardinge, this change crept in with the multiple backend support. It's clearly incorrect to overwrite info->mode after we just went to lengths to determine which bits to mask out. Signed-off-by: Dave Jones <davej@redhat.com>
2005-06-07[PATCH] Replace check_bridge_mode() with (bridge->mode & AGSTAT_MODE_3_0).David Mosberger
[AGPGART] Replace check_bridge_mode() with (bridge->mode & AGSTAT_MODE_3_0). As mentioned earlier, the current check_bridge_mode() code assumes that AGP bridges are PCI devices. This isn't always true. Definitely not for HP zx1 chipset and the same seems to be the case for SGI's AGP bridge. The patch below fixes the problem by picking up the AGP_MODE_3_0 bit from bridge->mode. I feel like I may be missing something, since I can't see any reason why check_bridge_mode() wasn't doing that in the first place. According to the AGP 3.0 specs, the AGP_MODE_3_0 bit is determined during the hardware reset and cannot be changed, so it seems to me it should be safe to pick it up from bridge->mode. With the patch applied, I can definitely use AGP acceleration both with AGP 2.0 and AGP 3.0 (one with an Nvidia card, the other with an ATI FireGL card). Unless someone spots a problem, please apply this patch so 3d acceleration can work on zx1 boxes again. This makes AGP work again on machines with an AGP bridge that isn't a PCI device. Signed-off-by: David Mosberger-Tang <davidm@hpl.hp.com> Signed-off-by: Dave Jones <davej@redhat.com>
2005-06-07[PATCH] AGP fix for Xen VMMKeir Fraser
When Linux is running on the Xen virtual machine monitor, physical addresses are virtualised and cannot be directly referenced by the AGP GART. This patch fixes the GART driver for Xen by adding a layer of abstraction between physical addresses and 'GART addresses'. Architecture-specific functions are also defined for allocating and freeing the GATT. Xen requires this to ensure that table really is contiguous from the point of view of the GART. These extra interface functions are defined as 'no-ops' for all existing architectures that use the GART driver. Signed-off-by: Keir Fraser <keir@xensource.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dave Jones <davej@redhat.com>
2005-04-16Linux-2.6.12-rc2v2.6.12-rc2Linus Torvalds
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!