summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren Huang <b02279@freescale.com>2013-03-28 18:14:17 +0800
committerLoren Huang <b02279@freescale.com>2013-03-28 18:20:47 +0800
commit896ea2026267ef29980fa3b3d4965113ac1c9329 (patch)
tree26a4f883161cef3d6385652fe03f6bf3f4276969
parent08c9214073ca584a41641456b54a1167815d2970 (diff)
downloadlinux-896ea2026267ef29980fa3b3d4965113ac1c9329.tar.gz
ENGR00255322 Disable non-contiguous memory using for VG
Current OpenVG doesn't support to use non-contiguous memory. Forbid VG to try to allocate non-contiguous memory when video memory is used up temporarily. Signed-off-by: Loren Huang <b02279@freescale.com> Acked-by: Lily Zhang
-rw-r--r--drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c
index 3c7cf3994c04..7d0032e3bff8 100644
--- a/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c
+++ b/drivers/mxc/gpu-viv/hal/kernel/gc_hal_kernel_vg.c
@@ -23,6 +23,8 @@
#if gcdENABLE_VG
+#define ENABLE_VG_TRY_VIRTUAL_MEMORY 0
+
#define _GC_OBJ_ZONE gcvZONE_VG
/******************************************************************************\
@@ -331,11 +333,18 @@ gckKERNEL_AllocateLinearMemory(
else if (pool == gcvPOOL_SYSTEM)
{
/* Advance to virtual memory. */
+#if ENABLE_VG_TRY_VIRTUAL_MEMORY
pool = gcvPOOL_VIRTUAL;
+#else
+ /*VG non-contiguous memory support is not ready yet, disable it temporary*/
+ status = gcvSTATUS_OUT_OF_MEMORY;
+ break;
+#endif
}
else
{
/* Out of pools. */
+ status = gcvSTATUS_OUT_OF_MEMORY;
break;
}
}