History log of /drivers/char/agp/ati-agp.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
61cf059325a30995a78c5001db2ed2a8ab1d4c36 20-Apr-2010 Jerome Glisse <jglisse@redhat.com> agp: use scratch page on memory remove and at GATT creation V4

Convert most AGP chipset to use scratch page as default entries.
This help avoiding GPU querying 0 address and trigger computer
fault. With KMS and memory manager we bind/unbind AGP memory
constantly and it seems that some GPU are still doing AGP
traffic even after GPU report being idle with the memory segment.

Tested (radeon GPU KMS + Xorg + compiz + glxgears + quake3) on :
- SIS 1039:0001 & 1039:0003
- Intel 865 8086:2571

Compile tested for other bridges

V2 enable scratch page on uninorth
V3 fix unbound check in uninorth insert memory (Michel Dänzer)
V4 rebase on top of drm-next branch with the lastest intel AGP
changeset (stable should use version V3 of the patch)

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Michel Dänzer <michel@daenzer.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/ati-agp.c
6a12235c7d2d75c7d94b9afcaaecd422ff845ce0 29-Jul-2009 David Woodhouse <David.Woodhouse@intel.com> agp: kill phys_to_gart() and gart_to_phys()

There seems to be no reason for these -- they're a 1:1 mapping on all
platforms.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
/drivers/char/agp/ati-agp.c
2a4ceb6d3e6a566cb4a9dc8f974177f031d27cd7 27-Jul-2009 David Woodhouse <David.Woodhouse@intel.com> agp: Switch mask_memory() method to take address argument again, not page

