diff options
author | Loren Huang <b02279@freescale.com> | 2014-04-11 05:14:21 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:58:19 -0400 |
commit | 24bd975f29aef39658f50ca9805e272795538eae (patch) | |
tree | dd1794ef13e75f1d9b1b68ba8eb436383385c474 | |
parent | d218df2337b18433255e979219337f8fee9987bd (diff) |
ENGR00308066 [#1091]Use spinlock_irqsave instead of spinlock in gpu
Gpu kernel driver used spinlock in inerrupt context for debug
purpose. So when enabled debug mode in gpu kernel driver, it may
cause gpu kernel driver deadlock.
Changed spinlock to spinlock_irqsave to resolve this issue.
Patch from vivante.
Date: Apr 11, 2014
Signed-off-by: Loren Huang <b02279@freescale.com>
-rw-r--r-- | drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h index 10909d512c48..794953c6171e 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_debug.h | |||
@@ -48,13 +48,14 @@ typedef va_list gctARGUMENTS; | |||
48 | va_arg(Arguments, Type) | 48 | va_arg(Arguments, Type) |
49 | 49 | ||
50 | #define gcmkDECLARE_LOCK(__spinLock__) \ | 50 | #define gcmkDECLARE_LOCK(__spinLock__) \ |
51 | static DEFINE_SPINLOCK(__spinLock__); | 51 | static DEFINE_SPINLOCK(__spinLock__); \ |
52 | unsigned long __spinLock__##flags = 0; | ||
52 | 53 | ||
53 | #define gcmkLOCKSECTION(__spinLock__) \ | 54 | #define gcmkLOCKSECTION(__spinLock__) \ |
54 | spin_lock(&__spinLock__) | 55 | spin_lock_irqsave(&__spinLock__, __spinLock__##flags) |
55 | 56 | ||
56 | #define gcmkUNLOCKSECTION(__spinLock__) \ | 57 | #define gcmkUNLOCKSECTION(__spinLock__) \ |
57 | spin_unlock(&__spinLock__) | 58 | spin_unlock_irqrestore(&__spinLock__, __spinLock__##flags) |
58 | 59 | ||
59 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) | 60 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) |
60 | # define gcmkGETPROCESSID() \ | 61 | # define gcmkGETPROCESSID() \ |