summaryrefslogtreecommitdiffstats
path: root/drivers
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
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')
-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 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 *
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c
index 2d803d0e..0e6b576b 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c
@@ -232,7 +232,7 @@ static DEVICE_ATTR(ptimer_scale_factor,
232 ptimer_scale_factor_show, 232 ptimer_scale_factor_show,
233 NULL); 233 NULL);
234 234
235#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_PM_GENERIC_DOMAINS) 235#if defined(CONFIG_PM) && defined(CONFIG_PM_GENERIC_DOMAINS)
236static ssize_t railgate_enable_store(struct device *dev, 236static ssize_t railgate_enable_store(struct device *dev,
237 struct device_attribute *attr, const char *buf, size_t count) 237 struct device_attribute *attr, const char *buf, size_t count)
238{ 238{
@@ -649,7 +649,7 @@ static ssize_t fmax_at_vmin_safe_read(struct device *device,
649 649
650static DEVICE_ATTR(fmax_at_vmin_safe, S_IRUGO, fmax_at_vmin_safe_read, NULL); 650static DEVICE_ATTR(fmax_at_vmin_safe, S_IRUGO, fmax_at_vmin_safe_read, NULL);
651 651
652#ifdef CONFIG_PM_RUNTIME 652#ifdef CONFIG_PM
653static ssize_t force_idle_store(struct device *device, 653static ssize_t force_idle_store(struct device *device,
654 struct device_attribute *attr, const char *buf, size_t count) 654 struct device_attribute *attr, const char *buf, size_t count)
655{ 655{
@@ -773,7 +773,7 @@ void gk20a_remove_sysfs(struct device *dev)
773 device_remove_file(dev, &dev_attr_railgate_delay); 773 device_remove_file(dev, &dev_attr_railgate_delay);
774 device_remove_file(dev, &dev_attr_is_railgated); 774 device_remove_file(dev, &dev_attr_is_railgated);
775 device_remove_file(dev, &dev_attr_clockgate_delay); 775 device_remove_file(dev, &dev_attr_clockgate_delay);
776#ifdef CONFIG_PM_RUNTIME 776#ifdef CONFIG_PM
777 device_remove_file(dev, &dev_attr_force_idle); 777 device_remove_file(dev, &dev_attr_force_idle);
778#if defined(CONFIG_PM_GENERIC_DOMAINS) 778#if defined(CONFIG_PM_GENERIC_DOMAINS)
779 device_remove_file(dev, &dev_attr_railgate_enable); 779 device_remove_file(dev, &dev_attr_railgate_enable);
@@ -806,7 +806,7 @@ void gk20a_create_sysfs(struct platform_device *dev)
806 error |= device_create_file(&dev->dev, &dev_attr_railgate_delay); 806 error |= device_create_file(&dev->dev, &dev_attr_railgate_delay);
807 error |= device_create_file(&dev->dev, &dev_attr_is_railgated); 807 error |= device_create_file(&dev->dev, &dev_attr_is_railgated);
808 error |= device_create_file(&dev->dev, &dev_attr_clockgate_delay); 808 error |= device_create_file(&dev->dev, &dev_attr_clockgate_delay);
809#ifdef CONFIG_PM_RUNTIME 809#ifdef CONFIG_PM
810 error |= device_create_file(&dev->dev, &dev_attr_force_idle); 810 error |= device_create_file(&dev->dev, &dev_attr_force_idle);
811#if defined(CONFIG_PM_GENERIC_DOMAINS) 811#if defined(CONFIG_PM_GENERIC_DOMAINS)
812 error |= device_create_file(&dev->dev, &dev_attr_railgate_enable); 812 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 4cc61cb1..e8328326 100644
--- a/drivers/gpu/nvgpu/vgpu/vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/vgpu.c
@@ -357,7 +357,7 @@ static int vgpu_pm_initialise_domain(struct platform_device *pdev)
357 357
358 domain->name = "gpu"; 358 domain->name = "gpu";
359 359
360#ifdef CONFIG_PM_RUNTIME 360#ifdef CONFIG_PM
361 pm_domain_gov = &pm_domain_always_on_gov; 361 pm_domain_gov = &pm_domain_always_on_gov;
362#endif 362#endif
363 363