linux/drivers/char/agp
Daniel Vetter e5e408fc94 intel-gtt: fix gtt_total_entries detection
In commit f1befe71 Chris Wilson added some code to clear the full gtt
on g33/pineview instead of just the mappable part. The code looks like
it was copy-pasted from agp/intel-gtt.c, at least an identical piece
of code is still there (in intel_i830_init_gtt_entries). This lead to
a regression in 2.6.35 which was supposedly fixed in commit e7b96f28

Now this commit makes absolutely no sense to me. It seems to be
slightly confused about chipset generations - it references docs for
4th gen but the regression concerns 3rd gen g33. Luckily the the g33
gmch docs are available with the GMCH Graphics Control pci config
register definitions. The other (bigger problem) is that the new
check in there uses the i830 stolen mem bits (.5M, 1M or 8M of stolen
mem). They are different since the i855GM.

The most likely case is that it hits the 512M fallback, which was
probably the right thing for the boxes this was tested on.

So the original approach by Chris Wilson seems to be wrong and the
current code is definitely wrong. There is a third approach by Jesse
Barnes from his RFC patch "Who wants a bigger GTT mapping range?"
where he simply shoves g33 in the same clause like later chipset
generations.

I've asked him and Jesse confirmed that this should work. So implement
it.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16891$
Tested-by: Anisse Astier <anisse@astier.eu>
Cc: stable@kernel.org
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-09-08 21:20:13 +01:00
..
agp.h agp/intel: introduce intel-agp.h header file 2010-04-18 17:33:02 -07:00
ali-agp.c agp: use scratch page on memory remove and at GATT creation V4 2010-04-23 13:59:18 +10:00
alpha-agp.c const: mark struct vm_struct_operations 2009-09-27 11:39:25 -07:00
amd64-agp.c agp: amd64, fix pci reference leaks 2010-05-26 12:54:39 +10:00
amd-k7-agp.c agp: use scratch page on memory remove and at GATT creation V4 2010-04-23 13:59:18 +10:00
ati-agp.c agp: use scratch page on memory remove and at GATT creation V4 2010-04-23 13:59:18 +10:00
backend.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
compat_ioctl.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
compat_ioctl.h agp: add chipset flushing support to AGP interface 2008-02-05 14:33:32 +10:00
efficeon-agp.c agp: efficeon-agp: do not use PCI resources before pci_enable_device() 2010-08-05 12:28:21 +10:00
frontend.c agp: Remove the BKL from agp_open 2009-10-14 17:36:54 +02:00
generic.c agp: add no warn since we have a fallback to vmalloc paths 2010-06-15 11:02:32 +10:00
hp-agp.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
i460-agp.c agp: kill phys_to_gart() and gart_to_phys() 2009-08-03 09:05:00 +01:00
intel-agp.c agp/intel: make intel-gtt.c into a real source file 2010-09-08 21:20:06 +01:00
intel-agp.h agp/intel: make intel-gtt.c into a real source file 2010-09-08 21:20:06 +01:00
intel-gtt.c intel-gtt: fix gtt_total_entries detection 2010-09-08 21:20:13 +01:00
isoch.c agp: use dev_printk when possible 2008-08-12 10:13:38 +10:00
Kconfig x86, k8 nb: Fix boot crash: enable k8_northbridges unconditionally on AMD systems 2010-03-13 08:36:16 +01:00
Makefile agp/intel: make intel-gtt.c into a real source file 2010-09-08 21:20:06 +01:00
nvidia-agp.c agp: use scratch page on memory remove and at GATT creation V4 2010-04-23 13:59:18 +10:00
parisc-agp.c agp: parisc-agp.c - use correct page_mask function 2009-10-03 01:27:56 -04:00
sgi-agp.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
sis-agp.c sis-agp: Remove SIS 760, handled by amd64-agp 2010-05-19 10:11:23 +10:00
sworks-agp.c agp: kill phys_to_gart() and gart_to_phys() 2009-08-03 09:05:00 +01:00
uninorth-agp.c agp/uninorth: Fix oops caused by flushing too much 2010-06-02 17:50:37 +10:00
via-agp.c agp: use scratch page on memory remove and at GATT creation V4 2010-04-23 13:59:18 +10:00