diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/cde_gk20a.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c index 24c28029..f4ddc02e 100644 --- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c | |||
@@ -816,7 +816,9 @@ __releases(&cde_app->mutex) | |||
816 | cde_ctx); | 816 | cde_ctx); |
817 | goto out; | 817 | goto out; |
818 | } | 818 | } |
819 | cde_ctx->in_use = true; | 819 | |
820 | WARN(delayed_work_pending(&cde_ctx->ctx_deleter_work), | ||
821 | "double pending %p", cde_ctx); | ||
820 | 822 | ||
821 | gk20a_cde_remove_ctx(cde_ctx); | 823 | gk20a_cde_remove_ctx(cde_ctx); |
822 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_cde_ctx, | 824 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_cde_ctx, |
@@ -858,8 +860,7 @@ __must_hold(&cde_app->mutex) | |||
858 | cde_app->ctx_usecount++; | 860 | cde_app->ctx_usecount++; |
859 | 861 | ||
860 | /* cancel any deletions now that ctx is in use */ | 862 | /* cancel any deletions now that ctx is in use */ |
861 | if (delayed_work_pending(&cde_ctx->ctx_deleter_work)) | 863 | gk20a_cde_cancel_deleter(cde_ctx, true); |
862 | gk20a_cde_cancel_deleter(cde_ctx, false); | ||
863 | return cde_ctx; | 864 | return cde_ctx; |
864 | } | 865 | } |
865 | 866 | ||
@@ -1108,14 +1109,17 @@ __releases(&cde_app->mutex) | |||
1108 | } | 1109 | } |
1109 | mutex_unlock(&cde_app->mutex); | 1110 | mutex_unlock(&cde_app->mutex); |
1110 | } | 1111 | } |
1111 | } else { | ||
1112 | gk20a_cde_ctx_release(cde_ctx); | ||
1113 | } | 1112 | } |
1114 | 1113 | ||
1115 | /* delete temporary contexts later */ | 1114 | /* delete temporary contexts later */ |
1116 | if (cde_ctx->is_temporary) | 1115 | if (cde_ctx->is_temporary) { |
1116 | WARN_ON(delayed_work_pending(&cde_ctx->ctx_deleter_work)); | ||
1117 | schedule_delayed_work(&cde_ctx->ctx_deleter_work, | 1117 | schedule_delayed_work(&cde_ctx->ctx_deleter_work, |
1118 | msecs_to_jiffies(CTX_DELETE_TIME)); | 1118 | msecs_to_jiffies(CTX_DELETE_TIME)); |
1119 | } | ||
1120 | |||
1121 | if (!ch->has_timedout) | ||
1122 | gk20a_cde_ctx_release(cde_ctx); | ||
1119 | } | 1123 | } |
1120 | 1124 | ||
1121 | static int gk20a_cde_load(struct gk20a_cde_ctx *cde_ctx) | 1125 | static int gk20a_cde_load(struct gk20a_cde_ctx *cde_ctx) |