diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/tsg_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c index eabb98ea..f8c8be5e 100644 --- a/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/tsg_gk20a.c | |||
@@ -139,17 +139,20 @@ int gk20a_tsg_bind_channel(struct tsg_gk20a *tsg, | |||
139 | 139 | ||
140 | int gk20a_tsg_unbind_channel(struct channel_gk20a *ch) | 140 | int gk20a_tsg_unbind_channel(struct channel_gk20a *ch) |
141 | { | 141 | { |
142 | struct fifo_gk20a *f = &ch->g->fifo; | 142 | struct gk20a *g = ch->g; |
143 | struct tsg_gk20a *tsg = &f->tsg[ch->tsgid]; | 143 | struct tsg_gk20a *tsg = &g->fifo.tsg[ch->tsgid]; |
144 | int err; | ||
144 | 145 | ||
145 | down_write(&tsg->ch_list_lock); | 146 | err = gk20a_fifo_tsg_unbind_channel(ch); |
146 | nvgpu_list_del(&ch->ch_entry); | 147 | if (err) |
147 | up_write(&tsg->ch_list_lock); | 148 | return err; |
148 | 149 | ||
149 | nvgpu_ref_put(&tsg->refcount, gk20a_tsg_release); | 150 | nvgpu_ref_put(&tsg->refcount, gk20a_tsg_release); |
150 | |||
151 | ch->tsgid = NVGPU_INVALID_TSG_ID; | 151 | ch->tsgid = NVGPU_INVALID_TSG_ID; |
152 | 152 | ||
153 | gk20a_dbg(gpu_dbg_fn, "UNBIND tsg:%d channel:%d\n", | ||
154 | tsg->tsgid, ch->chid); | ||
155 | |||
153 | return 0; | 156 | return 0; |
154 | } | 157 | } |
155 | 158 | ||