Archived
14
0
Fork 0
Commit graph

198 commits

Author SHA1 Message Date
Wang Zhenyu
9614ece14f [AGPGART] intel_agp: use table for device probe
Fixed issues noted by Christoph Hellwig, and I changed device table
scan a bit to allow the case that some models of graphics chips may
have same host bridge type. This type of chip will be added in the future.

This patch cleans up device probe function. Eric Anholt was the original author.

Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-06-06 17:10:03 -04:00
Wang Zhenyu
c4ca881796 [AGPGART] intel_agp: cleanup intel private data
Remove volatile type declare for IO mem variables.

A single private gart data is used by all drivers, this
makes it clean. Eric Anholt wrote the original patch.

Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-06-06 17:10:02 -04:00
Alexey Dobriyan
e8edc6e03a Detach sched.h from mm.h
First thing mm.h does is including sched.h solely for can_do_mlock() inline
function which has "current" dereference inside. By dealing with can_do_mlock()
mm.h can be detached from sched.h which is good. See below, why.

This patch
a) removes unconditional inclusion of sched.h from mm.h
b) makes can_do_mlock() normal function in mm/mlock.c
c) exports can_do_mlock() to not break compilation
d) adds sched.h inclusions back to files that were getting it indirectly.
e) adds less bloated headers to some files (asm/signal.h, jiffies.h) that were
   getting them indirectly

Net result is:
a) mm.h users would get less code to open, read, preprocess, parse, ... if
   they don't need sched.h
b) sched.h stops being dependency for significant number of files:
   on x86_64 allmodconfig touching sched.h results in recompile of 4083 files,
   after patch it's only 3744 (-8.3%).

Cross-compile tested on

	all arm defconfigs, all mips defconfigs, all powerpc defconfigs,
	alpha alpha-up
	arm
	i386 i386-up i386-defconfig i386-allnoconfig
	ia64 ia64-up
	m68k
	mips
	parisc parisc-up
	powerpc powerpc-up
	s390 s390-up
	sparc sparc-up
	sparc64 sparc64-up
	um-x86_64
	x86_64 x86_64-up x86_64-defconfig x86_64-allnoconfig

as well as my two usual configs.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21 09:18:19 -07:00
Gabriel Mansi
bbdfff86a8 [AGPGART] Fix wrong ID in via-agp.c
there is a wrong id in drivers/char/agp/via-agp.c
#define PCI_DEVICE_ID_VIA_CX700         0x8324
It must be 0x0324

Notice that PCI_DEVICE_ID_VIA_CX700 is also used in
drivers/i2c/busses/i2c-viapro.c and
drivers/ide/pci/via82cxxx.c

So, I think that constant must be renamed to avoid conflicting.
I attached a proposed patch.

Signed-off-by: Dave Jones <davej@redhat.com>
2007-05-13 17:41:47 -04:00
Andrew Hastings
547c5355d1 x86_64: off-by-two error in aperture.c
I'm using a custom BIOS to configure the northbridge GART at address
0x80000000, size 2G.  Linux complains:

"Aperture from northbridge cpu 0 beyond 4GB. Ignoring."

I think there's an off-by-two error in arch/x86_64/kernel/aperture.c:

AK: use correct types for i386

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-11 12:53:00 -07:00
Paul Mackerras
02bbc0f09c Merge branch 'linux-2.6' 2007-05-08 13:37:51 +10:00
Linus Torvalds
ea62ccd00f Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6
* 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6: (231 commits)
  [PATCH] i386: Don't delete cpu_devs data to identify different x86 types in late_initcall
  [PATCH] i386: type may be unused
  [PATCH] i386: Some additional chipset register values validation.
  [PATCH] i386: Add missing !X86_PAE dependincy to the 2G/2G split.
  [PATCH] x86-64: Don't exclude asm-offsets.c in Documentation/dontdiff
  [PATCH] i386: avoid redundant preempt_disable in __unlazy_fpu
  [PATCH] i386: white space fixes in i387.h
  [PATCH] i386: Drop noisy e820 debugging printks
  [PATCH] x86-64: Fix allnoconfig error in genapic_flat.c
  [PATCH] x86-64: Shut up warnings for vfat compat ioctls on other file systems
  [PATCH] x86-64: Share identical video.S between i386 and x86-64
  [PATCH] x86-64: Remove CONFIG_REORDER
  [PATCH] x86-64: Print type and size correctly for unknown compat ioctls
  [PATCH] i386: Remove copy_*_user BUG_ONs for (size < 0)
  [PATCH] i386: Little cleanups in smpboot.c
  [PATCH] x86-64: Don't enable NUMA for a single node in K8 NUMA scanning
  [PATCH] x86: Use RDTSCP for synchronous get_cycles if possible
  [PATCH] i386: Add X86_FEATURE_RDTSCP
  [PATCH] i386: Implement X86_FEATURE_SYNC_RDTSC on i386
  [PATCH] i386: Implement alternative_io for i386
  ...

