diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/cde_gk20a.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c index f85e0c4c..43e74c85 100644 --- a/drivers/gpu/nvgpu/gk20a/cde_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/cde_gk20a.c | |||
@@ -22,6 +22,8 @@ | |||
22 | #include <linux/debugfs.h> | 22 | #include <linux/debugfs.h> |
23 | #include <linux/dma-buf.h> | 23 | #include <linux/dma-buf.h> |
24 | 24 | ||
25 | #include <trace/events/gk20a.h> | ||
26 | |||
25 | #include "gk20a.h" | 27 | #include "gk20a.h" |
26 | #include "channel_gk20a.h" | 28 | #include "channel_gk20a.h" |
27 | #include "mm_gk20a.h" | 29 | #include "mm_gk20a.h" |
@@ -80,6 +82,8 @@ __must_hold(&cde_app->mutex) | |||
80 | struct channel_gk20a *ch = cde_ctx->ch; | 82 | struct channel_gk20a *ch = cde_ctx->ch; |
81 | struct vm_gk20a *vm = ch->vm; | 83 | struct vm_gk20a *vm = ch->vm; |
82 | 84 | ||
85 | trace_gk20a_cde_remove_ctx(cde_ctx); | ||
86 | |||
83 | /* free the channel */ | 87 | /* free the channel */ |
84 | gk20a_free_channel(cde_ctx->ch, true); | 88 | gk20a_free_channel(cde_ctx->ch, true); |
85 | 89 | ||
@@ -728,6 +732,7 @@ __releases(&cde_app->mutex) | |||
728 | struct gk20a_cde_app *cde_app = &cde_ctx->g->cde_app; | 732 | struct gk20a_cde_app *cde_app = &cde_ctx->g->cde_app; |
729 | 733 | ||
730 | gk20a_dbg(gpu_dbg_cde_ctx, "releasing use on %p", cde_ctx); | 734 | gk20a_dbg(gpu_dbg_cde_ctx, "releasing use on %p", cde_ctx); |
735 | trace_gk20a_cde_release(cde_ctx); | ||
731 | 736 | ||
732 | mutex_lock(&cde_app->mutex); | 737 | mutex_lock(&cde_app->mutex); |
733 | 738 | ||
@@ -808,6 +813,7 @@ __must_hold(&cde_app->mutex) | |||
808 | cde_ctx, cde_app->ctx_count, | 813 | cde_ctx, cde_app->ctx_count, |
809 | cde_app->ctx_usecount, | 814 | cde_app->ctx_usecount, |
810 | cde_app->ctx_count_top); | 815 | cde_app->ctx_count_top); |
816 | trace_gk20a_cde_get_context(cde_ctx); | ||
811 | 817 | ||
812 | /* deleter work may be scheduled, but in_use prevents it */ | 818 | /* deleter work may be scheduled, but in_use prevents it */ |
813 | cde_ctx->in_use = true; | 819 | cde_ctx->in_use = true; |
@@ -833,6 +839,7 @@ __must_hold(&cde_app->mutex) | |||
833 | return cde_ctx; | 839 | return cde_ctx; |
834 | } | 840 | } |
835 | 841 | ||
842 | trace_gk20a_cde_get_context(cde_ctx); | ||
836 | cde_ctx->in_use = true; | 843 | cde_ctx->in_use = true; |
837 | cde_ctx->is_temporary = true; | 844 | cde_ctx->is_temporary = true; |
838 | cde_app->ctx_usecount++; | 845 | cde_app->ctx_usecount++; |
@@ -891,6 +898,7 @@ static struct gk20a_cde_ctx *gk20a_cde_allocate_context(struct gk20a *g) | |||
891 | gk20a_cde_ctx_deleter_fn); | 898 | gk20a_cde_ctx_deleter_fn); |
892 | 899 | ||
893 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_cde_ctx, "cde: allocated %p", cde_ctx); | 900 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_cde_ctx, "cde: allocated %p", cde_ctx); |
901 | trace_gk20a_cde_allocate_context(cde_ctx); | ||
894 | return cde_ctx; | 902 | return cde_ctx; |
895 | } | 903 | } |
896 | 904 | ||
@@ -1042,6 +1050,7 @@ __releases(&cde_app->mutex) | |||
1042 | if (!channel_idle) | 1050 | if (!channel_idle) |
1043 | return; | 1051 | return; |
1044 | 1052 | ||
1053 | trace_gk20a_cde_finished_ctx_cb(cde_ctx); | ||
1045 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_cde_ctx, "cde: finished %p", cde_ctx); | 1054 | gk20a_dbg(gpu_dbg_fn | gpu_dbg_cde_ctx, "cde: finished %p", cde_ctx); |
1046 | WARN(!cde_ctx->in_use, "double finish cde context %p on channel %p", | 1055 | WARN(!cde_ctx->in_use, "double finish cde context %p on channel %p", |
1047 | cde_ctx, ch); | 1056 | cde_ctx, ch); |