diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/ioctl_channel.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c index 2c9fac0b..a083cb81 100644 --- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c +++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c | |||
@@ -180,6 +180,19 @@ static int gk20a_channel_set_wdt_status(struct channel_gk20a *ch, | |||
180 | return 0; | 180 | return 0; |
181 | } | 181 | } |
182 | 182 | ||
183 | static void gk20a_channel_free_error_notifiers(struct channel_gk20a *ch) | ||
184 | { | ||
185 | nvgpu_mutex_acquire(&ch->error_notifier_mutex); | ||
186 | if (ch->error_notifier_ref) { | ||
187 | dma_buf_vunmap(ch->error_notifier_ref, ch->error_notifier_va); | ||
188 | dma_buf_put(ch->error_notifier_ref); | ||
189 | ch->error_notifier_ref = NULL; | ||
190 | ch->error_notifier = NULL; | ||
191 | ch->error_notifier_va = NULL; | ||
192 | } | ||
193 | nvgpu_mutex_release(&ch->error_notifier_mutex); | ||
194 | } | ||
195 | |||
183 | static int gk20a_init_error_notifier(struct channel_gk20a *ch, | 196 | static int gk20a_init_error_notifier(struct channel_gk20a *ch, |
184 | struct nvgpu_set_error_notifier *args) | 197 | struct nvgpu_set_error_notifier *args) |
185 | { | 198 | { |
@@ -262,6 +275,8 @@ int gk20a_channel_release(struct inode *inode, struct file *filp) | |||
262 | trace_gk20a_channel_release(dev_name(g->dev)); | 275 | trace_gk20a_channel_release(dev_name(g->dev)); |
263 | 276 | ||
264 | gk20a_channel_close(ch); | 277 | gk20a_channel_close(ch); |
278 | gk20a_channel_free_error_notifiers(ch); | ||
279 | |||
265 | gk20a_idle(g); | 280 | gk20a_idle(g); |
266 | 281 | ||
267 | channel_release: | 282 | channel_release: |