Skip to contentSkip to conversation

Fix detection of aperture size versus GTT size on G965.

PATCH New [email protected] 1 participant 1 message Dec 15, 2006 Agpgart driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix detection of aperture size versus GTT size on G965.

From: Eric Anholt <[email protected]>

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.

---
 drivers/char/agp/agp.h       |    4 ++
 drivers/char/agp/intel-agp.c |  110 ++++++++++++++++++++++--------------------
 2 files changed, 62 insertions(+), 52 deletions(-)
drivers/char/agp/agp.h +4 -0
index 8b3317f..1d59e2a 100644
@@ -225,6 +225,10 @@ struct agp_bridge_data {
 #define I810_GMS_DISABLE	0x00000000
 #define I810_PGETBL_CTL		0x2020
 #define I810_PGETBL_ENABLED	0x00000001
+#define I965_PGETBL_SIZE_MASK	0x0000000e
+#define I965_PGETBL_SIZE_512KB	(0 << 1)
+#define I965_PGETBL_SIZE_256KB	(1 << 1)
+#define I965_PGETBL_SIZE_128KB	(2 << 1)
 #define I810_DRAM_CTL		0x3000
 #define I810_DRAM_ROW_0		0x00000001
 #define I810_DRAM_ROW_0_SDRAM	0x00000001
drivers/char/agp/intel-agp.c +58 -52

154 lines not on this page · raw message

Signature · 1 line
1.4.4.2