summaryrefslogtreecommitdiffstats
path: root/drivers
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
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')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c18
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c8
-rw-r--r--drivers/gpu/nvgpu/gm20b/mm_gm20b.c2
-rw-r--r--drivers/gpu/nvgpu/vgpu/vgpu.c2
4 files changed, 15 insertions, 15 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 *
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c
index ca8b8bea..d433c9bb 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c
@@ -234,7 +234,7 @@ static DEVICE_ATTR(ptimer_scale_factor,
234 ptimer_scale_factor_show, 234 ptimer_scale_factor_show,
235 NULL); 235 NULL);
236 236
237#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_PM_GENERIC_DOMAINS) 237#if defined(CONFIG_PM) && defined(CONFIG_PM_GENERIC_DOMAINS)
238static ssize_t railgate_enable_store(struct device *dev, 238static ssize_t railgate_enable_store(struct device *dev,
239 struct device_attribute *attr, const char *buf, size_t count) 239 struct device_attribute *attr, const char *buf, size_t count)
240{ 240{
@@ -651,7 +651,7 @@ static ssize_t fmax_at_vmin_safe_read(struct device *device,
651 651
652static DEVICE_ATTR(fmax_at_vmin_safe, S_IRUGO, fmax_at_vmin_safe_read, NULL); 652static DEVICE_ATTR(fmax_at_vmin_safe, S_IRUGO, fmax_at_vmin_safe_read, NULL);
653 653
654#ifdef CONFIG_PM_RUNTIME 654#ifdef CONFIG_PM
655static ssize_t force_idle_store(struct device *device, 655static ssize_t force_idle_store(struct device *device,
656 struct device_attribute *attr, const char *buf, size_t count) 656 struct device_attribute *attr, const char *buf, size_t count)
657{ 657{
@@ -775,7 +775,7 @@ void gk20a_remove_sysfs(struct device *dev)
775 device_remove_file(dev, &dev_attr_railgate_delay); 775 device_remove_file(dev, &dev_attr_railgate_delay);
776 device_remove_file(dev, &dev_attr_is_railgated); 776 device_remove_file(dev, &dev_attr_is_railgated);
777 device_remove_file(dev, &dev_attr_clockgate_delay); 777 device_remove_file(dev, &dev_attr_clockgate_delay);
778#ifdef CONFIG_PM_RUNTIME 778#ifdef CONFIG_PM
779 device_remove_file(dev, &dev_attr_force_idle); 779 device_remove_file(dev, &dev_attr_force_idle);
780#if defined(CONFIG_PM_GENERIC_DOMAINS) 780#if defined(CONFIG_PM_GENERIC_DOMAINS)
781 device_remove_file(dev, &dev_attr_railgate_enable); 781 device_remove_file(dev, &dev_attr_railgate_enable);
@@ -815,7 +815,7 @@ void gk20a_create_sysfs(struct platform_device *dev)
815 error |= device_create_file(&dev->dev, &dev_attr_railgate_delay); 815 error |= device_create_file(&dev->dev, &dev_attr_railgate_delay);
816 error |= device_create_file(&dev->dev, &dev_attr_is_railgated); 816 error |= device_create_file(&dev->dev, &dev_attr_is_railgated);
817 error |= device_create_file(&dev->dev, &dev_attr_clockgate_delay); 817 error |= device_create_file(&dev->dev, &dev_attr_clockgate_delay);
818#ifdef CONFIG_PM_RUNTIME 818#ifdef CONFIG_PM
819 error |= device_create_file(&dev->dev, &dev_attr_force_idle); 819 error |= device_create_file(&dev->dev, &dev_attr_force_idle);
820#if defined(CONFIG_PM_GENERIC_DOMAINS) 820#if defined(CONFIG_PM_GENERIC_DOMAINS)
821 error |= device_create_file(&dev->dev, &dev_attr_railgate_enable); 821 error |= device_create_file(&dev->dev, &dev_attr_railgate_enable);
diff --git a/drivers/gpu/nvgpu/gm20b/mm_gm20b.c b/drivers/gpu/nvgpu/gm20b/mm_gm20b.c
index 9fdd860b..621ee687 100644
--- a/drivers/gpu/nvgpu/gm20b/mm_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/mm_gm20b.c
@@ -51,7 +51,7 @@ int gm20b_mm_mmu_vpr_info_fetch(struct gk20a *g)
51 int ret = 0; 51 int ret = 0;
52 52
53 gk20a_busy_noresume(g->dev); 53 gk20a_busy_noresume(g->dev);
54#ifdef CONFIG_PM_RUNTIME 54#ifdef CONFIG_PM
55 if (!pm_runtime_active(&g->dev->dev)) 55 if (!pm_runtime_active(&g->dev->dev))
56 goto fail; 56 goto fail;
57#endif 57#endif
diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c
index 57f510ca..5a953e20 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -359,7 +359,7 @@ static int vgpu_pm_initialise_domain(struct platform_device *pdev)
359 359
360 domain->name = "gpu"; 360 domain->name = "gpu";
361 361
362#ifdef CONFIG_PM_RUNTIME 362#ifdef CONFIG_PM
363 pm_domain_gov = &pm_domain_always_on_gov; 363 pm_domain_gov = &pm_domain_always_on_gov;
364#endif 364#endif
365 365