summaryrefslogtreecommitdiffstats
path: root/drivers/char/agp
AgeCommit message (Collapse)AuthorFilesLines
2008-08-25linux-next: fix x86 tree build failureStephen Rothwell1-1/+1
Today's linux-next build (powerpc allyesconfig) failed like this: drivers/char/agp/uninorth-agp.c:541: error: unknown field 'agp_destroy_paged' specified in initializer Caused by commit 5f310b63781f6777bf4e812570560ec0f8ea42d8 ("agp: enable optimized agp_alloc_pages methods"). A simple typo ... Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22agp: enable optimized agp_alloc_pages methodsRene Herman13-0/+30
The pageattr-array patch that you currently have in tip/master only enables it for intel-agp, not the others. The attached enables it for all drivers currently directly using agp_generic_alloc_page() and agp_generic_destroy_page() (ocal driver is amd-k7-agp). The new agp_generic_alloc_pages() interface uses the also new pageattr array interface API. This makes all AGP drivers that up to now used generic_{alloc,destroy}_page() use it. Signed-off-by: Rene Herman <rene.herman@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-22Merge branch 'x86/urgent' into x86/patIngo Molnar12-144/+200
Conflicts: arch/x86/mm/pageattr.c Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-21agp: add agp_generic_destroy_pages()Shaohua Li3-8/+63
Add agp_generic_destroy_pages(), it uses new pageattr array interface API. Signed-off-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-21agp: generic_alloc_pages()Shaohua Li3-0/+59
Add agp_generic_alloc_pages(), it uses new pageattr array interface API. Signed-off-by: Dave Airlie <airlied@gmail.com> Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-21Revert "reduce tlb/cache flush times of agpgart memory allocation"Ingo Molnar2-7/+1
This reverts commit 466ae837424dcc538b1af2a0eaf53be32edcdbe7.
2008-08-15reduce tlb/cache flush times of agpgart memory allocationShaohua Li2-1/+7
To reduce tlb/cache flush, makes agp memory allocation do one flush after all pages in a region are changed to uc. All agp drivers except agp-sgi uses agp_generic_alloc_page() for .agp_alloc_page, so the patch should work for them. agp-sgi is only for ia64, so not a problem too. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Cc: airlied@linux.ie Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-08-12agp: fix SIS 5591/5592 wrong PCI idKrzysztof Helt1-1/+1
The correct id is the id of the main host (5591) not the id of the PCI-to-PCI bridge AGP (0001). Output from "lspci -nv" shows that only the former has AGP capabilities flag set: 00:00.0 0600: 1039:5591 (rev 02) Flags: bus master, medium devsel, latency 64 Memory at ec000000 (32-bit, non-prefetchable) [size=32M] Capabilities: [c0] AGP version 1.0 00:02.0 0604: 1039:0001 (prog-if 00 [Normal decode]) Flags: bus master, fast devsel, latency 0 Bus: primary=00, secondary=01, subordinate=01, sec-latency=0 I/O behind bridge: 0000c000-0000cfff Memory behind bridge: eb500000-eb5fffff Prefetchable memory behind bridge: eb300000-eb3fffff Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-08-12intel/agp: rewrite GTT on resumeKeith Packard4-0/+38
On my Intel chipset (965GM), the GTT is entirely erased across suspend/resume. This patch simply re-plays the current mapping at resume time to restore the table.=20 I noticed this once I started relying on persistent GTT mappings across VT switch in our GEM work -- the old X server and DRM code carefully unbind all memory from the GTT on VT switch, but GEM does not bother. I placed the list management and rewrite code in the generic layer on the assumption that it will be needed on other hardware, but I did not add the rewrite call to anything other than the Intel resume function. Keep a list of current GATT mappings. At resume time, rewrite them into the GATT. This is needed on Intel (at least) as the entire GATT is cleared across suspend/resume. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Keith Packard <keithp@keithp.com> Cc: Dave Jones <davej@codemonkey.org.uk> Cc: Andi Kleen <andi@firstfloor.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-08-12agp: use dev_printk when possibleBjorn Helgaas11-134/+141
Convert printks to use dev_printk(). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-08-12amd64-agp: run fallback when no bridges found, not when driver registration ↵Bjorn Helgaas1-2/+13
fails I think the intent was that if no bridges matched agp_amd64_pci_table[], we would fall back to checking for any bridge with the AGP capability. But in the current code, we execute the fallback path only when pci_register_driver() itself fails, which is unrelated to whether any matching devices were found. This patch counts the AGP bridges found in the probe() method and executes the fallback path when none is found. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-08-12intel_agp: official name for GM45 chipsetZhenyu Wang1-7/+7
Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Cc: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-07-15Merge branch 'generic-ipi' into generic-ipi-for-linusIngo Molnar1-1/+1
Conflicts: arch/powerpc/Kconfig arch/s390/kernel/time.c arch/x86/kernel/apic_32.c arch/x86/kernel/cpu/perfctr-watchdog.c arch/x86/kernel/i8259_64.c arch/x86/kernel/ldt.c arch/x86/kernel/nmi_64.c arch/x86/kernel/smpboot.c arch/x86/xen/smp.c include/asm-x86/hw_irq_32.h include/asm-x86/hw_irq_64.h include/asm-x86/mach-default/irq_vectors.h include/asm-x86/mach-voyager/irq_vectors.h include/asm-x86/smp.h kernel/Makefile Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-07-14Merge branch 'bkl-removal' of git://git.lwn.net/linux-2.6Linus Torvalds1-0/+4
* 'bkl-removal' of git://git.lwn.net/linux-2.6: (146 commits) IB/umad: BKL is not needed for ib_umad_open() IB/uverbs: BKL is not needed for ib_uverbs_open() bf561-coreb: BKL unneeded for open() Call fasync() functions without the BKL snd/PCM: fasync BKL pushdown ipmi: fasync BKL pushdown ecryptfs: fasync BKL pushdown Bluetooth VHCI: fasync BKL pushdown tty_io: fasync BKL pushdown tun: fasync BKL pushdown i2o: fasync BKL pushdown mpt: fasync BKL pushdown Remove BKL from remote_llseek v2 Make FAT users happier by not deadlocking x86-mce: BKL pushdown vmwatchdog: BKL pushdown vmcp: BKL pushdown via-pmu: BKL pushdown uml-random: BKL pushdown uml-mmapper: BKL pushdown ...
2008-07-14Merge commit 'v2.6.26' into bkl-removalJonathan Corbet19-155/+236
2008-06-26on_each_cpu(): kill unused 'retry' parameterJens Axboe1-1/+1
It's not even passed on to smp_call_function() anymore, since that was removed. So kill it. Acked-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2008-06-25Merge branch 'linus' into x86/gartIngo Molnar19-155/+232
2008-06-20agp-frontend: BKL pushdownArnd Bergmann1-0/+4
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2008-06-20[agp]: fixup chipset flush for new Intel G4x.Zhenyu Wang1-1/+1
Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19agp: brown paper bag patch - put back the two lines it took out.Dave Airlie1-0/+2
no more whitespace diffs for me. Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19agp/intel: cleanup some serious whitespace badnessDave Airlie1-68/+66
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19[AGP] intel_agp: Add support for Intel 4 series chipsetsZhenyu Wang1-10/+73
Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19[AGP] intel_agp: extra stolen mem size available for IGD_GM chipsetZhenyu Wang1-2/+2
This adds missing stolen memory size detect for IGD_GM, be sure to detect right size as current X intel driver (2.3.2) which has already worked out. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19agp: more boolean conversions.Dave Airlie4-12/+12
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19drivers/char/agp - use boolJoe Perches15-52/+52
Use boolean in AGP instead of having own TRUE/FALSE -- Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19agp: two-stage page destruction issueJan Beulich3-12/+17
besides it apparently being useful only in 2.6.24 (the changes in 2.6.25 really mean that it could be converted back to a single-stage mechanism), I'm seeing an issue in Xen Dom0 kernels, which is caused by the calling of gart_to_virt() in the second stage invocations of the destroy function. I think that besides this being a real issue with Xen (where unmap_page_from_agp() is not just a page table attribute change), this also is invalid from a theoretical perspective: One should not assume that gart_to_virt() is still valid after unmapping a page. So minimally (keeping the 2-stage mechanism) a patch like the one below would be needed. Jan Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-19agp/via: fixup pci idsGreg KH1-2/+11
add a new PCI ID and remove an old dodgy one, include the explaination in the commented code so nobody readds later. (davej also sent the pci id addition). Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-06-16Merge branch 'linus' into x86/gartIngo Molnar1-0/+4
2008-06-12agp: add support for Radeon Mobility 9000 chipsetAmit Kucheria1-0/+4
Addresses https://bugs.edge.launchpad.net/ubuntu/+source/linux-source-2.6.22/+bug/178634 Signed-off-by: Amit Kucheria <amit.kucheria@ubuntu.com> Signed-off-by: maximilian attems <max@stro.at> Acked-by: Dave Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-05-22x86, aperture_64: use symbolic constantsPavel Machek1-18/+4
Factor-out common aperture_valid code. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-12x86 gart: factor out common codePavel Machek1-20/+9
Cleanup gart handling on amd64 a bit: move common code into enable_gart_translation , and use symbolic register names where appropriate. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-12x86: checking aperture size orderYinghai Lu1-6/+6
some systems are using 32M for gart and agp when memory is less than 4G. Kernel will reject and try to allcate another 64M that is not needed, and we will waste 64M of perfectly good RAM. this patch adds a workaround by checking aper_base/order between NB and agp bridge. If they are the same, and memory size is less than 4G, it will allow it. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-12x86: agp_gart size checking for buggy deviceYinghai Lu1-0/+11
while looking at Rafael J. Wysocki's system boot log, I found a funny printout: Node 0: aperture @ de000000 size 32 MB Aperture too small (32 MB) AGP bridge at 00:04:00 Aperture from AGP @ de000000 size 4096 MB (APSIZE 0) Aperture too small (0 MB) Your BIOS doesn't leave a aperture memory hole Please enable the IOMMU option in the BIOS setup This costs you 64 MB of RAM Mapping aperture over 65536 KB of RAM @ 4000000 ... agpgart: Detected AGP bridge 20 agpgart: Aperture pointing to RAM agpgart: Aperture from AGP @ de000000 size 4096 MB agpgart: Aperture too small (0 MB) agpgart: No usable aperture found. agpgart: Consider rebooting with iommu=memaper=2 to get a good aperture. it means BIOS allocated the correct gart on the NB and AGP bridge, but because a bug in the silicon (the agp bridge reports the wrong order, it wants 4G instead) the kernel will reject that allocation. Also, because the size is only 32MB, and we try to get another 64M for gart, late fix_northbridge can not revert that change because it still reads the wrong size from agp bridge. So try to double check the order value from the agp bridge, before calling aperture_valid(). [ mingo@elte.hu: 32-bit fix. ] Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-05-12x86: iommu: use symbolic constants, not hardcoded numbersPavel Machek1-22/+3
Move symbolic constants into gart.h, and use them instead of hardcoded constant. Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2008-04-30drivers/char: replace remaining __FUNCTION__ occurrencesHarvey Harrison1-1/+1
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-26agp: convert drivers/char/agp/frontend.c to use unlocked_ioctlMathieu Segaud1-2/+2
As of now, agp_compat_ioctl already runs without the BKL. Mutual exclusion is enforced by agp_fe.agp_mutex in agp_ioctl() and agp_compat_ioctl(). Apply the same locking rationale to the two functions allowing BKL cleanup. Signed-off-by: Mathieu Segaud <mathieu.segaud@regala.cx> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-04-26agp: fix shadowed variable warning in amd-k7-agp.cHarvey Harrison1-1/+2
Introduced between 2.6.25-rc2 and -rc3 drivers/char/agp/amd-k7-agp.c:439:6: warning: symbol 'cap_ptr' shadows an earlier one drivers/char/agp/amd-k7-agp.c:414:5: originally declared here cap_ptr is never used again in this function, don't bother redeclaring. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-20agp: fix missing casts that produced a warning.Dave Airlie3-6/+6
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-20agp: add support for 662/671 to agp driverChaoyu Chen1-0/+19
Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-19fix historic ioremap() abuse in AGPArjan van dev Ven4-26/+26
Several AGP drivers right now use ioremap_nocache() on kernel ram in order to turn a page of regular memory uncached. There are two problems with this: 1) This is a total nightmare for the ioremap() implementation to keep various mappings of the same page coherent. 2) It's a total nightmare for the AGP code since it adds a ton of complexity in terms of keeping track of 2 different pointers to the same thing, in terms of error handling etc etc. This patch fixes this by making the AGP drivers use the new set_memory_XX APIs instead. Note: amd-k7-agp.c is built on Alpha too, and generic.c is built on ia64 as well, which do not yet have the set_memory_*() APIs, so for them some we have a few ugly #ifdefs - hopefully they'll be fixed soon. Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-19agp/sis: Suspend support for SiS AGPStuart Bennett1-0/+24
Tested on M650 chipset Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-19agp/sis: Clear bit 2 from aperture size byte as wellStuart Bennett1-2/+2
SiS M650 has aperture size byte 0x44 Signed-off-by: Dave Airlie <airlied@redhat.com>
2008-02-05Merge branch 'agp-patches' of ↵Linus Torvalds8-70/+273
git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6 * 'agp-patches' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/agp-2.6: agp: remove flush_agp_mappings calls from new flush handling code intel-agp: introduce IS_I915 and do some cleanups.. [intel_agp] fix name for G35 chipset intel-agp: fixup resource handling in flush code. intel-agp: add new chipset ID agp: remove unnecessary pci_dev_put agp: remove uid comparison as security check fix AGP warning agp/intel: Add chipset flushing support for i8xx chipsets. intel-agp: add chipset flushing support agp: add chipset flushing support to AGP interface
2008-02-05agp: alpha nopageNick Piggin1-9/+8
Convert AGP alpha driver from nopage to fault. NULL is NOPAGE_SIGBUS, so we aren't changing behaviour there. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: Richard Henderson <rth@twiddle.net> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-02-05agp: remove flush_agp_mappings calls from new flush handling codeDave Airlie1-2/+0
Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-05intel-agp: introduce IS_I915 and do some cleanups..Dave Airlie1-61/+57
Add a new IS_I915 and also do some checkpatch whitespace cleanups. Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-05[intel_agp] fix name for G35 chipsetZhenyu Wang1-5/+5
Change origin chipset name i965G_1 to market name G35. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-05intel-agp: fixup resource handling in flush code.Dave Airlie1-10/+23
The flush code resource handling was having problems where some BIOS reserve the resource in a pnp block and some don't. Also there was a bug in that configure was being called at resume and resetting some of the structs. Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-05intel-agp: add new chipset IDZhenyu Wang2-5/+29
This one adds new pci ids for Intel intergrated graphics chipset, with gtt table access change on it and new gtt table size definition. Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@linux.ie>
2008-02-05agp: remove unnecessary pci_dev_putJulia Lawall1-4/+0
pci_get_class implicitly does a pci_dev_put on its second argument, so pci_dev_put is only needed if there is a break out of the loop. The semantic match detecting this problem is as follows: // <smpl> @@ expression dev; expression E; @@ * pci_dev_put(dev) ... when != dev = E ( * pci_get_device(...,dev) | * pci_get_device_reverse(...,dev) | * pci_get_subsys(...,dev) | * pci_get_class(...,dev) ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Cc: Dave Jones <davej@codemonkey.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Dave Airlie <airlied@linux.ie>