diff options
author | Sumit Singh <sumsingh@nvidia.com> | 2016-03-30 01:44:33 -0400 |
---|---|---|
committer | Sumit Singh <sumsingh@nvidia.com> | 2016-03-30 01:47:41 -0400 |
commit | 466dc96afef268e57bbdc4bbf8a243fcdfdde164 (patch) | |
tree | fb176732feb8df23eccfede45e8416c4fc2806f9 /drivers/gpu/nvgpu/gk20a | |
parent | c72ea9f83e1ec690247524dbe348c376ba074e85 (diff) | |
parent | 383c769995dd8df1c5fd83b5778d37bf347618ca (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')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 18 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c | 8 |
2 files changed, 13 insertions, 13 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 | ||
1169 | static void gk20a_pm_shutdown(struct platform_device *pdev) | 1169 | static 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 |
1201 | static const struct dev_pm_ops gk20a_pm_ops = { | 1201 | static 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 | ||
1760 | void gk20a_idle(struct platform_device *pdev) | 1760 | void 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) |
238 | static ssize_t railgate_enable_store(struct device *dev, | 238 | static 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 | ||
652 | static DEVICE_ATTR(fmax_at_vmin_safe, S_IRUGO, fmax_at_vmin_safe_read, NULL); | 652 | static 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 |
655 | static ssize_t force_idle_store(struct device *device, | 655 | static 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); |