disable gpu to alloc dma mem
author杜坤明 <dkm@rockchip.com>
Fri, 31 Dec 2010 06:26:22 +0000 (14:26 +0800)
committer杜坤明 <dkm@rockchip.com>
Fri, 31 Dec 2010 06:26:22 +0000 (14:26 +0800)
drivers/staging/rk29/vivante/hal/os/linux/kernel/gc_hal_kernel_os.c

index 22bb37337d03365b86e572f052d24c69e0acee6b..1ef05ea5557adbe07afbd2063befbf5911be1f88 100644 (file)
@@ -42,7 +42,8 @@
 
 #define _GC_OBJ_ZONE    gcvZONE_OS
 
-#define PAGE_ALLOC_LIMIT                    1   // ÏÞÖÆPageÉêÇëÊý
+#define PAGE_ALLOC_LIMIT                    1   // ÏÞÖÆPageÉêÇë
+#define PAGE_ALLOC_LIMIT_SIZE               0   // ÏÞÖÆPageÉêÇëµÄ´óС,µ¥Î»ÎªM
 
 #if PAGE_ALLOC_LIMIT
 int g_pages_alloced = 0;
@@ -2665,7 +2666,7 @@ gceSTATUS gckOS_AllocatePagedMemoryEx(
     if (Contiguous)
     {
 #if PAGE_ALLOC_LIMIT
-        if((g_pages_alloced + numPages) > 256*32) {
+        if( (g_pages_alloced + numPages) > (256*PAGE_ALLOC_LIMIT_SIZE) ) {
             //printk("full %d! \n", g_pages_alloced);
             addr = NULL;
         } else {
@@ -2674,7 +2675,7 @@ gceSTATUS gckOS_AllocatePagedMemoryEx(
                 g_pages_alloced += numPages;
                 //printk("alloc %d / %d \n", numPages, g_pages_alloced);
             } else {
-                printk("gpu : alloc %d fail! (%d/8192)\n", numPages,  g_pages_alloced);
+                printk("gpu : alloc %d fail! (%d/%d)\n", numPages,  g_pages_alloced, (256*PAGE_ALLOC_LIMIT_SIZE) );
             }
         }
 #else