summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRobin Gong <b38343@freescale.com>2013-05-09 11:45:55 +0800
committerLoren HUANG <b02279@freescale.com>2013-05-16 11:08:51 +0800
commit55407c559d30e53b69e1fbece12ec479b66a537d (patch)
tree3efc4816368ed6fb08996a26d59e4ade997de70e /drivers
parent255262d486af7c2baec0e15d2098c6c0d91d67b6 (diff)
ENGR00261814-4 gpu: use new PU power on/off interface
use new PU power on/off interface in GPU driver Cherry-pick from 3.5.7 branch. Signed-off-by: Robin Gong <b38343@freescale.com> Acked-by: Lily Zhang
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c16
1 files changed, 13 insertions, 3 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 9d48ea61e16b..ac51d7cb3d89 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
@@ -6819,8 +6819,13 @@ gckOS_SetGPUPower(
}
if((Power == gcvTRUE) && (oldPowerState == gcvFALSE))
{
- if(!IS_ERR(Os->device->gpu_regulator))
- regulator_enable(Os->device->gpu_regulator);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
+ if(!IS_ERR(Os->device->gpu_regulator))
+ regulator_enable(Os->device->gpu_regulator);
+#else
+ imx_gpc_power_up_pu(true);
+#endif
+
#ifdef CONFIG_PM
pm_runtime_get_sync(Os->device->pmdev);
#endif
@@ -6930,8 +6935,13 @@ gckOS_SetGPUPower(
#ifdef CONFIG_PM
pm_runtime_put_sync(Os->device->pmdev);
#endif
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
if(!IS_ERR(Os->device->gpu_regulator))
- regulator_disable(Os->device->gpu_regulator);
+ regulator_disable(Os->device->gpu_regulator);
+#else
+ imx_gpc_power_up_pu(false);
+#endif
}
/* TODO: Put your code here. */
gcmkFOOTER_NO();