Fix up trivial conflict in include/linux/highmem.h manually.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-05 14:55:20 -07:00
Linus Torvalds
89661adaae Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (59 commits)
  PCI: Free resource files in error path of pci_create_sysfs_dev_files()
  pci-quirks: disable MSI on RS400-200 and RS480
  PCI hotplug: Use menuconfig objects
  PCI: ZT5550 CPCI Hotplug driver fix
  PCI: rpaphp: Remove semaphores
  PCI: rpaphp: Ensure more pcibios_add/pcibios_remove symmetry
  PCI: rpaphp: Use pcibios_remove_pci_devices() symmetrically
  PCI: rpaphp: Document is_php_dn()
  PCI: rpaphp: Document find_php_slot()
  PCI: rpaphp: Rename rpaphp_register_pci_slot() to rpaphp_enable_slot()
  PCI: rpaphp: refactor tail call to rpaphp_register_slot()
  PCI: rpaphp: remove rpaphp_set_attention_status()
  PCI: rpaphp: remove print_slot_pci_funcs()
  PCI: rpaphp: Remove setup_pci_slot()
  PCI: rpaphp: remove a call that does nothing but a pointer lookup
  PCI: rpaphp: Remove another wrappered function
  PCI: rpaphp: Remve another call that is a wrapper
  PCI: rpaphp: remove a function that does nothing but wrap debug printks
  PCI: rpaphp: Remove un-needed goto
  PCI: rpaphp: Fix a memleak; slot->location string was never freed
  ...
2007-05-04 18:04:29 -07:00
Michael Ellerman
bab41e9be7 PCI: Convert to alloc_pci_dev()
Convert code that allocs a struct pci_dev to use alloc_pci_dev().

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-05-02 19:02:37 -07:00
Jan Beulich
b92e9fac40 [PATCH] x86: fix amd64-agp aperture validation
Under CONFIG_DISCONTIGMEM, assuming that a !pfn_valid() implies all
subsequent pfn-s are also invalid is wrong. Thus replace this by
explicitly checking against the E820 map.

AK: make e820 on x86-64 not initdata

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Acked-by: Mark Langsdorf <mark.langsdorf@amd.com>
2007-05-02 19:27:11 +02:00
Stephen Rothwell
40cd3a4564 [POWERPC] Rename get_property to of_get_property: drivers
These are all the remaining instances of get_property.  Simple rename of
get_property to of_get_property.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-05-02 20:04:32 +10:00
Alan Cox
881ba59d46 [AGPGART] sworks-agp: Switch to PCI ref counting APIs
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:51 -04:00
Alan Cox
1e41573283 [AGPGART] Nvidia AGP: Use refcount aware PCI interfaces
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:51 -04:00
Dave Jones
b826b4d6e4 [AGPGART] Fix sparse warning in sgi-agp.c
drivers/char/agp/sgi-agp.c:51:10: warning: Using plain integer as NULL pointer

Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:51 -04:00
Jan Beulich
89cf7ccc93 [AGPGART] Intel-agp adjustments
Fix a call to __free_page where __free_pages(, 2) was meant, and do proper
error path handling. Also remove a redundant conditional.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:51 -04:00
Jan Beulich
9eeee24414 [AGPGART] Move [un]map_page_into_agp into asm/agp.h
Remove an arch-dependent hunk in favor of #define-ing the respective bits in
asm-<arch>/agp.h (allowing easier overriding in para-virtualized environments).

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:50 -04:00
Jan Beulich
77ec430ec3 [AGPGART] Add missing calls to global_flush_tlb() to ali-agp
add missing calls to global_flush_tlb().

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:50 -04:00
Oliver Neukum
82eab1306c [AGPGART] prevent probe collision of sis-agp and amd64_agp
For some vendor/id pairs the kernel will autoload both the sis-agp and the
amd64_agp modules as the sis-agp module will load for all sis devices.
This collision causes the bug reported in:
http://bugzilla.novell.com/show_bug.cgi?id=248665

