diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ce2_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c index 99c518b5..5e2fc6b3 100644 --- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | |||
@@ -456,14 +456,12 @@ u32 gk20a_ce_create_context(struct gk20a *g, | |||
456 | 456 | ||
457 | ce_ctx->vm = g->mm.ce.vm; | 457 | ce_ctx->vm = g->mm.ce.vm; |
458 | 458 | ||
459 | if (nvgpu_is_enabled(g, NVGPU_MM_CE_TSG_REQUIRED)) { | 459 | /* allocate a tsg if needed */ |
460 | /* allocate a tsg if needed */ | 460 | ce_ctx->tsg = gk20a_tsg_open(g); |
461 | ce_ctx->tsg = gk20a_tsg_open(g); | ||
462 | 461 | ||
463 | if (!ce_ctx->tsg) { | 462 | if (!ce_ctx->tsg) { |
464 | nvgpu_err(g, "ce: gk20a tsg not available"); | 463 | nvgpu_err(g, "ce: gk20a tsg not available"); |
465 | goto end; | 464 | goto end; |
466 | } | ||
467 | } | 465 | } |
468 | 466 | ||
469 | /* always kernel client needs privileged channel */ | 467 | /* always kernel client needs privileged channel */ |
@@ -481,12 +479,10 @@ u32 gk20a_ce_create_context(struct gk20a *g, | |||
481 | goto end; | 479 | goto end; |
482 | } | 480 | } |
483 | 481 | ||
484 | if (nvgpu_is_enabled(g, NVGPU_MM_CE_TSG_REQUIRED)) { | 482 | err = gk20a_tsg_bind_channel(ce_ctx->tsg, ce_ctx->ch); |
485 | err = gk20a_tsg_bind_channel(ce_ctx->tsg, ce_ctx->ch); | 483 | if (err) { |
486 | if (err) { | 484 | nvgpu_err(g, "ce: unable to bind to tsg"); |
487 | nvgpu_err(g, "ce: unable to bind to tsg"); | 485 | goto end; |
488 | goto end; | ||
489 | } | ||
490 | } | 486 | } |
491 | 487 | ||
492 | /* allocate gpfifo (1024 should be more than enough) */ | 488 | /* allocate gpfifo (1024 should be more than enough) */ |