summaryrefslogtreecommitdiff
path: root/src/i830_memory.c
diff options
context:
space:
mode:
authorWang Zhenyu <zhenyu.z.wang@intel.com>2007-03-06 12:44:04 +0800
committerWang Zhenyu <zhenyu.z.wang@intel.com>2007-03-06 12:44:04 +0800
commit5c720147e2b86ca4046b7c3812c1ca6b0fb78c9d (patch)
treecde5f55732cb57540a81ead510b11860334ef966 /src/i830_memory.c
parentd717d9d566fe3c0866b06840114e1c1990bd7be0 (diff)
EXA: try to always alloc exa i965 state buffer in stolen mem
I think this is a safe way to work around any possible chip error.
Diffstat (limited to 'src/i830_memory.c')
-rw-r--r--src/i830_memory.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 5cddf173..7bcf48e0 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -936,6 +936,20 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
"Failed to allocate logical context space.\n");
return FALSE;
}
+#ifdef I830_USE_EXA
+ if (pI830->useEXA) {
+ if (IS_I965G(pI830) && pI830->exa_965_state == NULL) {
+ pI830->exa_965_state =
+ i830_allocate_memory(pScrn, "exa G965 state buffer",
+ EXA_LINEAR_EXTRA, GTT_PAGE_SIZE, 0);
+ if (pI830->exa_965_state == NULL) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "Failed to allocate exa state buffer for 965.\n");
+ return FALSE;
+ }
+ }
+ }
+#endif
#ifdef I830_XV
/* Allocate overlay register space and optional XAA linear allocator
@@ -982,17 +996,6 @@ i830_allocate_2d_memory(ScrnInfoPtr pScrn)
return FALSE;
}
}
-
- if (IS_I965G(pI830) && pI830->exa_965_state == NULL) {
- pI830->exa_965_state =
- i830_allocate_memory(pScrn, "exa G965 state buffer",
- EXA_LINEAR_EXTRA, GTT_PAGE_SIZE, 0);
- if (pI830->exa_965_state == NULL) {
- xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
- "Failed to allocate exa state buffer for 965.\n");
- return FALSE;
- }
- }
}
#endif /* I830_USE_EXA */