In commit 07613ba2 ("agp: switch AGP to use page array instead of
unsigned long array") we switched the mask_memory() method to take a
'struct page *' instead of an address. This is painful, because in some
cases it has to be an IOMMU-mapped virtual bus address (in fact,
shouldn't it _always_ be a dma_addr_t returned from pci_map_xxx(), and
we just happen to get lucky most of the time?)

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
/drivers/char/agp/ati-agp.c
a95fe463e73b8c7b2d97606ac86ce261f1270726 19-Jun-2009 Dave Airlie <airlied@redhat.com> agp: add user mapping support to ATI AGP bridge.

This should fix TTM/KMS on some of the original ATI IGP chipsets.
(rs100/rs200)

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/ati-agp.c
07613ba2f464f59949266f4337b75b91eb610795 12-Jun-2009 Dave Airlie <airlied@redhat.com> agp: switch AGP to use page array instead of unsigned long array

This switches AGP to use an array of pages for tracking the
pages allocated to the GART. This should enable GEM on PAE to work
a lot better as we can pass highmem pages to the PAT code and it will
do the right thing with them.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/ati-agp.c
f4432c5caec5fa95ea7eefd00f8e6cee17e2e023 20-Oct-2008 Dave Jones <davej@redhat.com> Update email addresses.

Update assorted email addresses and related info to point
to a single current, valid address.

additionally
- trivial CREDITS entry updates. (Not that this file means much any more)
- remove arjans dead redhat.com address from powernow driver

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/char/agp/ati-agp.c
5f310b63781f6777bf4e812570560ec0f8ea42d8 21-Aug-2008 Rene Herman <rene.herman@keyaccess.nl> agp: enable optimized agp_alloc_pages methods

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>
/drivers/char/agp/ati-agp.c
e3cf69511a2c5369c58f6fd6a065de152c3d4b22 30-Jul-2008 Bjorn Helgaas <bjorn.helgaas@hp.com> agp: use dev_printk when possible

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>
/drivers/char/agp/ati-agp.c
c72580129209aaa509ace81c1f2ee1caa9c9774b 26-Mar-2008 Joe Perches <joe@perches.com> drivers/char/agp - use bool

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>
/drivers/char/agp/ati-agp.c
df0bcab2c66ac876d5e80864fca5cce944a44540 13-Jun-2008 Amit Kucheria <amit.kucheria@ubuntu.com> agp: add support for Radeon Mobility 9000 chipset

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>
/drivers/char/agp/ati-agp.c
44a207fc66c13c82f627178f9f858b8f3e76028f 20-Feb-2008 Dave Airlie <airlied@redhat.com> agp: fix missing casts that produced a warning.

Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/ati-agp.c
fcea424d31868a78366ad5ee0cb3cc2a4cbe689b 06-Feb-2008 Arjan van dev Ven <arjan@linux.intel.com> fix historic ioremap() abuse in AGP

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>
/drivers/char/agp/ati-agp.c
5bdbc7dc2c07d507b41bffdadc2c8cc13b2d4326 25-Aug-2007 Scott Thompson <postfail at hushmail.com> agp: balance ioremap checks

patchset against 2.6.23-rc3.
corrects missing ioremap return checks and balancing on iounmap calls, integrated changes per list
recommendations on the original set of patches..

Signed-off-by: Scott Thompson <postfail <at> hushmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
/drivers/char/agp/ati-agp.c
190644e180794208bc638179f4d5940fe419bf9c 21-Jul-2007 Jesper Juhl <jesper.juhl@gmail.com> Fix "use after free" / "double free" bug in ati_create_gatt_pages / ati_free_gatt_pages

Hi,

Coverity spotted a "use after free" bug in
drivers/char/agp/ati-agp.c::ati_create_gatt_pages().

The same one that was in
drivers/char/agp/amd-k7-agp.c::amd_create_gatt_pages()

The problem is this:
If "entry = kzalloc(sizeof(struct ati_page_map), GFP_KERNEL);"
fails, then there's a loop in the function to free all entries
allocated so far and break out of the allocation loop. That in itself
is pretty sane, but then the (now freed) 'tables' is assigned to
ati_generic_private.gatt_pages and 'retval' is set to -ENOMEM which
causes ati_free_gatt_pages(); to be called at the end of the function.
The problem with this is that ati_free_gatt_pages() will then loop
'ati_generic_private.num_tables' times and try to free each entry in
tables[] - this is bad since tables has already been freed and
furthermore it will call kfree(tables) at the end - a double free.

This patch removes the freeing loop in ati_create_gatt_pages() and
instead relies entirely on the call to ati_free_gatt_pages() to free
everything we allocated in case of an error. It also sets
ati_generic_private.num_tables to the actual number of entries
allocated instead of just using the value passed in from the caller -
this ensures that ati_free_gatt_pages() will only attempt to free
stuff that was actually allocated.

Note: I'm in no way intimate with this code and I have no way to
actually test this patch (besides compile test it), so while I've
tried to be careful in reading the code and make sure the patch
does the right thing an ACK from someone who actually knows the
code in-depth would be very much appreciated.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Dave Airlie <airlied@linux.ie>
/drivers/char/agp/ati-agp.c
e5524f355a0d272ba5233537a896a668db1f3008 23-Feb-2007 Dave Jones <davej@redhat.com> [AGPGART] Further constification.

Make agp_bridge_driver->aperture_sizes and ->masks const.
Also agp_bridge_data->driver

Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/ati-agp.c
a030ce4477baa06dd9c037ccd3c8d171aac9ed44 23-Jan-2007 Thomas Hellstrom <thomas@tungstengraphics.com> [AGPGART] Allow drm-populated agp memory types

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>
/drivers/char/agp/ati-agp.c
7707ea3b784195315366e6e4b5c73ca6933ff9b0 28-Jan-2007 Dave Jones <davej@redhat.com> [AGPGART] Remove pointless assignment.

No point in clearing local pointers then returning.
Also fix up some CodingStyle nits.

Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/ati-agp.c
87a17f31a3bc9bf0c7e7493add19ef200e741248 28-Jan-2007 Dave Jones <davej@redhat.com> [AGPGART] Remove pointless typedef in ati-agp

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>
/drivers/char/agp/ati-agp.c
55b4d6a52195a8f277ffddf755ddaff359878f41 29-Jun-2006 Dave Jones <davej@redhat.com> Merge ../linus

Conflicts:

drivers/char/agp/Kconfig
d6e05edc59ecd79e8badf440c0d295a979bdfa3e 26-Jun-2006 Andreas Mohr <andi@lisas.de> spelling fixes

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>
/drivers/char/agp/ati-agp.c
b3818ed446fc41db41b5a38d934ac2b69fd2e0aa 21-Jun-2006 Dave Jones <davej@redhat.com> [AGPGART] Compile fix for ati-agp

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/ati-agp.c
a4aec2622340e356e7dcd0e8fd05378dacb71c89 20-Jun-2006 Dave Jones <davej@redhat.com> [AGPGART] Suspend/Resume improvements for ATI AGP

Based on patches in the Ubuntu kernel.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/ati-agp.c
89d17b9604ae502392e119dbdbf43f6067745715 20-Jun-2006 Dave Jones <davej@redhat.com> [AGPGART] Whitespace cleanups for ati-agp

Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/ati-agp.c
9d1ef8a64e21e57109be45a7345b09cf913e4b0e 01-Mar-2006 Dave Jones <davej@redhat.com> [AGPGART] ATI RS350 support.

From: Julien Tous <julien.tous@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/ati-agp.c
6a92a4e0d201aea6d7c83f100d77310676b2e049 28-Feb-2006 Dave Jones <davej@redhat.com> [AGPGART] Lots of CodingStyle/whitespace cleanups.

Eliminate trailing whitespace.
s/if(/if (/
s/for(/for (/

Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/ati-agp.c
5dda4986752b531d89d49c218682e42c63ef1d61 04-Jan-2006 akpm@osdl.org <akpm@osdl.org> [AGPGART] Suspend/Resume support for ATI GART

Add suspend/resume support for the ati-agp module

Signed-off-by: Jaco Kroon <jaco@kroon.co.za>
Acked-by: Pavel Machek <pavel@suse.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/ati-agp.c
249bb070f5e821503c1118e1e87c0ccb1432d191 05-Nov-2005 Greg Kroah-Hartman <gregkh@suse.de> [PATCH] PCI: removed unneeded .owner field from struct pci_driver

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/char/agp/ati-agp.c
7079060f3e86ea4c1d4e9c1e356592ef9dcaaa1f 07-Nov-2005 Linus Torvalds <torvalds@g5.osdl.org> Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
4e57b6817880946a3a78d5d8cad1ace363f7e449 31-Oct-2005 Tim Schmielau <tim@physik3.uni-rostock.de> [PATCH] fix missing includes

I recently picked up my older work to remove unnecessary #includes of
sched.h, starting from a patch by Dave Jones to not include sched.h
from module.h. This reduces the number of indirect includes of sched.h
by ~300. Another ~400 pointless direct includes can be removed after
this disentangling (patch to follow later).
However, quite a few indirect includes need to be fixed up for this.

In order to feed the patches through -mm with as little disturbance as
possible, I've split out the fixes I accumulated up to now (complete for
i386 and x86_64, more archs to follow later) and post them before the real
patch. This way this large part of the patch is kept simple with only
adding #includes, and all hunks are independent of each other. So if any
hunk rejects or gets in the way of other patches, just drop it. My scripts
will pick it up again in the next round.

Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/char/agp/ati-agp.c
ea248bcaadd5bafe4217357e1e511ac55639bcf3 25-Oct-2005 Dave Jones <davej@redhat.com> [AGPGART] Set .owner field of struct pci_driver.

From: Laurent Riffard <laurent.riffard@free.fr>

This updates .owner field of struct pci_driver.

This allows SYSFS to create the symlink from the driver to the module which
provides it.

$ tree /sys/bus/pci/drivers/agpgart-via/
/sys/bus/pci/drivers/agpgart-via/
|-- 0000:00:00.0 -> ../../../../devices/pci0000:00/0000:00:00.0
|-- bind
|-- module -> ../../../../module/via_agp
|-- new_id
`-- unbind

Signed-off-by: Laurent Riffard <laurent.riffard@free.fr>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
/drivers/char/agp/ati-agp.c
0ea27d9f2fb5b998063323bff47ab87891ced9e2 21-Oct-2005 Dave Jones <davej@redhat.com> [AGPGART] Replace kmalloc+memset's with kzalloc's

Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/ati-agp.c
07eee78ea8ba2d0b7b20551c35a3e7dd158d50bb 30-Mar-2005 Keir Fraser <Keir.Fraser@cl.cam.ac.uk> [PATCH] AGP fix for Xen VMM

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>
/drivers/char/agp/ati-agp.c
408b664a7d394a5e4315fbd14aca49b042cb2b08 01-May-2005 Adrian Bunk <bunk@stusta.de> [PATCH] make lots of things static

Another large rollup of various patches from Adrian which make things static
where they were needlessly exported.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/drivers/char/agp/ati-agp.c
1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 17-Apr-2005 Linus Torvalds <torvalds@ppc970.osdl.org> Linux-2.6.12-rc2

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!
/drivers/char/agp/ati-agp.c