diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 8eb02db8c..b8753a21f 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) static void gk20a_pm_shutdown(struct platform_device *pdev) { -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM unsigned long timeout = jiffies + msecs_to_jiffies(GK20A_WAIT_FOR_IDLE_MS); int ref_cnt; @@ -1176,7 +1176,7 @@ static void gk20a_pm_shutdown(struct platform_device *pdev) dev_info(&pdev->dev, "shutting down"); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM /* Prevent more requests by disabling Runtime PM */ __pm_runtime_disable(&pdev->dev, false); @@ -1199,7 +1199,7 @@ static void gk20a_pm_shutdown(struct platform_device *pdev) #ifdef CONFIG_PM static const struct dev_pm_ops gk20a_pm_ops = { -#if defined(CONFIG_PM_RUNTIME) && !defined(CONFIG_PM_GENERIC_DOMAINS) +#if defined(CONFIG_PM) && !defined(CONFIG_PM_GENERIC_DOMAINS) .runtime_resume = gk20a_pm_enable_clk, .runtime_suspend = gk20a_pm_disable_clk, #endif @@ -1253,7 +1253,7 @@ static int gk20a_pm_suspend(struct device *dev) struct gk20a_platform *platform = dev_get_drvdata(dev); int ret = 0; -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM if (atomic_read(&dev->power.usage_count) > 1) return -EBUSY; #endif @@ -1279,7 +1279,7 @@ static int gk20a_pm_initialise_domain(struct platform_device *pdev) struct dev_power_governor *pm_domain_gov = NULL; struct generic_pm_domain *domain = dev_to_genpd(&pdev->dev); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM if (!platform->can_railgate) pm_domain_gov = &pm_domain_always_on_gov; #endif @@ -1717,13 +1717,13 @@ int gk20a_busy(struct platform_device *pdev) { int ret = 0; struct gk20a *g = get_gk20a(pdev); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM struct gk20a_platform *platform = gk20a_get_platform(pdev); #endif down_read(&g->busy_lock); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM if (platform->busy) { ret = platform->busy(pdev); if (ret < 0) { @@ -1759,7 +1759,7 @@ fail: void gk20a_idle(struct platform_device *pdev) { -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM struct gk20a_platform *platform = gk20a_get_platform(pdev); if (atomic_read(&pdev->dev.power.usage_count) == 1) gk20a_scale_notify_idle(pdev); @@ -1812,7 +1812,7 @@ void gk20a_reset(struct gk20a *g, u32 units) gk20a_enable(g, units); } -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM /** * __gk20a_do_idle() - force the GPU to idle and railgate * diff --git a/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c b/drivers/gpu/nvgpu/gk20a/gk20a_sysfs.c index ca8b8beab..d433c9bba 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, ptimer_scale_factor_show, NULL); -#if defined(CONFIG_PM_RUNTIME) && defined(CONFIG_PM_GENERIC_DOMAINS) +#if defined(CONFIG_PM) && defined(CONFIG_PM_GENERIC_DOMAINS) static ssize_t railgate_enable_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { @@ -651,7 +651,7 @@ static ssize_t fmax_at_vmin_safe_read(struct device *device, static DEVICE_ATTR(fmax_at_vmin_safe, S_IRUGO, fmax_at_vmin_safe_read, NULL); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM static ssize_t force_idle_store(struct device *device, struct device_attribute *attr, const char *buf, size_t count) { @@ -775,7 +775,7 @@ void gk20a_remove_sysfs(struct device *dev) device_remove_file(dev, &dev_attr_railgate_delay); device_remove_file(dev, &dev_attr_is_railgated); device_remove_file(dev, &dev_attr_clockgate_delay); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM device_remove_file(dev, &dev_attr_force_idle); #if defined(CONFIG_PM_GENERIC_DOMAINS) device_remove_file(dev, &dev_attr_railgate_enable); @@ -815,7 +815,7 @@ void gk20a_create_sysfs(struct platform_device *dev) error |= device_create_file(&dev->dev, &dev_attr_railgate_delay); error |= device_create_file(&dev->dev, &dev_attr_is_railgated); error |= device_create_file(&dev->dev, &dev_attr_clockgate_delay); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM error |= device_create_file(&dev->dev, &dev_attr_force_idle); #if defined(CONFIG_PM_GENERIC_DOMAINS) 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 9fdd860b5..621ee6874 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) int ret = 0; gk20a_busy_noresume(g->dev); -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM if (!pm_runtime_active(&g->dev->dev)) goto fail; #endif diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index 57f510caf..5a953e209 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) domain->name = "gpu"; -#ifdef CONFIG_PM_RUNTIME +#ifdef CONFIG_PM pm_domain_gov = &pm_domain_always_on_gov; #endif