summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2017-09-14 06:47:48 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-09-15 15:48:21 -0400
commit2b7e8a2c2a5df041c9a434804d0f3f6d9df82737 (patch)
tree126b14a854a75aa926966acfe41f4f5823711cfe /drivers/gpu/nvgpu/vgpu/gr_vgpu.c
parent460951ed092aad787bacd0ebb0646b799d3463a1 (diff)
gpu: nvgpu: fix channel unbind sequence from TSG
We right now remove a channel from TSG list and disable all the channels in TSG while removing a channel from TSG With this sequence if any one channel in TSG is closed, rest of the channels are set as timed out and cannot be used anymore We need to fix this sequence as below to allow removing a channel from active TSG so that rest of the channels can still be used - disable all channels of TSG - preempt TSG - check if CTX_RELOAD is set if support is available if CTX_RELOAD is set on channel, it should be moved to some other channel - check if FAULTED is set if support is available - if NEXT is set on channel then it means channel is still active print out an error in this case for the time being until properly handled - remove the channel from runlist - remove channel from TSG list - re-enable rest of the channels in TSG - clean up the channel (same as regular channels) Add below fifo operations to support checking channel status g->ops.fifo.tsg_verify_status_ctx_reload g->ops.fifo.tsg_verify_status_faulted Define ops.fifo.tsg_verify_status_ctx_reload operation for gm20b/gp10b/gp106 as gm20b_fifo_tsg_verify_status_ctx_reload() This API will check if channel to be released has CTX_RELOAD set, if yes CTX_RELOAD needs to be moved to some other channel in TSG Remove static from channel_gk20a_update_runlist() and export it Bug 200327095 Change-Id: I0dd4be7c7e0b9b759389ec12c5a148a4b919d3e2 Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1560637 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gr_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/gr_vgpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
index e3dfb874..bacd6ded 100644
--- a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
@@ -418,7 +418,7 @@ static void vgpu_gr_free_channel_pm_ctx(struct channel_gk20a *c)
418 pm_ctx->mem.gpu_va = 0; 418 pm_ctx->mem.gpu_va = 0;
419} 419}
420 420
421static void vgpu_gr_free_channel_ctx(struct channel_gk20a *c) 421static void vgpu_gr_free_channel_ctx(struct channel_gk20a *c, bool is_tsg)
422{ 422{
423 gk20a_dbg_fn(""); 423 gk20a_dbg_fn("");
424 424
@@ -427,7 +427,7 @@ static void vgpu_gr_free_channel_ctx(struct channel_gk20a *c)
427 vgpu_gr_unmap_global_ctx_buffers(c); 427 vgpu_gr_unmap_global_ctx_buffers(c);
428 vgpu_gr_free_channel_patch_ctx(c); 428 vgpu_gr_free_channel_patch_ctx(c);
429 vgpu_gr_free_channel_pm_ctx(c); 429 vgpu_gr_free_channel_pm_ctx(c);
430 if (!gk20a_is_channel_marked_as_tsg(c)) 430 if (!is_tsg)
431 vgpu_gr_free_channel_gr_ctx(c); 431 vgpu_gr_free_channel_gr_ctx(c);
432 432
433 /* zcull_ctx, pm_ctx */ 433 /* zcull_ctx, pm_ctx */