All that is needed to fix the driver is changeset 4dd00681dd0f9fce8dfd4592b46418edbbd2eeb4 out of the xf86-video-intel git tree. Unfortunately this also requires the kernel fix to work (82e14a6215cbc9804ecc35281e973c6c8ce22fe7 out of linus repository).
Both fixes are quite contained to the specific hardware and fix it to work on more cards. I guess its still no reason for a freeze exception?
X driver:
commit 4dd00681dd0f9fce8dfd4592b46418edbbd2eeb4
Author: Eric Anholt <email address hidden>
Date: Tue Oct 14 11:33:33 2008 -0700
Fix broken stolen memory counting on G4X.
On the GM45 we were assuming too little stolen memory (mostly harmless,
except when it wasn't, until the AGP fix), and on the G45 we were assuming too
much stolen memory, which was quite harmful when we touched the page that
didn't get mapped.
Future stolen memory accounting should use src/reg_dumper/intel_gtt before and
after enabling AGP on the chipset to confirm that only the GTT entries not
mapped to stolen are replaced, and that all of the unmapped GTT entries are
replaced with the constant scratch page.
/* new 4 series hardware has seperate GTT stolen with GFX stolen */
- if (IS_G4X(pI830))
- range = 0;
+ if (IS_G4X(pI830) || IS_GM45(pI830))
+ range = 4;
Kernel:
commit 82e14a6215cbc9804ecc35281e973c6c8ce22fe7
Author: Eric Anholt <email address hidden>
Date: Tue Oct 14 11:28:58 2008 -0700
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 <email address hidden>
Signed-off-by: Dave Airlie <email address hidden>
@@ -525,8 +525,10 @@ static void intel_i830_init_gtt_entries(void)
size += 4;
} else if (IS_G4X) {
/* On 4 series hardware, GTT stolen is separate from graphics
- * stolen, ignore it in stolen gtt entries counting */
- size = 0;
+ * stolen, ignore it in stolen gtt entries counting. However,
+ * 4KB of the stolen memory doesn't get mapped to the GTT.
+ */
+ size = 4;
} else {
/* On previous hardware, the GTT size was just what was
* required to map the aperture.
Some more additional information:
All that is needed to fix the driver is changeset 4dd00681dd0f9fc e8dfd4592b46418 edbbd2eeb4 out of the xf86-video-intel git tree. Unfortunately this also requires the kernel fix to work (82e14a6215cbc9 804ecc35281e973 c6c8ce22fe7 out of linus repository).
Both fixes are quite contained to the specific hardware and fix it to work on more cards. I guess its still no reason for a freeze exception?
X driver: e8dfd4592b46418 edbbd2eeb4
commit 4dd00681dd0f9fc
Author: Eric Anholt <email address hidden>
Date: Tue Oct 14 11:33:33 2008 -0700
Fix broken stolen memory counting on G4X.
On the GM45 we were assuming too little stolen memory (mostly harmless,
except when it wasn't, until the AGP fix), and on the G45 we were assuming too
much stolen memory, which was quite harmful when we touched the page that
didn't get mapped.
Future stolen memory accounting should use src/reg_ dumper/ intel_gtt before and
after enabling AGP on the chipset to confirm that only the GTT entries not
mapped to stolen are replaced, and that all of the unmapped GTT entries are
replaced with the constant scratch page.
diff --git a/src/i830_driver.c b/src/i830_driver.c y(ScrnInfoPtr pScrn)
index c1d61f4..eaf5d27 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -502,8 +502,8 @@ I830DetectMemor
range = gtt_size + 4;
/* new 4 series hardware has seperate GTT stolen with GFX stolen */
- if (IS_G4X(pI830))
- range = 0;
+ if (IS_G4X(pI830) || IS_GM45(pI830))
+ range = 4;
if (IS_I85X(pI830) || IS_I865G(pI830) || IS_I9XX(pI830)) {
switch (gmch_ctrl & I855_GMCH_GMS_MASK) {
Kernel: 04ecc35281e973c 6c8ce22fe7
commit 82e14a6215cbc98
Author: Eric Anholt <email address hidden>
Date: Tue Oct 14 11:28:58 2008 -0700
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 <email address hidden>
Signed-off-by: Dave Airlie <email address hidden>
diff --git a/drivers/ char/agp/ intel-agp. c b/drivers/ char/agp/ intel-agp. c char/agp/ intel-agp. c char/agp/ intel-agp. c bridge- >dev->device == PCI_DEVICE_ ID_INTEL_ 82965Q_ HB || \ bridge- >dev->device == PCI_DEVICE_ ID_INTEL_ 82965G_ HB || \ bridge- >dev->device == PCI_DEVICE_ ID_INTEL_ 82965GM_ HB || \ >dev->device == PCI_DEVICE_ ID_INTEL_ 82965GME_ HB || \ >dev->device == PCI_DEVICE_ ID_INTEL_ GM45_HB) >dev->device == PCI_DEVICE_ ID_INTEL_ 82965GME_ HB)
index 016fdf0..f1fe749 100644
--- a/drivers/
+++ b/drivers/
@@ -54,8 +54,7 @@
agp_
agp_
agp_
- agp_bridge-
- agp_bridge-
+ agp_bridge-
#define IS_G33 (agp_bridge- >dev->device == PCI_DEVICE_ ID_INTEL_ G33_HB || \ bridge- >dev->device == PCI_DEVICE_ ID_INTEL_ Q35_HB || \
agp_
@@ -63,7 +62,8 @@
#define IS_G4X (agp_bridge- >dev->device == PCI_DEVICE_ ID_INTEL_ IGD_E_HB || \ bridge- >dev->device == PCI_DEVICE_ ID_INTEL_ Q45_HB || \ >dev->device == PCI_DEVICE_ ID_INTEL_ G45_HB) >dev->device == PCI_DEVICE_ ID_INTEL_ G45_HB || \ >dev->device == PCI_DEVICE_ ID_INTEL_ GM45_HB)
agp_
- agp_bridge-
+ agp_bridge-
+ agp_bridge-
extern int agp_memory_ reserved;
@@ -525,8 +525,10 @@ static void intel_i830_ init_gtt_ entries( void)
size += 4;
} else if (IS_G4X) {
/* On 4 series hardware, GTT stolen is separate from graphics
- * stolen, ignore it in stolen gtt entries counting */
- size = 0;
+ * stolen, ignore it in stolen gtt entries counting. However,
+ * 4KB of the stolen memory doesn't get mapped to the GTT.
+ */
+ size = 4;
} else {
/* On previous hardware, the GTT size was just what was
* required to map the aperture.
Andres