History log of /drivers/char/agp/hp-agp.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fc000154d7a63dee209aab1c13f2c19abdcf6b59 23-Aug-2011 Émeric Maschino <emeric.maschino@gmail.com> [IA64] agp/hp-agp: Allow binding user memory to the AGP GART

dmesg reports:
[   29.365973] [TTM] AGP Bind memory failed.
[   29.366015] radeon 0000:80:00.0: object_init failed for (4096, 0x00000002)
[   29.366052] radeon 0000:80:00.0: (-22) create WB bo failed
[   29.366087] radeon 0000:80:00.0: Disabling GPU acceleration
[   29.366124] [drm] radeon: cp finalized
[   29.366168] [drm] radeon: cp finalized
[   29.366210] [TTM] Finalizing pool allocator.
[   29.366924] [TTM] Zone  kernel: Used memory at exit: 0 kiB.
[   29.366961] [TTM] Zone   dma32: Used memory at exit: 0 kiB.
[   29.366996] [drm] radeon: ttm finalized
[   29.367030] [drm] Forcing AGP to PCI mode

This patch allows binding user memory to the AGP GART on zx1-based
systems. dmesg thus no more complains about AGP bind memory failure,
disabled GPU acceleration or AGP mode forced to PCI.

Original work from Francisco Jerez in agp/amd-k7
(https://lkml.org/lkml/2010/10/15/469).

Tested-by: Émeric Maschino <emeric.maschino@gmail.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
/drivers/char/agp/hp-agp.c
5a0e3ad6af8660be21ca98a971cd00f331318c05 24-Mar-2010 Tejun Heo <tj@kernel.org> include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h

percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.

2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).

* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
/drivers/char/agp/hp-agp.c
3d4a7882b11299104a0e74425dece2e26ac98024 07-Jan-2010 Bjorn Helgaas <bjorn.helgaas@hp.com> agp/hp: fail gracefully if we don't find an IOC

Bail out if we don't find an enclosing IOC. Previously, if we didn't
find one, we tried to set things up using garbage for the SBA/IOC register
address, which causes a crash.

This crash only happens if firmware supplies a defective ACPI namespace, so
it doesn't fix any problems in the field.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/hp-agp.c
67fe63b0715ccfaefa0af8a6e705c5470ee5cada 07-Jan-2010 Bjorn Helgaas <bjorn.helgaas@hp.com> agp/hp: fixup hp agp after ACPI changes

Commit 15b8dd53f5ffa changed the string in info->hardware_id from a static
array to a pointer and added a length field. But instead of changing
"sizeof(array)" to "length", we changed it to "sizeof(length)" (== 4),
which corrupts the string we're trying to null-terminate.

We no longer even need to null-terminate the string, but we *do* need to
check whether we found a HID. If there's no HID, we used to have an empty
array, but now we have a null pointer.

The combination of these defects causes this oops:

Unable to handle kernel NULL pointer dereference (address 0000000000000003)
modprobe[895]: Oops 8804682956800 [1]
ip is at zx1_gart_probe+0xd0/0xcc0 [hp_agp]

http://marc.info/?l=linux-ia64&m=126264484923647&w=2

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Reported-by: Émeric Maschino <emeric.maschino@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
/drivers/char/agp/hp-agp.c
985f38781d19101aba121df423f92c87b208c6df 19-Sep-2009 Len Brown <len.brown@intel.com> Merge branch 'acpica' into release
15b8dd53f5ffaf8e2d9095c423f713423f576c0f 29-Jun-2009 Bob Moore <robert.moore@intel.com> ACPICA: Major update for acpi_get_object_info external interface

Completed a major update for the acpi_get_object_info external interface.
Changes include:
- Support for variable, unlimited length HID, UID, and CID strings
- Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.)
- Call the _SxW power methods on behalf of a device object
- Determine if a device is a PCI root bridge
- Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO.
These changes will require an update to all callers of this interface.
See the ACPICA Programmer Reference for details.

Also, update all invocations of acpi_get_object_info interface

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/char/agp/hp-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/hp-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/hp-agp.c
43813f399c72aa22e01a680559c1cb5274bf2140 20-Jun-2009 Linus Torvalds <torvalds@linux-foundation.org> Merge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6

