diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/cde_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/cde_gk20a.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c index 9067aae5..47ea8052 100644 --- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c | |||
@@ -144,6 +144,26 @@ void gk20a_cde_destroy(struct gk20a *g) | |||
144 | mutex_unlock(&cde_app->mutex); | 144 | mutex_unlock(&cde_app->mutex); |
145 | } | 145 | } |
146 | 146 | ||
147 | void gk20a_cde_suspend(struct gk20a *g) | ||
148 | { | ||
149 | |||
150 | struct gk20a_cde_app *cde_app = &g->cde_app; | ||
151 | struct gk20a_cde_ctx *cde_ctx, *cde_ctx_save; | ||
152 | |||
153 | if (!cde_app->initialised) | ||
154 | return; | ||
155 | |||
156 | list_for_each_entry_safe(cde_ctx, cde_ctx_save, | ||
157 | &cde_app->cde_ctx_lru, list) { | ||
158 | if (cde_ctx->is_temporary) { | ||
159 | mutex_lock(&cde_app->mutex); | ||
160 | cancel_delayed_work(&cde_ctx->ctx_deleter_work); | ||
161 | mutex_unlock(&cde_app->mutex); | ||
162 | } | ||
163 | } | ||
164 | |||
165 | } | ||
166 | |||
147 | static int gk20a_cde_allocate_contexts(struct gk20a *g) | 167 | static int gk20a_cde_allocate_contexts(struct gk20a *g) |
148 | { | 168 | { |
149 | struct gk20a_cde_app *cde_app = &g->cde_app; | 169 | struct gk20a_cde_app *cde_app = &g->cde_app; |