summaryrefslogtreecommitdiff
path: root/src/i830_memory.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-05-02 14:08:30 -0700
committerEric Anholt <eric@anholt.net>2007-05-02 14:31:57 -0700
commitf3168e3b0c5664a322ca6bb1c81fc94844cb30ab (patch)
treecdb5c898826081d3743874c855722f1c9e08d3b7 /src/i830_memory.c
parent1fc630f24f8ad9e304cb0761f9cacca2224203c4 (diff)
Disable non-working GTT decoding on i830, and fix map/unmap of GTT.
Diffstat (limited to 'src/i830_memory.c')
-rw-r--r--src/i830_memory.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 9cf14e4e..3ae10cfb 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -324,7 +324,13 @@ static unsigned long
i830_get_gtt_physical(ScrnInfoPtr pScrn, unsigned long offset)
{
I830Ptr pI830 = I830PTR(pScrn);
- CARD32 gttentry = INGTT(offset / 1024);
+ CARD32 gttentry;
+
+ /* We don't have GTTBase set up on i830 yet. */
+ if (pI830->GTTBase == NULL)
+ return -1;
+
+ gttentry = INGTT(offset / 1024);
/* Mask out these reserved bits on this hardware. */
if (!IS_I965G(pI830))