diff options
author | Loren Huang <b02279@freescale.com> | 2013-03-28 18:14:17 +0800 |
---|---|---|
committer | Loren Huang <b02279@freescale.com> | 2013-03-28 18:20:47 +0800 |
commit | 896ea2026267ef29980fa3b3d4965113ac1c9329 (patch) | |
tree | 26a4f883161cef3d6385652fe03f6bf3f4276969 | |
parent | 08c9214073ca584a41641456b54a1167815d2970 (diff) | |
download | linux-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.c | 9 |
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; } } |