summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
authorSumit Singh <sumsingh@nvidia.com>2016-03-30 01:44:33 -0400
committerSumit Singh <sumsingh@nvidia.com>2016-03-30 01:47:41 -0400
commit466dc96afef268e57bbdc4bbf8a243fcdfdde164 (patch)
treefb176732feb8df23eccfede45e8416c4fc2806f9 /drivers/gpu/nvgpu/gk20a/gk20a.c
parentc72ea9f83e1ec690247524dbe348c376ba074e85 (diff)
parent383c769995dd8df1c5fd83b5778d37bf347618ca (diff)
Merge branch 'PM_RUNTIME-Removal' into 'dev-kernel-3.18'
This change performs merge of 'PM_RUNTIME_Removal' dev-branch with 'dev-kernel-3.18' branch. It replaces CONFIG_PM_RUNTIME with CONFIG_PM. JIRA TPM-704 Change-Id: I306e254716f275c283f727fc232d7244939542b6 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 8eb02db8..b8753a21 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -1168,7 +1168,7 @@ static int gk20a_pm_disable_clk(struct device *dev)
1168 1168
1169static void gk20a_pm_shutdown(struct platform_device *pdev) 1169static void gk20a_pm_shutdown(struct platform_device *pdev)
1170{ 1170{
1171#ifdef CONFIG_PM_RUNTIME 1171#ifdef CONFIG_PM
1172 unsigned long timeout = jiffies + 1172 unsigned long timeout = jiffies +
1173 msecs_to_jiffies(GK20A_WAIT_FOR_IDLE_MS); 1173 msecs_to_jiffies(GK20A_WAIT_FOR_IDLE_MS);
1174 int ref_cnt; 1174 int ref_cnt;
@@ -1176,7 +1176,7 @@ static void gk20a_pm_shutdown(struct platform_device *pdev)
1176 1176
1177 dev_info(&pdev->dev, "shutting down"); 1177 dev_info(&pdev->dev, "shutting down");
1178 1178
1179#ifdef CONFIG_PM_RUNTIME 1179#ifdef CONFIG_PM
1180 /* Prevent more requests by disabling Runtime PM */ 1180 /* Prevent more requests by disabling Runtime PM */
1181 __pm_runtime_disable(&pdev->dev, false); 1181 __pm_runtime_disable(&pdev->dev, false);
1182 1182
@@ -1199,7 +1199,7 @@ static void gk20a_pm_shutdown(struct platform_device *pdev)
1199 1199
1200#ifdef CONFIG_PM 1200#ifdef CONFIG_PM
1201static const struct dev_pm_ops gk20a_pm_ops = { 1201static const struct dev_pm_ops gk20a_pm_ops = {
1202#if defined(CONFIG_PM_RUNTIME) && !defined(CONFIG_PM_GENERIC_DOMAINS) 1202#if defined(CONFIG_PM) && !defined(CONFIG_PM_GENERIC_DOMAINS)
1203 .runtime_resume = gk20a_pm_enable_clk, 1203 .runtime_resume = gk20a_pm_enable_clk,
1204 .runtime_suspend = gk20a_pm_disable_clk, 1204 .runtime_suspend = gk20a_pm_disable_clk,
1205#endif 1205#endif
@@ -1253,7 +1253,7 @@ static int gk20a_pm_suspend(struct device *dev)
1253 struct gk20a_platform *platform = dev_get_drvdata(dev); 1253 struct gk20a_platform *platform = dev_get_drvdata(dev);
1254 int ret = 0; 1254 int ret = 0;
1255 1255
1256#ifdef CONFIG_PM_RUNTIME 1256#ifdef CONFIG_PM
1257 if (atomic_read(&dev->power.usage_count) > 1) 1257 if (atomic_read(&dev->power.usage_count) > 1)
1258 return -EBUSY; 1258 return -EBUSY;
1259#endif 1259#endif
@@ -1279,7 +1279,7 @@ static int gk20a_pm_initialise_domain(struct platform_device *pdev)
1279 struct dev_power_governor *pm_domain_gov = NULL; 1279 struct dev_power_governor *pm_domain_gov = NULL;
1280 struct generic_pm_domain *domain = dev_to_genpd(&pdev->dev); 1280 struct generic_pm_domain *domain = dev_to_genpd(&pdev->dev);
1281 1281
1282#ifdef CONFIG_PM_RUNTIME 1282#ifdef CONFIG_PM
1283 if (!platform->can_railgate) 1283 if (!platform->can_railgate)
1284 pm_domain_gov = &pm_domain_always_on_gov; 1284 pm_domain_gov = &pm_domain_always_on_gov;
1285#endif 1285#endif
@@ -1717,13 +1717,13 @@ int gk20a_busy(struct platform_device *pdev)
1717{ 1717{
1718 int ret = 0; 1718 int ret = 0;
1719 struct gk20a *g = get_gk20a(pdev); 1719 struct gk20a *g = get_gk20a(pdev);
1720#ifdef CONFIG_PM_RUNTIME 1720#ifdef CONFIG_PM
1721 struct gk20a_platform *platform = gk20a_get_platform(pdev); 1721 struct gk20a_platform *platform = gk20a_get_platform(pdev);
1722#endif 1722#endif
1723 1723
1724 down_read(&g->busy_lock); 1724 down_read(&g->busy_lock);
1725 1725
1726#ifdef CONFIG_PM_RUNTIME 1726#ifdef CONFIG_PM
1727 if (platform->busy) { 1727 if (platform->busy) {
1728 ret = platform->busy(pdev); 1728 ret = platform->busy(pdev);
1729 if (ret < 0) { 1729 if (ret < 0) {
@@ -1759,7 +1759,7 @@ fail:
1759 1759
1760void gk20a_idle(struct platform_device *pdev) 1760void gk20a_idle(struct platform_device *pdev)
1761{ 1761{
1762#ifdef CONFIG_PM_RUNTIME 1762#ifdef CONFIG_PM
1763 struct gk20a_platform *platform = gk20a_get_platform(pdev); 1763 struct gk20a_platform *platform = gk20a_get_platform(pdev);
1764 if (atomic_read(&pdev->dev.power.usage_count) == 1) 1764 if (atomic_read(&pdev->dev.power.usage_count) == 1)
1765 gk20a_scale_notify_idle(pdev); 1765 gk20a_scale_notify_idle(pdev);
@@ -1812,7 +1812,7 @@ void gk20a_reset(struct gk20a *g, u32 units)
1812 gk20a_enable(g, units); 1812 gk20a_enable(g, units);
1813} 1813}
1814 1814
1815#ifdef CONFIG_PM_RUNTIME 1815#ifdef CONFIG_PM
1816/** 1816/**
1817 * __gk20a_do_idle() - force the GPU to idle and railgate 1817 * __gk20a_do_idle() - force the GPU to idle and railgate
1818 * 1818 *