diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/cde_gk20a.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c index f3185dd9..6f629e81 100644 --- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c | |||
@@ -759,12 +759,13 @@ __releases(&cde_app->mutex) | |||
759 | 759 | ||
760 | mutex_lock(&cde_app->mutex); | 760 | mutex_lock(&cde_app->mutex); |
761 | 761 | ||
762 | if (!cde_ctx->in_use) | 762 | if (cde_ctx->in_use) { |
763 | cde_ctx->in_use = false; | ||
764 | list_move(&cde_ctx->list, &cde_app->free_contexts); | ||
765 | cde_app->ctx_usecount--; | ||
766 | } else { | ||
763 | gk20a_dbg_info("double release cde context %p", cde_ctx); | 767 | gk20a_dbg_info("double release cde context %p", cde_ctx); |
764 | 768 | } | |
765 | cde_ctx->in_use = false; | ||
766 | list_move(&cde_ctx->list, &cde_app->free_contexts); | ||
767 | cde_app->ctx_usecount--; | ||
768 | 769 | ||
769 | mutex_unlock(&cde_app->mutex); | 770 | mutex_unlock(&cde_app->mutex); |
770 | } | 771 | } |