]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00215344 GPU became slow after long time run some applications
authorRichard Liu <r66033@freescale.com>
Mon, 2 Jul 2012 01:34:31 +0000 (09:34 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:34:55 +0000 (08:34 +0200)
GPU became slow after long time run some applications
root cause is when GPU reserved memory exhaust, GPU will request continue physical
memory which will trigger defregment operation in kernel and cause system slow

Signed-off-by: Richard Liu <r66033@freescale.com>
Acked-by: Lily Zhang
drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_options.h

index 773a262562c4118933509ef8d5975cad175ba0d9..c7a05a58c262ce606ed391969c1ba6892b6f9901 100644 (file)
@@ -509,8 +509,18 @@ _AllocateMemory(
         else
         if (pool == gcvPOOL_CONTIGUOUS)
         {
-            /* Create a gcuVIDMEM_NODE for contiguous memory. */
-            status = gckVIDMEM_ConstructVirtual(Kernel, gcvTRUE, Bytes, &node);
+#if gcdCONTIGUOUS_SIZE_LIMIT
+            if (Bytes > gcdCONTIGUOUS_SIZE_LIMIT)
+            {
+                status = gcvSTATUS_OUT_OF_MEMORY;
+            }
+            else
+#endif
+            {
+                /* Create a gcuVIDMEM_NODE from contiguous memory. */
+                status = gckVIDMEM_ConstructVirtual(Kernel, gcvTRUE, Bytes, &node);
+            }
+
             if (gcmIS_SUCCESS(status))
             {
                 /* Memory allocated. */
index 35743c62f2a2f3ff004ad2a7d61cc70be1441f65..0b7c42ce9190c8f1f59c848a5cf1378f7a803ed0 100644 (file)
 #   define gcdRATIO_FOR_SMALL_MEMORY            32
 #endif
 
+/*
+    gcdCONTIGUOUS_SIZE_LIMIT
+        When non-zero, size of video node from gcvPOOL_CONTIGUOUS is
+        limited by gcdCONTIGUOUS_SIZE_LIMIT.
+ */
+#ifndef gcdCONTIGUOUS_SIZE_LIMIT
+#   define gcdCONTIGUOUS_SIZE_LIMIT             4096
+#endif
 
 /*  gcdALPHA_KILL_IN_SHADER
  *