diff options
Diffstat (limited to 'drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c')
-rw-r--r-- | drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c | 5 |
1 files changed, 5 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 58a2d5e344e8..1afd1332eae5 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 @@ -6801,6 +6801,7 @@ gckOS_GetThreadID( ** ** Nothing. */ +extern struct mutex set_cpufreq_lock; gceSTATUS gckOS_SetGPUPower( IN gckOS Os, @@ -6843,8 +6844,10 @@ gckOS_SetGPUPower( if((Power == gcvTRUE) && (oldPowerState == gcvFALSE)) { #if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) + mutex_lock(&set_cpufreq_lock); if(!IS_ERR(Os->device->gpu_regulator)) regulator_enable(Os->device->gpu_regulator); + mutex_unlock(&set_cpufreq_lock); #else imx_gpc_power_up_pu(true); #endif @@ -6960,8 +6963,10 @@ gckOS_SetGPUPower( #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) + mutex_lock(&set_cpufreq_lock); if(!IS_ERR(Os->device->gpu_regulator)) regulator_disable(Os->device->gpu_regulator); + mutex_unlock(&set_cpufreq_lock); #else imx_gpc_power_up_pu(false); #endif |