aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mxc
diff options
context:
space:
mode:
authorLoren Huang <b02279@freescale.com>2014-02-27 02:44:49 -0500
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:57:47 -0400
commiteaf02be8eac42d201f2fa056c85f0bfba876fbd5 (patch)
treea48a849f97e6d692b6de2a87e3f2b724b268ccb0 /drivers/mxc
parent0862fa1a3445f5a83f68d2d2ecf523c5fcda3ab7 (diff)
ENGR00301095 gpu:gpu hang when dma memory is used up
When dma zone memory used up, gckOS_AllocateNonPagedMemory() will try to free non paged memory cache and allocate again. Such operation will cause twice memory mutex request and cause gpu driver hang. The solution is free the memory mutex at first before trying to free non paged memory cache. Date: Feb 27, 2014 Signed-off-by: Loren Huang <b02279@freescale.com> Acked-by: Shawn Guo
Diffstat (limited to 'drivers/mxc')
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c4
1 files changed, 4 insertions, 0 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 273d1173aac7..45c42a4908ea 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
@@ -2022,8 +2022,12 @@ gckOS_AllocateNonPagedMemory(
2022#if gcdUSE_NON_PAGED_MEMORY_CACHE 2022#if gcdUSE_NON_PAGED_MEMORY_CACHE
2023 if(addr == gcvNULL) 2023 if(addr == gcvNULL)
2024 { 2024 {
2025 MEMORY_UNLOCK(Os);
2026 locked = gcvFALSE;
2025 /*Free all cache and try again*/ 2027 /*Free all cache and try again*/
2026 _FreeAllNonPagedMemoryCache(Os); 2028 _FreeAllNonPagedMemoryCache(Os);
2029 MEMORY_LOCK(Os);
2030 locked = gcvTRUE;
2027 addr = dma_alloc_coherent(gcvNULL, 2031 addr = dma_alloc_coherent(gcvNULL,
2028 mdl->numPages * PAGE_SIZE, 2032 mdl->numPages * PAGE_SIZE,
2029 &mdl->dmaHandle, 2033 &mdl->dmaHandle,