diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 7 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 8 |
3 files changed, 13 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index e1bf2b4b..02baf683 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <nvgpu/pmu.h> | 33 | #include <nvgpu/pmu.h> |
34 | #include <nvgpu/gmmu.h> | 34 | #include <nvgpu/gmmu.h> |
35 | #include <nvgpu/ltc.h> | 35 | #include <nvgpu/ltc.h> |
36 | #include <nvgpu/vidmem.h> | ||
36 | 37 | ||
37 | #include <trace/events/gk20a.h> | 38 | #include <trace/events/gk20a.h> |
38 | 39 | ||
@@ -97,8 +98,6 @@ int gk20a_prepare_poweroff(struct gk20a *g) | |||
97 | if (gk20a_fifo_is_engine_busy(g)) | 98 | if (gk20a_fifo_is_engine_busy(g)) |
98 | return -EBUSY; | 99 | return -EBUSY; |
99 | 100 | ||
100 | gk20a_ce_suspend(g); | ||
101 | |||
102 | ret = gk20a_channel_suspend(g); | 101 | ret = gk20a_channel_suspend(g); |
103 | if (ret) | 102 | if (ret) |
104 | return ret; | 103 | return ret; |
@@ -111,6 +110,8 @@ int gk20a_prepare_poweroff(struct gk20a *g) | |||
111 | ret |= gk20a_mm_suspend(g); | 110 | ret |= gk20a_mm_suspend(g); |
112 | ret |= gk20a_fifo_suspend(g); | 111 | ret |= gk20a_fifo_suspend(g); |
113 | 112 | ||
113 | gk20a_ce_suspend(g); | ||
114 | |||
114 | /* Disable GPCPLL */ | 115 | /* Disable GPCPLL */ |
115 | if (g->ops.clk.suspend_clk_support) | 116 | if (g->ops.clk.suspend_clk_support) |
116 | ret |= g->ops.clk.suspend_clk_support(g); | 117 | ret |= g->ops.clk.suspend_clk_support(g); |
@@ -323,6 +324,8 @@ int gk20a_finalize_poweron(struct gk20a *g) | |||
323 | } | 324 | } |
324 | } | 325 | } |
325 | 326 | ||
327 | nvgpu_vidmem_thread_unpause(&g->mm); | ||
328 | |||
326 | #if defined(CONFIG_TEGRA_GK20A_NVHOST) && defined(CONFIG_TEGRA_19x_GPU) | 329 | #if defined(CONFIG_TEGRA_GK20A_NVHOST) && defined(CONFIG_TEGRA_19x_GPU) |
327 | if (gk20a_platform_has_syncpoints(g) && g->syncpt_unit_size) { | 330 | if (gk20a_platform_has_syncpoints(g) && g->syncpt_unit_size) { |
328 | if (!nvgpu_mem_is_valid(&g->syncpt_mem)) { | 331 | if (!nvgpu_mem_is_valid(&g->syncpt_mem)) { |
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 687951a9..67ab307f 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -978,9 +978,7 @@ int gk20a_mm_suspend(struct gk20a *g) | |||
978 | { | 978 | { |
979 | gk20a_dbg_fn(""); | 979 | gk20a_dbg_fn(""); |
980 | 980 | ||
981 | #if defined(CONFIG_GK20A_VIDMEM) | 981 | nvgpu_vidmem_thread_pause_sync(&g->mm); |
982 | cancel_work_sync(&g->mm.vidmem.clear_mem_worker); | ||
983 | #endif | ||
984 | 982 | ||
985 | g->ops.mm.cbc_clean(g); | 983 | g->ops.mm.cbc_clean(g); |
986 | g->ops.mm.l2_flush(g, false); | 984 | g->ops.mm.l2_flush(g, false); |
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index 556cb234..13698cd7 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |||
@@ -36,6 +36,8 @@ | |||
36 | #include <nvgpu/rbtree.h> | 36 | #include <nvgpu/rbtree.h> |
37 | #include <nvgpu/kref.h> | 37 | #include <nvgpu/kref.h> |
38 | #include <nvgpu/atomic.h> | 38 | #include <nvgpu/atomic.h> |
39 | #include <nvgpu/cond.h> | ||
40 | #include <nvgpu/thread.h> | ||
39 | 41 | ||
40 | struct nvgpu_pd_cache; | 42 | struct nvgpu_pd_cache; |
41 | 43 | ||
@@ -272,7 +274,11 @@ struct mm_gk20a { | |||
272 | struct nvgpu_list_node clear_list_head; | 274 | struct nvgpu_list_node clear_list_head; |
273 | struct nvgpu_mutex clear_list_mutex; | 275 | struct nvgpu_mutex clear_list_mutex; |
274 | 276 | ||
275 | struct work_struct clear_mem_worker; | 277 | struct nvgpu_cond clearing_thread_cond; |
278 | struct nvgpu_thread clearing_thread; | ||
279 | struct nvgpu_mutex clearing_thread_lock; | ||
280 | nvgpu_atomic_t pause_count; | ||
281 | |||
276 | nvgpu_atomic64_t bytes_pending; | 282 | nvgpu_atomic64_t bytes_pending; |
277 | } vidmem; | 283 | } vidmem; |
278 | }; | 284 | }; |