summaryrefslogtreecommitdiff
path: root/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
diff options
context:
space:
mode:
authorRichard Liu <r66033@freescale.com>2012-07-02 09:34:31 +0800
committerJason Liu <r64343@freescale.com>2012-07-20 13:39:23 +0800
commit2ed4075ecdeffef53f9a72adfd6de1d8ad5d13bc (patch)
tree8db080ca36b2312d7d0b9bbaea274c3a0e380afd /drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
parent238266ea8df42e3527dc1d6e64c37df15166da36 (diff)
ENGR00215344 GPU became slow after long time run some applications
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
Diffstat (limited to 'drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c')
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
index 773a262562c4..c7a05a58c262 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel.c
@@ -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. */