summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index 0e8c1884..e6103479 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -2957,7 +2957,6 @@ void gk20a_free_channel_ctx(struct channel_gk20a *c)
2957 2957
2958 memset(&c->ch_ctx, 0, sizeof(struct channel_ctx_gk20a)); 2958 memset(&c->ch_ctx, 0, sizeof(struct channel_ctx_gk20a));
2959 2959
2960 c->num_objects = 0;
2961 c->first_init = false; 2960 c->first_init = false;
2962} 2961}
2963 2962
@@ -3169,8 +3168,6 @@ int gk20a_alloc_obj_ctx(struct channel_gk20a *c,
3169 c->first_init = true; 3168 c->first_init = true;
3170 } 3169 }
3171 3170
3172 c->num_objects++;
3173
3174 gk20a_dbg_fn("done"); 3171 gk20a_dbg_fn("done");
3175 return 0; 3172 return 0;
3176out: 3173out:
@@ -3182,25 +3179,6 @@ out:
3182 return err; 3179 return err;
3183} 3180}
3184 3181
3185int gk20a_free_obj_ctx(struct channel_gk20a *c,
3186 struct nvgpu_free_obj_ctx_args *args)
3187{
3188 gk20a_dbg_fn("");
3189
3190 if (c->num_objects == 0)
3191 return 0;
3192
3193 c->num_objects--;
3194
3195 if (c->num_objects == 0) {
3196 c->first_init = false;
3197 gk20a_disable_channel(c);
3198 gr_gk20a_free_channel_patch_ctx(c);
3199 }
3200
3201 return 0;
3202}
3203
3204int gk20a_comptag_allocator_init(struct gk20a_comptag_allocator *allocator, 3182int gk20a_comptag_allocator_init(struct gk20a_comptag_allocator *allocator,
3205 unsigned long size) 3183 unsigned long size)
3206{ 3184{
@@ -9082,7 +9060,6 @@ void gk20a_init_gr_ops(struct gpu_ops *gops)
9082 gops->gr.get_gpc_tpc_mask = gr_gk20a_get_gpc_tpc_mask; 9060 gops->gr.get_gpc_tpc_mask = gr_gk20a_get_gpc_tpc_mask;
9083 gops->gr.free_channel_ctx = gk20a_free_channel_ctx; 9061 gops->gr.free_channel_ctx = gk20a_free_channel_ctx;
9084 gops->gr.alloc_obj_ctx = gk20a_alloc_obj_ctx; 9062 gops->gr.alloc_obj_ctx = gk20a_alloc_obj_ctx;
9085 gops->gr.free_obj_ctx = gk20a_free_obj_ctx;
9086 gops->gr.bind_ctxsw_zcull = gr_gk20a_bind_ctxsw_zcull; 9063 gops->gr.bind_ctxsw_zcull = gr_gk20a_bind_ctxsw_zcull;
9087 gops->gr.get_zcull_info = gr_gk20a_get_zcull_info; 9064 gops->gr.get_zcull_info = gr_gk20a_get_zcull_info;
9088 gops->gr.is_tpc_addr = gr_gk20a_is_tpc_addr; 9065 gops->gr.is_tpc_addr = gr_gk20a_is_tpc_addr;