summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/tsg_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/tsg_gk20a.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
index d9ddc011..19d0ecce 100644
--- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c
@@ -280,7 +280,6 @@ struct tsg_gk20a *gk20a_tsg_open(struct gk20a *g)
280 tsg->num_active_channels = 0; 280 tsg->num_active_channels = 0;
281 nvgpu_ref_init(&tsg->refcount); 281 nvgpu_ref_init(&tsg->refcount);
282 282
283 tsg->tsg_gr_ctx = NULL;
284 tsg->vm = NULL; 283 tsg->vm = NULL;
285 tsg->interleave_level = NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW; 284 tsg->interleave_level = NVGPU_FIFO_RUNLIST_INTERLEAVE_LEVEL_LOW;
286 tsg->timeslice_us = 0; 285 tsg->timeslice_us = 0;
@@ -319,10 +318,8 @@ void gk20a_tsg_release(struct nvgpu_ref *ref)
319 if (g->ops.fifo.tsg_release) 318 if (g->ops.fifo.tsg_release)
320 g->ops.fifo.tsg_release(tsg); 319 g->ops.fifo.tsg_release(tsg);
321 320
322 if (tsg->tsg_gr_ctx) { 321 if (nvgpu_mem_is_valid(&tsg->gr_ctx.mem))
323 gr_gk20a_free_tsg_gr_ctx(tsg); 322 gr_gk20a_free_tsg_gr_ctx(tsg);
324 tsg->tsg_gr_ctx = NULL;
325 }
326 323
327 if (g->ops.fifo.deinit_eng_method_buffers) 324 if (g->ops.fifo.deinit_eng_method_buffers)
328 g->ops.fifo.deinit_eng_method_buffers(g, tsg); 325 g->ops.fifo.deinit_eng_method_buffers(g, tsg);