summaryrefslogtreecommitdiff
path: root/src/i830_memory.c
diff options
context:
space:
mode:
authorWang Zhenyu <zhenyu.z.wang@intel.com>2007-01-04 11:25:31 +0800
committerKeith Packard <keithp@neko.keithp.com>2007-01-06 14:37:31 -0800
commit33e912aca08fa11ef588eb386e16ba5f9ea13727 (patch)
treeb6e1617573583bbbdab2d6ffbce57fac39a7552f /src/i830_memory.c
parentfa54a3c08301e59558ab0493b3d22324f4162496 (diff)
[PATCH] Fix EXA mem binding
We should check if EXA is really enabled. Signed-off-by: Keith Packard <keithp@neko.keithp.com>
Diffstat (limited to 'src/i830_memory.c')
-rw-r--r--src/i830_memory.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 20e3afb6..60257b95 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -841,7 +841,7 @@ I830Allocate2DMemory(ScrnInfoPtr pScrn, const int flags)
pI830->Offscreen.Start, pI830->Offscreen.Size/1024);
}
}
- if (IS_I965G(pI830)) {
+ if (pI830->useEXA && IS_I965G(pI830)) {
memset(&(pI830->EXAStateMem), 0, sizeof(I830MemRange));
pI830->EXAStateMem.Key = -1;
size = ROUND_TO_PAGE(EXA_LINEAR_EXTRA);
@@ -1513,9 +1513,11 @@ I830FixupOffsets(ScrnInfoPtr pScrn)
}
#endif
#ifdef I830_USE_EXA
- I830FixOffset(pScrn, &(pI830->Offscreen));
- if (IS_I965G(pI830))
- I830FixOffset(pScrn, &(pI830->EXAStateMem));
+ if (pI830->useEXA) {
+ I830FixOffset(pScrn, &(pI830->Offscreen));
+ if (IS_I965G(pI830))
+ I830FixOffset(pScrn, &(pI830->EXAStateMem));
+ }
#endif
return TRUE;
}
@@ -1919,10 +1921,12 @@ I830BindAGPMemory(ScrnInfoPtr pScrn)
}
#endif
#ifdef I830_USE_EXA
- if (!BindMemRange(pScrn, &(pI830->Offscreen)))
- return FALSE;
- if (IS_I965G(pI830) && !BindMemRange(pScrn, &(pI830->EXAStateMem)))
- return FALSE;
+ if (pI830->useEXA) {
+ if (!BindMemRange(pScrn, &(pI830->Offscreen)))
+ return FALSE;
+ if (IS_I965G(pI830) && !BindMemRange(pScrn, &(pI830->EXAStateMem)))
+ return FALSE;
+ }
#endif
pI830->GttBound = 1;
}