* 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6: (24 commits)
agp/intel: Make intel_i965_mask_memory use dma_addr_t for physical addresses
agp: add user mapping support to ATI AGP bridge.
drm/i915: enable GEM on PAE.
drm/radeon: fix unused variables warning
agp: switch AGP to use page array instead of unsigned long array
agpgart: detected ALi M???? chipset with M1621
drm/radeon: command stream checker for r3xx-r5xx hardware
drm/radeon: Fully initialize LVDS info also when we can't get it from the ROM.
radeon: Fix CP byte order on big endian architectures with KMS.
agp/uninorth: Handle user memory types.
drm/ttm: Add some powerpc cache flush code.
radeon: Enable modesetting on non-x86.
drm/radeon: Respect AGP cant_use_aperture flag.
drm: EDID endianness fixes.
drm/radeon: this VRAM vs aperture test is wrong, just remove it.
drm/ttm: fix an error path to exit function correctly
drm: Apply "Memory fragmentation from lost alignment blocks"
ttm: Return -ERESTART when a signal interrupts bo eviction.
drm: Remove memory debugging infrastructure.
drm/i915: Clear fence register on tiling stride change.
...
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/hp-agp.c
e088a4ad7fa53c3dc3c29f930025f41ccf01953e 22-May-2009 Matthew Wilcox <matthew@wil.cx> [IA64] Convert ia64 to use int-ll64.h

It is generally agreed that it would be beneficial for u64 to be an
unsigned long long on all architectures. ia64 (in common with several
other 64-bit architectures) currently uses unsigned long. Migrating
piecemeal is too painful; this giant patch fixes all compilation warnings
and errors that come as a result of switching to use int-ll64.h.

Note that userspace will still see __u64 defined as unsigned long. This
is important as it affects C++ name mangling.

[Updated by Tony Luck to change efi.h:efi_freemem_callback_t to use
u64 for start/end rather than unsigned long]

Signed-off-by: Matthew Wilcox <willy@linux.intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
/drivers/char/agp/hp-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/hp-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/hp-agp.c
e57aa839cea13852e07ecb495692b602b11136c9 17-Oct-2007 Fengguang Wu <fengguang.wu@gmail.com> convert ill defined log2() to ilog2()

It's *wrong* to have
#define log2(n) ffz(~(n))
It should be *reversed*:
#define log2(n) flz(~(n))
or
#define log2(n) fls(n)
or just use
ilog2(n) defined in linux/log2.h.

This patch follows the last solution, recommended by Andrew Morton.

Cc: <linux-ext4@vger.kernel.org>
Cc: Mingming Cao <cmm@us.ibm.com>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Chris Ahna <christopher.j.ahna@intel.com>
Cc: David Mosberger-Tang <davidm@hpl.hp.com>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Fengguang Wu <wfg@mail.ustc.edu.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
/drivers/char/agp/hp-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/hp-agp.c
e047d1cfc3cd79f75e7dda9ffb28b456f6936864 27-Feb-2007 Ryusuke Konishi <ryusuke@osrg.net> [AGPGART] fix compile errors

This fixes the following compile failures of agpgart drivers.
These errors were inserted by the recent AGPGART constification patch.

drivers/char/agp/uninorth-agp.c:492: error: expected '{' before 'const'
drivers/char/agp/uninorth-agp.c:517: error: expected '{' before 'const'
drivers/char/agp/uninorth-agp.c: In function 'agp_uninorth_probe':
drivers/char/agp/uninorth-agp.c:634: error: 'u3_agp_driver' undeclared (first use in this function)
drivers/char/agp/uninorth-agp.c:634: error: (Each undeclared identifier is reported only once
drivers/char/agp/uninorth-agp.c:634: error: for each function it appears in.)
drivers/char/agp/uninorth-agp.c:636: error: 'uninorth_agp_driver' undeclared (first use in this function)

Signed-off-by: Ryusuke Konishi <ryusuke@osrg.net>
Signed-off-by: Dave Jones <davej@redhat.com>
/drivers/char/agp/hp-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/hp-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/hp-agp.c
7f048801f4a6767433d1aeefd9c24372515265f8 02-Apr-2006 Len Brown <len.brown@intel.com> ACPI: ia64 buildfix

Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/char/agp/hp-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/hp-agp.c
24b8e0cc09483adc0fdd9c68914b19597bb9fddc 15-Sep-2005 Peter Chubb <peterc@gelato.unsw.edu.au> [IA64] Remove warnings for gcc 4.0 IA64 compilation.

This patch removes some compilation warnings, mostly
trivially. acpi.c fix also noted by Kenji Kaneshige.

Signed-off-by; Peter Chubb <peterc@gelato.unsw.edu.au>
Signed-off-by: Tony Luck <tony.luck@intel.com>
/drivers/char/agp/hp-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/hp-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/hp-agp.c