diff --git a/drivers/gpu/nvgpu/common/fifo/tsg.c b/drivers/gpu/nvgpu/common/fifo/tsg.c index d0df5f00a..d426bf051 100644 --- a/drivers/gpu/nvgpu/common/fifo/tsg.c +++ b/drivers/gpu/nvgpu/common/fifo/tsg.c @@ -338,7 +338,7 @@ void nvgpu_tsg_delete_subcontext(struct gk20a *g, struct nvgpu_tsg *tsg, return; } nvgpu_clear_bit(veid - MAX_SYNC_SUBCONTEXTS, tsg->async_veids); - tsg->subctx_vms[veid - MAX_SYNC_SUBCONTEXTS] = NULL; + tsg->subctx_vms[veid] = NULL; } nvgpu_mutex_release(&tsg->veid_alloc_lock); diff --git a/drivers/gpu/nvgpu/include/nvgpu/tsg.h b/drivers/gpu/nvgpu/include/nvgpu/tsg.h index d310e5976..ebfb09363 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/tsg.h +++ b/drivers/gpu/nvgpu/include/nvgpu/tsg.h @@ -403,9 +403,6 @@ int nvgpu_tsg_create_sync_subcontext_internal(struct gk20a *g, * @param tsg [in] Pointer to TSG struct. * @param ch [in] Pointer to Channel struct. * - * - If this is first channel created without creating subcontext, - * then this channel is using subcontext with VEID 0 by default. - * Set subctx_vms and reserve the VEID0. * - If channel VM does not match subcontext VM return -EINVAL. * * @return 0 in case of success, < 0 in case of failure.