diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index f9b28156..b7872e73 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include "gk20a_scale.h" | 56 | #include "gk20a_scale.h" |
57 | #include "dbg_gpu_gk20a.h" | 57 | #include "dbg_gpu_gk20a.h" |
58 | #include "hal.h" | 58 | #include "hal.h" |
59 | #include "nvhost_acm.h" | ||
59 | 60 | ||
60 | #define CREATE_TRACE_POINTS | 61 | #define CREATE_TRACE_POINTS |
61 | #include <trace/events/gk20a.h> | 62 | #include <trace/events/gk20a.h> |
@@ -1229,8 +1230,10 @@ static int gk20a_pm_suspend(struct device *dev) | |||
1229 | struct gk20a_platform *platform = dev_get_drvdata(dev); | 1230 | struct gk20a_platform *platform = dev_get_drvdata(dev); |
1230 | int ret = 0; | 1231 | int ret = 0; |
1231 | 1232 | ||
1233 | #ifdef CONFIG_PM_RUNTIME | ||
1232 | if (atomic_read(&dev->power.usage_count) > 1) | 1234 | if (atomic_read(&dev->power.usage_count) > 1) |
1233 | return -EBUSY; | 1235 | return -EBUSY; |
1236 | #endif | ||
1234 | 1237 | ||
1235 | ret = gk20a_pm_prepare_poweroff(dev); | 1238 | ret = gk20a_pm_prepare_poweroff(dev); |
1236 | if (ret) | 1239 | if (ret) |
@@ -1256,8 +1259,10 @@ static int gk20a_pm_initialise_domain(struct platform_device *pdev) | |||
1256 | 1259 | ||
1257 | domain->name = "gpu"; | 1260 | domain->name = "gpu"; |
1258 | 1261 | ||
1262 | #ifdef CONFIG_PM_RUNTIME | ||
1259 | if (!platform->can_railgate) | 1263 | if (!platform->can_railgate) |
1260 | pm_domain_gov = &pm_domain_always_on_gov; | 1264 | pm_domain_gov = &pm_domain_always_on_gov; |
1265 | #endif | ||
1261 | 1266 | ||
1262 | pm_genpd_init(domain, pm_domain_gov, true); | 1267 | pm_genpd_init(domain, pm_domain_gov, true); |
1263 | 1268 | ||
@@ -1606,6 +1611,7 @@ void gk20a_reset(struct gk20a *g, u32 units) | |||
1606 | gk20a_enable(g, units); | 1611 | gk20a_enable(g, units); |
1607 | } | 1612 | } |
1608 | 1613 | ||
1614 | #ifdef CONFIG_PM_RUNTIME | ||
1609 | /** | 1615 | /** |
1610 | * gk20a_do_idle() - force the GPU to idle and railgate | 1616 | * gk20a_do_idle() - force the GPU to idle and railgate |
1611 | * | 1617 | * |
@@ -1689,6 +1695,7 @@ int gk20a_do_unidle(void) | |||
1689 | 1695 | ||
1690 | return 0; | 1696 | return 0; |
1691 | } | 1697 | } |
1698 | #endif | ||
1692 | 1699 | ||
1693 | int gk20a_init_gpu_characteristics(struct gk20a *g) | 1700 | int gk20a_init_gpu_characteristics(struct gk20a *g) |
1694 | { | 1701 | { |