summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_tsg_gv11b.c
diff options
context:
space:
mode:
authorAparna Das <aparnad@nvidia.com>2018-07-06 13:45:53 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-07-09 19:36:17 -0400
commitad3b170f43dbd5ddb2698c5a193968ae1e584491 (patch)
treef27b4fd4c695920616ed360df5e95d9b46b88a95 /drivers/gpu/nvgpu/vgpu/gv11b/vgpu_tsg_gv11b.c
parent0ddd219697155bcb64aaa04544108519686e16cc (diff)
gpu: nvgpu: vgpu: ring doorbell after enabling TSG
In some use cases client will disable and preempt TSG and then re-enable it using IOCTLs provided In case there is only one context getting re-enabled and there is no other job submission in parallel runlist fetcher will just sleep until doorbell is received next time This causes above mentioned test cases to stall after re-enabling TSG until some one submits a new job and triggers a doorbell Fix this by explicitly triggering doorbell in vgpu code after we enable all channels in TSG. Bug 2205192 Change-Id: I25d643e06152adc6aaf874baf610316f6cd8f13f Signed-off-by: Aparna Das <aparnad@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1772948 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gv11b/vgpu_tsg_gv11b.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/gv11b/vgpu_tsg_gv11b.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_tsg_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_tsg_gv11b.c
index 367c1299..e42bea1f 100644
--- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_tsg_gv11b.c
+++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_tsg_gv11b.c
@@ -58,3 +58,23 @@ int vgpu_gv11b_tsg_bind_channel(struct tsg_gk20a *tsg,
58 58
59 return err; 59 return err;
60} 60}
61
62int vgpu_gv11b_enable_tsg(struct tsg_gk20a *tsg)
63{
64 struct gk20a *g = tsg->g;
65 struct channel_gk20a *ch;
66 struct channel_gk20a *last_ch = NULL;
67
68 nvgpu_rwsem_down_read(&tsg->ch_list_lock);
69 nvgpu_list_for_each_entry(ch, &tsg->ch_list, channel_gk20a, ch_entry) {
70 g->ops.fifo.enable_channel(ch);
71 last_ch = ch;
72 }
73 nvgpu_rwsem_up_read(&tsg->ch_list_lock);
74
75 if (last_ch)
76 g->ops.fifo.ring_channel_doorbell(last_ch);
77
78 return 0;
79}
80