As currently sis_probe does its own matching, requesting the whole range
gains nothing.  The clean fix seems to me to leave the matching to the core
and advertise only the devices actually supported.  This patch does so.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-26 14:22:50 -04:00
Wang Zhenyu
52ea0718ea [AGPGART] intel_agp: fix G965 GTT size detect
On G965, I810_PGETBL_CTL is a mmio offset, but we wrongly take it
as pci config space offset in detecting GTT size. This one line patch
fixs this.

Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-09 22:09:58 -04:00
Wang Zhenyu
4598af33d9 [AGPGART] intel_agp: PCI id update for Intel 965GM
Update PCI id info for Intel 965GM chipset.

Signed-off-by: Wang Zhenyu <zhenyu.z.wang@intel.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-04-08 21:31:58 -04:00
Ryusuke Konishi
e047d1cfc3 [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>
2007-02-27 00:36:00 -05:00
Kyle McMartin
fb55a0debe [PARISC] parisc-agp: Fix thinko const-ifying
Can't really blame davej for mucking this up... static-ify
it while we're at it, which would have prevented this...

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2007-02-26 21:29:26 -05:00
Linus Torvalds
b0138a6cb7 Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (78 commits)
  [PARISC] Use symbolic last syscall in __NR_Linux_syscalls
  [PARISC] Add missing statfs64 and fstatfs64 syscalls
  Revert "[PARISC] Optimize TLB flush on SMP systems"
  [PARISC] Compat signal fixes for 64-bit parisc
  [PARISC] Reorder syscalls to match unistd.h
  Revert "[PATCH] make kernel/signal.c:kill_proc_info() static"
  [PARISC] fix sys_rt_sigqueueinfo
  [PARISC] fix section mismatch warnings in harmony sound driver
  [PARISC] do not export get_register/set_register
  [PARISC] add ENTRY()/ENDPROC() and simplify assembly of HP/UX emulation code
  [PARISC] convert to use CONFIG_64BIT instead of __LP64__
  [PARISC] use CONFIG_64BIT instead of __LP64__
  [PARISC] add ASM_EXCEPTIONTABLE_ENTRY() macro
  [PARISC] more ENTRY(), ENDPROC(), END() conversions
  [PARISC] fix ENTRY() and ENDPROC() for 64bit-parisc
  [PARISC] Fixes /proc/cpuinfo cache output on B160L
  [PARISC] implement standard ENTRY(), END() and ENDPROC()
  [PARISC] kill ENTRY_SYS_CPUS
  [PARISC] clean up debugging printks in smp.c
  [PARISC] factor syscall_restart code out of do_signal
  ...

Fix conflict in include/linux/sched.h due to kill_proc_info() being made
publicly available to PARISC again.
2007-02-26 12:48:06 -08:00
Dave Jones
e5524f355a [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>
2007-02-22 18:41:28 -05:00
Zwane Mwaikambo
a5220b463e [AGPGART] Fix modular agpgart ia64 allmodconfig
My previous compat AGP patch broke modular AGPGART.

Test built on;

i386 CONFIG_AGP=y,m
x86_64 CONFIG_AGP=y
ia64 CONFIG_AGP=m

Signed-off-by: Zwane Mwaikambo <zwane@infradead.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-20 14:18:01 -05:00
Kyle McMartin
e7b3ca0854 Merge branch 'parisc' from /home/kyle/repos/parisc-2.6.git
Conflicts:

	arch/parisc/hpux/sys_hpux.c
	arch/parisc/mm/ioremap.c
2007-02-17 00:18:23 -05:00
Andrew Morton
1c14cfbbe7 [AGPGART] allow drm populated agp memory types cleanups
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>
2007-02-10 19:56:36 -05:00
Ahmed S. Darwish
1eaf122cda [AGPGART] intel-agp: Use ARRAY_SIZE macro when appropriate
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>
2007-02-06 11:45:57 -05:00
Thomas Hellstrom
bf1e5989aa [AGPGART] Add agp-type-to-mask-type method missing from some drivers.
Signed-off-by: Dave Jones <davej@redhat.com>
2007-02-05 09:04:42 -05:00
Dave Jones
e4ac5e4f55 [AGPGART] Don't try to remap i810 registers on resume.
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>
2007-02-04 17:37:42 -05:00
Thomas Hellstrom
a030ce4477 [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>
2007-02-03 17:16:24 -05:00
Zwane Mwaikambo
0316fe8319 [AGPGART] compat ioctl
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>
2007-02-03 17:16:24 -05:00
Dave Jones
43ed41f648 [AGPGART] Add new IDs to VIA AGP.
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>
2007-01-28 17:58:33 -05:00
Dave Jones
7707ea3b78 [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>
2007-01-28 17:50:17 -05:00
Dave Jones
87a17f31a3 [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>
2007-01-28 17:41:37 -05:00
Dave Jones
c30efbaeaa [AGPGART] Prevent (unlikely) memory leak in amd_create_gatt_pages()
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>
2007-01-28 17:39:19 -05:00
Wang Zhenyu
4b95320fc4 [AGPGART] intel_agp: restore graphics device's pci space early in resume
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>
2007-01-17 00:26:30 -05:00
akpm@osdl.org
7b37b064c2 [AGPGART] drivers/char/agp/sgi-agp.c: check kmalloc() return value
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>
2007-01-02 23:37:31 -05:00
Thomas Hellstrom
7f02d687b4 [AGPGART] Fix PCI-posting flush typo.
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>
2006-12-28 22:24:45 -05:00
Eric Anholt
c41e0deb50 [AGPGART] fix detection of aperture size versus GTT size on G965
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>
2006-12-22 23:12:22 -05:00
Thomas Hellstrom
5aa80c7226 [AGPGART] Remove unnecessary flushes when inserting and removing pages.
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>
2006-12-22 22:44:09 -05:00
Gabriel Mansi
d5cb8d38cd [AGPGART] K8M890 support for amd-k8.
Signed-off-by: Dave Jones <davej@redhat.com>
2006-12-18 19:13:54 -05:00
Dave Jones
f0eef25339 Merge ../linus 2006-12-12 18:13:32 -05:00
Matthew Wilcox
0cfea5dd98 [AGPGART] VIA and SiS AGP chipsets are x86-only
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>
2006-12-12 18:10:52 -05:00
Randy Dunlap
0ac633b23d [AGPGART] agp-amd64: section mismatches with HOTPLUG=n
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>
2006-12-12 18:10:52 -05:00
Matthew Wilcox
423c8ece29 [PARISC] parisc-agp: Fix integer/pointer warning
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-12-08 00:34:32 -05:00
Randy Dunlap
da015a6744 [PATCH] agp-amd64: section mismatches with HOTPLUG=n
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>
2006-12-07 08:39:40 -08:00
Linus Torvalds
66c669baa7 [AGP] Allocate AGP pages with GFP_DMA32 by default
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-11-22 14:55:29 -08:00
Linus Torvalds
7d915a3898 [AGP] Fix intel 965 AGP memory mapping function
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>
2006-11-22 09:37:54 -08:00
Dave Jones
28af24bb84 [AGPGART] Fix up misprogrammed bridges with incorrect AGPv2 rates.
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>
2006-11-03 15:13:27 -05:00
Linus Torvalds
946b92437e Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart:
  [AGPGART] uninorth: Add module param 'aperture' for aperture size
2006-10-21 13:39:44 -07:00
Michel Dnzer
18088748d2 [AGPGART] uninorth: Add module param 'aperture' for aperture size
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>
2006-10-15 19:49:59 -04:00
Kyle McMartin
08a6436816 [PARISC] Add support for Quicksilver AGPGART
Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
2006-10-04 06:50:16 -06:00
Dave Jones
2cc1a4134f [AGPGART] printk fixups.
Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-28 19:50:07 -04:00
Alan Cox
7357db1209 [AGPGART] Use pci_get_slot not pci_find_slot
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-26 23:05:55 -04:00
Linus Torvalds
6585b57240 Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* 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
2006-09-22 17:50:50 -07:00
Dave Jones
edf03fb057 [AGPGART] Rework AGPv3 modesetting fallback.
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-09-10 21:12:20 -04:00
Dave Jones
08da3f413f [AGPGART] Add suspend callback for i965
Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-10 21:09:26 -04:00
Dave Jones
c14635eb4e [AGPGART] Fix number of aperture sizes in 830 gart structs.
Spotted by Eric Anholt.
Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-06 11:59:35 -04:00
Eric Anholt
65c25aadfa [AGPGART] Intel 965 Express support.
From: Alan Hourihane <alanh@tungstengraphics.com>
From: Eric Anholt <eric@anholt.net>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-09-06 11:57:18 -04:00
Alexey Dobriyan
8eb7925f93 [AGPGART] agp.h: constify struct agp_bridge_data::version
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>
2006-09-05 17:19:51 -04:00
Dave Jones
b53e674a70 [AGPGART] const'ify VIA AGP PCI table.
Signed-off-by: Dave Jones <davej@redhat.com>
2006-08-11 18:13:41 -04:00
Alexey Dobriyan
85be7d6059 [AGPGART] CONFIG_PM=n slim: drivers/char/agp/intel-agp.c
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-08-11 18:10:27 -04:00
Alexey Dobriyan
71565619af [AGPGART] CONFIG_PM=n slim: drivers/char/agp/efficeon-agp.c
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-08-11 18:10:27 -04:00
Dave Jones
e7745d4e02 [AGPGART] Const'ify the agpgart driver version.
Signed-off-by: Dave Jones <davej@redhat.com>
2006-08-11 18:02:27 -04:00
Jeremy Kerr
b04e3dd4ab [POWERPC] video & agp: Constify & voidify get_property()
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>
2006-07-31 15:55:05 +10:00
Hugh Dickins
804af2cf6e [AGPGART] remove private page protection map
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>
2006-07-26 19:58:39 -04:00
Arjan van de Ven
62322d2554 [PATCH] make more file_operation structs static
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>
2006-07-03 15:26:59 -07:00
Jörn Engel
6ab3d5624e Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-30 19:25:36 +02:00
Dave Jones
55b4d6a521 Merge ../linus
Conflicts:

	drivers/char/agp/Kconfig
2006-06-29 16:01:54 -04:00
Dave Jones
adf8a28715 [AGPGART] Make AGP depend on PCI
Fixes possible compile error in amd64 with pci=n
pointed out by Adrian Bunk.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-28 13:38:43 -04:00
Jesper Juhl
8f76078037 [PATCH] Remove redundant NULL checks before [kv]free - in drivers/
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>
2006-06-27 17:32:48 -07:00
Linus Torvalds
da206c9e68 Merge git://git.kernel.org/pub/scm/linux/kernel/git/bunk/trivial
* 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
2006-06-26 13:33:14 -07:00
Andi Kleen
a813ce432f [PATCH] x86_64: Rename IOMMU option, fix help and mark option embedded.
- 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>
2006-06-26 10:48:17 -07:00
Andi Kleen
a32073bffc [PATCH] x86_64: Clean and enhance up K8 northbridge access code
- 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>
2006-06-26 10:48:15 -07:00
Andreas Mohr
d6e05edc59 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>
2006-06-26 18:35:02 +02:00
Adrian Bunk
4280370efe [AGPGART] remove unused variable
This patch removes an unused variable.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-24 01:54:14 -04:00
Linus Torvalds
37224470c8 Merge branch 'release' of 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
2006-06-23 07:52:36 -07:00
Roman Zippel
dcc1a66a09 [PATCH] x86_64: use select for GART_IOMMU to enable AGP
The AGP default doesn't work well with other selects, so use a select for
GART_IOMMU as well.  Remove a redundant default for SWIOTLB as well.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@muc.de>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-22 15:05:58 -07:00
Dave Jones
4092e256ca [AGPGART] Fix pci_register_driver checking in amd64-agp
pci_register_driver() never returns a positive number.

Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-21 17:36:24 -04:00
Dave Jones
b3818ed446 [AGPGART] Compile fix for ati-agp
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-21 13:10:26 -04:00
Dave Jones
c5f2f261e7 [AGPGART] Suspend/Resume support for nVidia nForce AGP.
Based on a patch from the Ubuntu kernel.

Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-20 00:44:38 -04:00
Dave Jones
a4aec26223 [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>
2006-06-20 00:42:04 -04:00
Dave Jones
89d17b9604 [AGPGART] Whitespace cleanups for ati-agp
Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-20 00:39:19 -04:00
Len Brown
b3899c6613 Pull acpica into release branch 2006-06-15 15:19:48 -04:00
Andrew Morton
81c2466915 [AGPGART] alpha-agp warning fix
drivers/char/agp/alpha-agp.c:138: warning: initialization from incompatible pointer type
drivers/char/agp/alpha-agp.c:139: warning: initialization from incompatible pointer type

Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Richard Henderson <rth@twiddle.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-08 22:41:17 -04:00
Andrew Morton
b07cd5181f [AGPGART] uninorth-agp warning fixes
drivers/char/agp/uninorth-agp.c: In function `agp_uninorth_suspend':
drivers/char/agp/uninorth-agp.c:332: warning: cast to pointer from integer of different size
drivers/char/agp/uninorth-agp.c: In function `agp_uninorth_resume':
drivers/char/agp/uninorth-agp.c:354: warning: cast from pointer to integer of different size

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-06-08 22:41:16 -04:00
Dave Jones
01af2fac9e [AGPGART] Remove pointless initialisation in intel-agp
Signed-off-by: Dave Jones <davej@redhat.com>
2006-05-30 18:22:07 -04:00
Dave Jones
89197e34ea [AGPGART] Remove pointless code from agp_generic_create_gatt_table()
Signed-off-by: Dave Jones <davej@redhat.com>
2006-05-30 18:19:39 -04:00
Magnus Kessler
7dd1d9b85c [AGPGART] VIA PT880 Ultra support.
This patch enables agpgart on a Via "PT880 Ultra" based motherboard
(Asus P4V800D-X). The PCI ID of the PT880 Ultra is 0x0308 instead of
0x0258 of the PT880.

The patched via-agp passes testgart.

Signed-off-by: Magnus Kessler <Magnus.Kessler@gmx.net>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-05-22 13:56:02 -04:00
Dave Jones
ca2797ffaa [AGPGART] Fix Nforce3 suspend on amd64.
kernel.org bugzilla #6206

Based on patch from Serge Belyshev <belyshev@depni.sinp.msu.ru>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-05-21 17:11:42 -04:00
Andi Kleen
283a12c53b [AGPGART] Enable SIS AGP driver on x86-64 for EM64T systems
Enable SIS AGP driver on x86-64 for EM64T systems

Untested so far

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-05-21 17:10:55 -04:00
H. Peter Anvin
1f60245479 [efficeon-agp] Add missing memory mask
Original patch by Benjamin Herrenschmidt after debugging by Brian Hinz.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Brian Hinz <bphinz@hotmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-14 17:41:06 -07:00
Len Brown
7f048801f4 ACPI: ia64 buildfix
Signed-off-by: Len Brown <len.brown@intel.com>
2006-04-01 23:45:39 -05:00
Marcelo Feitoza Parisi
05613bdd86 [PATCH] nvidia-agp: use time_before_eq()
It deals with wrapping correctly and is nicer to read.

Signed-off-by: Marcelo Feitoza Parisi <marcelo@feitoza.com.br>
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-28 09:16:06 -08:00
Andi Kleen
9d1f6b28ee [AGPGART] x86_64: Enable VIA AGP driver on x86-64 for VIA P4 chipsets
Untested so far
[davej: but needed for some newer EM64T systems]

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-03-24 19:24:56 -05:00
Henrik Kretzschmar
5c48b0e359 [AGPGART] x86_64: Fix wrong PCI ID for ALI M1695 AGP bridge
[description by AK]
Made a cut'n'paste error when adding the entry for the ALI M1695
AGP bridge and added a second entry for the 1689

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-03-24 19:24:56 -05:00
Dave Jones
9d1ef8a64e [AGPGART] ATI RS350 support.
From: Julien Tous <julien.tous@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
2006-03-01 14:23:14 -05:00
Dave Jones
6a92a4e0d2 [AGPGART] Lots of CodingStyle/whitespace cleanups.
Eliminate trailing whitespace.
s/if(/if (/
s/for(/for (/

Signed-off-by: Dave Jones <davej@redhat.com>
2006-02-28 00:54:25 -05:00
Dave Jones
b41c82eb5f [AGPGART] Add some informational printk to nforce GART failure path.
Signed-off-by: Dave Jones <davej@redhat.com>
2006-02-20 18:34:37 -05:00