diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/tsg_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c index 1488fbf9..46db3dd3 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | |||
@@ -323,6 +323,19 @@ void gk20a_tsg_release(struct kref *ref) | |||
323 | gk20a_put(g); | 323 | gk20a_put(g); |
324 | } | 324 | } |
325 | 325 | ||
326 | struct tsg_gk20a *tsg_gk20a_from_ch(struct channel_gk20a *ch) | ||
327 | { | ||
328 | struct tsg_gk20a *tsg = NULL; | ||
329 | |||
330 | if (gk20a_is_channel_marked_as_tsg(ch)) { | ||
331 | struct gk20a *g = ch->g; | ||
332 | struct fifo_gk20a *f = &g->fifo; | ||
333 | tsg = &f->tsg[ch->tsgid]; | ||
334 | } | ||
335 | |||
336 | return tsg; | ||
337 | } | ||
338 | |||
326 | void gk20a_init_tsg_ops(struct gpu_ops *gops) | 339 | void gk20a_init_tsg_ops(struct gpu_ops *gops) |
327 | { | 340 | { |
328 | gops->fifo.tsg_bind_channel = gk20a_tsg_bind_channel; | 341 | gops->fifo.tsg_bind_channel = gk20a_tsg_bind_channel; |