summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_tsg_gv11b.c
diff options
context:
space:
mode:
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