aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2008-10-14 14:28:58 -0400
committerDave Airlie <airlied@redhat.com>2008-10-16 00:10:00 -0400
commit82e14a6215cbc9804ecc35281e973c6c8ce22fe7 (patch)
treeef86894308387ff38d4c2dbc50e88d4ad7136bbb /drivers
parent3fa8749e584b55f1180411ab1b51117190bac1e5 (diff)
agp: Fix stolen memory counting on G4X.
On the GM45, the amount of stolen memory mapped to the GTT was underestimated, even though we had 508KB more available since the GTT doesn't take from stolen memory. On the non-GM45 G4X, we overestimated how much stolen was mapped to the GTT by 4KB, resulting in GPU page faults when that page was accessed. This update requires a corresponding update to xf86-video-intel to work correctly. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/agp/intel-agp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 016fdf0623a4..f1fe74901314 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -54,8 +54,7 @@
54 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \ 54 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965Q_HB || \
55 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \ 55 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965G_HB || \
56 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \ 56 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GM_HB || \
57 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB || \ 57 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_82965GME_HB)
58 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB)
59 58
60#define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \ 59#define IS_G33 (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G33_HB || \
61 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \ 60 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q35_HB || \
@@ -63,7 +62,8 @@
63 62
64#define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_E_HB || \ 63#define IS_G4X (agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_IGD_E_HB || \
65 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \ 64 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_Q45_HB || \
66 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB) 65 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_G45_HB || \
66 agp_bridge->dev->device == PCI_DEVICE_ID_INTEL_GM45_HB)
67 67
68extern int agp_memory_reserved; 68extern int agp_memory_reserved;
69 69
@@ -525,8 +525,10 @@ static void intel_i830_init_gtt_entries(void)
525 size += 4; 525 size += 4;
526 } else if (IS_G4X) { 526 } else if (IS_G4X) {
527 /* On 4 series hardware, GTT stolen is separate from graphics 527 /* On 4 series hardware, GTT stolen is separate from graphics
528 * stolen, ignore it in stolen gtt entries counting */ 528 * stolen, ignore it in stolen gtt entries counting. However,
529 size = 0; 529 * 4KB of the stolen memory doesn't get mapped to the GTT.
530 */
531 size = 4;
530 } else { 532 } else {
531 /* On previous hardware, the GTT size was just what was 533 /* On previous hardware, the GTT size was just what was
532 * required to map the aperture. 534 * required to map the aperture.