summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWang Zhenyu <zhenyu.z.wang@intel.com>2006-08-11 11:07:08 +0800
committerWang Zhenyu <zhenyu.z.wang@intel.com>2006-08-11 11:07:08 +0800
commit2a4e486d2990af433e915cfa26dc57cae02e01b7 (patch)
tree658cfdcd4f2984e6137346d902217c5f4230837f /src
parent4cfed93df6b23903704348cafe050a6546e84479 (diff)
Fix undefined alloc type for agp memory
This shuts up the nonfatal warning that type 3 for alloc agp memory is undefined for intel-agp.
Diffstat (limited to 'src')
-rw-r--r--src/i830_memory.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 902b876e..f270a51e 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -209,17 +209,12 @@ AllocFromAGP(ScrnInfoPtr pScrn, I830MemRange *result, long size,
if (newApStart > newApEnd)
return 0;
- if (flags & NEED_PHYSICAL_ADDR) {
+ if (flags & NEED_PHYSICAL_ADDR)
result->Key = xf86AllocateGARTMemory(pScrn->scrnIndex, size, 2,
&(result->Physical));
- } else {
- /* Due to a bug in agpgart in 2.6 kernels resulting in very poor
- * allocation performance we need to workaround it here...
- */
- result->Key = xf86AllocateGARTMemory(pScrn->scrnIndex, size, 3, NULL);
- if (result->Key == -1)
- result->Key = xf86AllocateGARTMemory(pScrn->scrnIndex, size, 0, NULL);
- }
+ else
+ result->Key = xf86AllocateGARTMemory(pScrn->scrnIndex, size, 0, NULL);
+
if (result->Key == -1)
return 0;
}
@@ -973,13 +968,7 @@ I830Allocate2DMemory(ScrnInfoPtr pScrn, const int flags)
*/
if (!dryrun) {
memset(&(pI830->Dummy), 0, sizeof(pI830->Dummy));
- /* Due to a bug in agpgart in 2.6 kernels resulting in very poor
- * allocation performance we need to workaround it here...
- */
- pI830->Dummy.Key =
- xf86AllocateGARTMemory(pScrn->scrnIndex, size, 3, NULL);
- if (pI830->Dummy.Key == -1)
- pI830->Dummy.Key = xf86AllocateGARTMemory(pScrn->scrnIndex, size, 0, NULL);
+ pI830->Dummy.Key = xf86AllocateGARTMemory(pScrn->scrnIndex, size, 0, NULL);
pI830->Dummy.Offset = 0;
}
#endif
@@ -1399,14 +1388,7 @@ I830DoPoolAllocation(ScrnInfoPtr pScrn, I830MemPool *pool)
if (pool->Total.Size > pool->Fixed.Size) {
pool->Allocated.Size = pool->Total.Size - pool->Fixed.Size;
- /* Due to a bug in agpgart in 2.6 kernels resulting in very poor
- * allocation performance we need to workaround it here...
- */
- pool->Allocated.Key =
- xf86AllocateGARTMemory(pScrn->scrnIndex, pool->Allocated.Size,
- 3, NULL);
- if (pool->Allocated.Key == -1)
- pool->Allocated.Key = xf86AllocateGARTMemory(pScrn->scrnIndex,
+ pool->Allocated.Key = xf86AllocateGARTMemory(pScrn->scrnIndex,
pool->Allocated.Size, 0, NULL);
if (pool->Allocated.Key == -1) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Pool allocation failed\n");