summaryrefslogtreecommitdiff
path: root/drivers/mxc/gpu-viv/hal/os/linux
diff options
context:
space:
mode:
authorXianzhong <b07117@freescale.com>2013-12-04 18:29:34 +0800
committerXianzhong <b07117@freescale.com>2013-12-04 18:30:35 +0800
commit8e02e5dabf55df2163014ece8e1cbf960df84226 (patch)
tree0c8939aa4715f73d9eddf813af111cc556c723be /drivers/mxc/gpu-viv/hal/os/linux
parent98658721f56e851154f5510a8994781fd9c136ee (diff)
ENGR00290463 revert exact pages allocator to fix system reboot issuejb4.3_1.1.0-ga
System reboot occur during 1080p recording if exit MovieStudio after play a mixed clip with single HDMI, Vivante's intial feedback is alloc_pages_exact/free_pages_exact APIs are not stable in some kernel, In other side, need check if some memory size miscalculated is hided by this optimization. Temporarily this optimization shall be reverted to fix the critical issue. Signed-off-by: Xianzhong <b07117@freescale.com> Acked-by: Jason Liu
Diffstat (limited to 'drivers/mxc/gpu-viv/hal/os/linux')
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c29
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h3
2 files changed, 2 insertions, 30 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
index 4c9b01aeded3..91e58f0a91b9 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
@@ -3967,9 +3967,6 @@ gckOS_AllocatePagedMemoryEx(
gctSIZE_T bytes;
gctBOOL locked = gcvFALSE;
gceSTATUS status;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
- gctPOINTER addr = gcvNULL;
-#endif
gcmkHEADER_ARG("Os=0x%X Contiguous=%d Bytes=%lu", Os, Contiguous, Bytes);
@@ -4000,27 +3997,14 @@ gckOS_AllocatePagedMemoryEx(
gcmkONERROR(gcvSTATUS_OUT_OF_MEMORY);
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
- addr =
- alloc_pages_exact(numPages * PAGE_SIZE, GFP_KERNEL | gcdNOWARN | __GFP_NORETRY);
-
- mdl->u.contiguousPages = addr
- ? virt_to_page(addr)
- : gcvNULL;
-
- mdl->exact = gcvTRUE;
-#else
mdl->u.contiguousPages =
alloc_pages(GFP_KERNEL | gcdNOWARN | __GFP_NORETRY, order);
-#endif
+
if (mdl->u.contiguousPages == gcvNULL)
{
mdl->u.contiguousPages =
alloc_pages(GFP_KERNEL | __GFP_HIGHMEM | gcdNOWARN, order);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
- mdl->exact = gcvFALSE;
-#endif
}
}
else
@@ -4165,16 +4149,7 @@ gckOS_FreePagedMemory(
if (mdl->contiguous)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
- if (mdl->exact == gcvTRUE)
- {
- free_pages_exact(page_address(mdl->u.contiguousPages), mdl->numPages * PAGE_SIZE);
- }
- else
-#endif
- {
- __free_pages(mdl->u.contiguousPages, GetOrder(mdl->numPages));
- }
+ __free_pages(mdl->u.contiguousPages, GetOrder(mdl->numPages));
}
else
{
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h
index b22081740fdb..ad2dac0b540a 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.h
@@ -55,9 +55,6 @@ typedef struct _LINUX_MDL
gctINT numPages;
gctINT pagedMem;
gctBOOL contiguous;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 27)
- gctBOOL exact;
-#endif
dma_addr_t dmaHandle;
PLINUX_MDL_MAP maps;
struct _LINUX_MDL * prev;