diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-03-10 10:44:03 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-14 14:47:11 -0400 |
commit | 503a5e68265dcb9e4e7e7efae53e6152c5d4b777 (patch) | |
tree | 5dda9adf258e8a2cac50386b0507ae16cdf51c1b | |
parent | 8c9b64dc4249b2785c01485eb9b499c41cc7ed78 (diff) |
gpu: nvgpu: Do not use pm_runtime calls directly
mm_gk20a.c had direct calls to pm_runtime_put_noidle(). Replace
them with calls to wrapper gk20a_idle_nosuspend() to prevent
unnecessary dependencies to Linux.
Change-Id: Iaf8b9255750be2f3e1aa39587c1a4a3cbeacc67f
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1319069
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index a857390b..ef20f00d 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -20,7 +20,6 @@ | |||
20 | #include <linux/highmem.h> | 20 | #include <linux/highmem.h> |
21 | #include <linux/log2.h> | 21 | #include <linux/log2.h> |
22 | #include <linux/nvhost.h> | 22 | #include <linux/nvhost.h> |
23 | #include <linux/pm_runtime.h> | ||
24 | #include <linux/scatterlist.h> | 23 | #include <linux/scatterlist.h> |
25 | #include <linux/nvmap.h> | 24 | #include <linux/nvmap.h> |
26 | #include <soc/tegra/chip-id.h> | 25 | #include <soc/tegra/chip-id.h> |
@@ -5155,7 +5154,7 @@ int gk20a_mm_fb_flush(struct gk20a *g) | |||
5155 | 5154 | ||
5156 | gk20a_busy_noresume(g->dev); | 5155 | gk20a_busy_noresume(g->dev); |
5157 | if (!g->power_on) { | 5156 | if (!g->power_on) { |
5158 | pm_runtime_put_noidle(g->dev); | 5157 | gk20a_idle_nosuspend(g->dev); |
5159 | return 0; | 5158 | return 0; |
5160 | } | 5159 | } |
5161 | 5160 | ||
@@ -5195,7 +5194,7 @@ int gk20a_mm_fb_flush(struct gk20a *g) | |||
5195 | 5194 | ||
5196 | nvgpu_mutex_release(&mm->l2_op_lock); | 5195 | nvgpu_mutex_release(&mm->l2_op_lock); |
5197 | 5196 | ||
5198 | pm_runtime_put_noidle(g->dev); | 5197 | gk20a_idle_nosuspend(g->dev); |
5199 | 5198 | ||
5200 | return ret; | 5199 | return ret; |
5201 | } | 5200 | } |
@@ -5244,7 +5243,7 @@ void gk20a_mm_l2_invalidate(struct gk20a *g) | |||
5244 | gk20a_mm_l2_invalidate_locked(g); | 5243 | gk20a_mm_l2_invalidate_locked(g); |
5245 | nvgpu_mutex_release(&mm->l2_op_lock); | 5244 | nvgpu_mutex_release(&mm->l2_op_lock); |
5246 | } | 5245 | } |
5247 | pm_runtime_put_noidle(g->dev); | 5246 | gk20a_idle_nosuspend(g->dev); |
5248 | } | 5247 | } |
5249 | 5248 | ||
5250 | void gk20a_mm_l2_flush(struct gk20a *g, bool invalidate) | 5249 | void gk20a_mm_l2_flush(struct gk20a *g, bool invalidate) |
@@ -5292,7 +5291,7 @@ void gk20a_mm_l2_flush(struct gk20a *g, bool invalidate) | |||
5292 | nvgpu_mutex_release(&mm->l2_op_lock); | 5291 | nvgpu_mutex_release(&mm->l2_op_lock); |
5293 | 5292 | ||
5294 | hw_was_off: | 5293 | hw_was_off: |
5295 | pm_runtime_put_noidle(g->dev); | 5294 | gk20a_idle_nosuspend(g->dev); |
5296 | } | 5295 | } |
5297 | 5296 | ||
5298 | void gk20a_mm_cbc_clean(struct gk20a *g) | 5297 | void gk20a_mm_cbc_clean(struct gk20a *g) |
@@ -5332,7 +5331,7 @@ void gk20a_mm_cbc_clean(struct gk20a *g) | |||
5332 | nvgpu_mutex_release(&mm->l2_op_lock); | 5331 | nvgpu_mutex_release(&mm->l2_op_lock); |
5333 | 5332 | ||
5334 | hw_was_off: | 5333 | hw_was_off: |
5335 | pm_runtime_put_noidle(g->dev); | 5334 | gk20a_idle_nosuspend(g->dev); |
5336 | } | 5335 | } |
5337 | 5336 | ||
5338 | int gk20a_vm_find_buffer(struct vm_gk20a *vm, u64 gpu_va, | 5337 | int gk20a_vm_find_buffer(struct vm_gk20a *vm, u64 gpu_va, |