xf86-video-intel: src/i830_memory.c

Zhenyu Wang zhen at kemper.freedesktop.org
Fri Aug 11 06:09:00 EEST 2006


 src/i830_memory.c |   30 ++++++------------------------
 1 files changed, 6 insertions(+), 24 deletions(-)

New commits:
diff-tree 2a4e486d2990af433e915cfa26dc57cae02e01b7 (from 4cfed93df6b23903704348cafe050a6546e84479)
Author: Wang Zhenyu <zhenyu.z.wang at intel.com>
Date:   Fri Aug 11 11:07:08 2006 +0800

    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.

diff --git a/src/i830_memory.c b/src/i830_memory.c
index 902b876..f270a51 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -209,17 +209,12 @@ AllocFromAGP(ScrnInfoPtr pScrn, I830MemR
       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, 
     */
    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, 
 
    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");



More information about the xorg-commit mailing list