summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorSumit Singh <sumsingh@nvidia.com>2016-03-15 04:52:04 -0400
committerSumit Singh <sumsingh@nvidia.com>2016-03-15 06:47:42 -0400
commit383c769995dd8df1c5fd83b5778d37bf347618ca (patch)
treedc6922a72aeb87d2ecee9eb555ecd92767e60d92 /drivers/gpu/nvgpu/gk20a/gk20a.c
parentd2e5eaf359d4446dd731ab39bc851e7709571042 (diff)
gpu: nvgpu: Replace CONFIG_PM_RUNTIME with CONFIG_PM
After commit b2b49ccbdd54 (PM: Kconfig: Set PM_RUNTIME if PM_SLEEP is selected) PM_RUNTIME is always set if PM is set, so #ifdef blocks depending on CONFIG_PM_RUNTIME may now be changed to depend on CONFIG_PM. Replace CONFIG_PM_RUNTIME with CONFIG_PM everywhere under drivers/gpu/nvgpu/. JIRA TPM-704 Change-Id: I23965838ff6ec77829076cd834e87641fb68e268 Signed-off-by: Sumit Singh <sumsingh@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index fa2c61e1..6a5986a7 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -1139,7 +1139,7 @@ static int gk20a_pm_disable_clk(struct device *dev)
1139 1139
1140static void gk20a_pm_shutdown(struct platform_device *pdev) 1140static void gk20a_pm_shutdown(struct platform_device *pdev)
1141{ 1141{
1142#ifdef CONFIG_PM_RUNTIME 1142#ifdef CONFIG_PM
1143 unsigned long timeout = jiffies + 1143 unsigned long timeout = jiffies +
1144 msecs_to_jiffies(GK20A_WAIT_FOR_IDLE_MS); 1144 msecs_to_jiffies(GK20A_WAIT_FOR_IDLE_MS);
1145 int ref_cnt; 1145 int ref_cnt;
@@ -1147,7 +1147,7 @@ static void gk20a_pm_shutdown(struct platform_device *pdev)
1147 1147
1148 dev_info(&pdev->dev, "shutting down"); 1148 dev_info(&pdev->dev, "shutting down");
1149 1149
1150#ifdef CONFIG_PM_RUNTIME 1150#ifdef CONFIG_PM
1151 /* Prevent more requests by disabling Runtime PM */ 1151 /* Prevent more requests by disabling Runtime PM */
1152 __pm_runtime_disable(&pdev->dev, false); 1152 __pm_runtime_disable(&pdev->dev, false);
1153 1153
@@ -1170,7 +1170,7 @@ static void gk20a_pm_shutdown(struct platform_device *pdev)
1170 1170
1171#ifdef CONFIG_PM 1171#ifdef CONFIG_PM
1172static const struct dev_pm_ops gk20a_pm_ops = { 1172static const struct dev_pm_ops gk20a_pm_ops = {
1173#if defined(CONFIG_PM_RUNTIME) && !defined(CONFIG_PM_GENERIC_DOMAINS) 1173#if defined(CONFIG_PM) && !defined(CONFIG_PM_GENERIC_DOMAINS)
1174 .runtime_resume = gk20a_pm_enable_clk, 1174 .runtime_resume = gk20a_pm_enable_clk,
1175 .runtime_suspend = gk20a_pm_disable_clk, 1175 .runtime_suspend = gk20a_pm_disable_clk,
1176#endif 1176#endif
@@ -1224,7 +1224,7 @@ static int gk20a_pm_suspend(struct device *dev)
1224 struct gk20a_platform *platform = dev_get_drvdata(dev); 1224 struct gk20a_platform *platform = dev_get_drvdata(dev);
1225 int ret = 0; 1225 int ret = 0;
1226 1226
1227#ifdef CONFIG_PM_RUNTIME 1227#ifdef CONFIG_PM
1228 if (atomic_read(&dev->power.usage_count) > 1) 1228 if (atomic_read(&dev->power.usage_count) > 1)
1229 return -EBUSY; 1229 return -EBUSY;
1230#endif 1230#endif
@@ -1250,7 +1250,7 @@ static int gk20a_pm_initialise_domain(struct platform_device *pdev)
1250 struct dev_power_governor *pm_domain_gov = NULL; 1250 struct dev_power_governor *pm_domain_gov = NULL;
1251 struct generic_pm_domain *domain = dev_to_genpd(&pdev->dev); 1251 struct generic_pm_domain *domain = dev_to_genpd(&pdev->dev);
1252 1252
1253#ifdef CONFIG_PM_RUNTIME 1253#ifdef CONFIG_PM
1254 if (!platform->can_railgate) 1254 if (!platform->can_railgate)
1255 pm_domain_gov = &pm_domain_always_on_gov; 1255 pm_domain_gov = &pm_domain_always_on_gov;
1256#endif 1256#endif
@@ -1686,13 +1686,13 @@ int gk20a_busy(struct platform_device *pdev)
1686{ 1686{
1687 int ret = 0; 1687 int ret = 0;
1688 struct gk20a *g = get_gk20a(pdev); 1688 struct gk20a *g = get_gk20a(pdev);
1689#ifdef CONFIG_PM_RUNTIME 1689#ifdef CONFIG_PM
1690 struct gk20a_platform *platform = gk20a_get_platform(pdev); 1690 struct gk20a_platform *platform = gk20a_get_platform(pdev);
1691#endif 1691#endif
1692 1692
1693 down_read(&g->busy_lock); 1693 down_read(&g->busy_lock);
1694 1694
1695#ifdef CONFIG_PM_RUNTIME 1695#ifdef CONFIG_PM
1696 if (platform->busy) { 1696 if (platform->busy) {
1697 ret = platform->busy(pdev); 1697 ret = platform->busy(pdev);
1698 if (ret < 0) { 1698 if (ret < 0) {
@@ -1728,7 +1728,7 @@ fail:
1728 1728
1729void gk20a_idle(struct platform_device *pdev) 1729void gk20a_idle(struct platform_device *pdev)
1730{ 1730{
1731#ifdef CONFIG_PM_RUNTIME 1731#ifdef CONFIG_PM
1732 struct gk20a_platform *platform = gk20a_get_platform(pdev); 1732 struct gk20a_platform *platform = gk20a_get_platform(pdev);
1733 if (atomic_read(&pdev->dev.power.usage_count) == 1) 1733 if (atomic_read(&pdev->dev.power.usage_count) == 1)
1734 gk20a_scale_notify_idle(pdev); 1734 gk20a_scale_notify_idle(pdev);
@@ -1778,7 +1778,7 @@ void gk20a_reset(struct gk20a *g, u32 units)
1778 gk20a_enable(g, units); 1778 gk20a_enable(g, units);
1779} 1779}
1780 1780
1781#ifdef CONFIG_PM_RUNTIME 1781#ifdef CONFIG_PM
1782/** 1782/**
1783 * __gk20a_do_idle() - force the GPU to idle and railgate 1783 * __gk20a_do_idle() - force the GPU to idle and railgate
1784 * 1784 *