From 503a5e68265dcb9e4e7e7efae53e6152c5d4b777 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Fri, 10 Mar 2017 07:44:03 -0800 Subject: 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 Reviewed-on: http://git-master/r/1319069 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'drivers') 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 @@ #include #include #include -#include #include #include #include @@ -5155,7 +5154,7 @@ int gk20a_mm_fb_flush(struct gk20a *g) gk20a_busy_noresume(g->dev); if (!g->power_on) { - pm_runtime_put_noidle(g->dev); + gk20a_idle_nosuspend(g->dev); return 0; } @@ -5195,7 +5194,7 @@ int gk20a_mm_fb_flush(struct gk20a *g) nvgpu_mutex_release(&mm->l2_op_lock); - pm_runtime_put_noidle(g->dev); + gk20a_idle_nosuspend(g->dev); return ret; } @@ -5244,7 +5243,7 @@ void gk20a_mm_l2_invalidate(struct gk20a *g) gk20a_mm_l2_invalidate_locked(g); nvgpu_mutex_release(&mm->l2_op_lock); } - pm_runtime_put_noidle(g->dev); + gk20a_idle_nosuspend(g->dev); } void gk20a_mm_l2_flush(struct gk20a *g, bool invalidate) @@ -5292,7 +5291,7 @@ void gk20a_mm_l2_flush(struct gk20a *g, bool invalidate) nvgpu_mutex_release(&mm->l2_op_lock); hw_was_off: - pm_runtime_put_noidle(g->dev); + gk20a_idle_nosuspend(g->dev); } void gk20a_mm_cbc_clean(struct gk20a *g) @@ -5332,7 +5331,7 @@ void gk20a_mm_cbc_clean(struct gk20a *g) nvgpu_mutex_release(&mm->l2_op_lock); hw_was_off: - pm_runtime_put_noidle(g->dev); + gk20a_idle_nosuspend(g->dev); } int gk20a_vm_find_buffer(struct vm_gk20a *vm, u64 gpu_va, -- cgit v1.2.2