diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/channel_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index fad6b6af..49d83069 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -17,7 +17,10 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include <trace/events/gk20a.h> | 19 | #include <trace/events/gk20a.h> |
20 | |||
21 | #if defined(CONFIG_DEBUG_FS) || defined(CONFIG_GK20A_CYCLE_STATS) | ||
20 | #include <linux/dma-buf.h> | 22 | #include <linux/dma-buf.h> |
23 | #endif | ||
21 | 24 | ||
22 | #include <nvgpu/semaphore.h> | 25 | #include <nvgpu/semaphore.h> |
23 | #include <nvgpu/timers.h> | 26 | #include <nvgpu/timers.h> |
@@ -389,19 +392,6 @@ void gk20a_set_error_notifier(struct channel_gk20a *ch, __u32 error) | |||
389 | nvgpu_mutex_release(&ch->error_notifier_mutex); | 392 | nvgpu_mutex_release(&ch->error_notifier_mutex); |
390 | } | 393 | } |
391 | 394 | ||
392 | void gk20a_channel_free_error_notifiers(struct channel_gk20a *ch) | ||
393 | { | ||
394 | nvgpu_mutex_acquire(&ch->error_notifier_mutex); | ||
395 | if (ch->error_notifier_ref) { | ||
396 | dma_buf_vunmap(ch->error_notifier_ref, ch->error_notifier_va); | ||
397 | dma_buf_put(ch->error_notifier_ref); | ||
398 | ch->error_notifier_ref = NULL; | ||
399 | ch->error_notifier = NULL; | ||
400 | ch->error_notifier_va = NULL; | ||
401 | } | ||
402 | nvgpu_mutex_release(&ch->error_notifier_mutex); | ||
403 | } | ||
404 | |||
405 | static void gk20a_wait_until_counter_is_N( | 395 | static void gk20a_wait_until_counter_is_N( |
406 | struct channel_gk20a *ch, atomic_t *counter, int wait_value, | 396 | struct channel_gk20a *ch, atomic_t *counter, int wait_value, |
407 | struct nvgpu_cond *c, const char *caller, const char *counter_name) | 397 | struct nvgpu_cond *c, const char *caller, const char *counter_name) |
@@ -528,8 +518,6 @@ static void gk20a_free_channel(struct channel_gk20a *ch, bool force) | |||
528 | gk20a_dbg_info("freeing bound channel context, timeout=%ld", | 518 | gk20a_dbg_info("freeing bound channel context, timeout=%ld", |
529 | timeout); | 519 | timeout); |
530 | 520 | ||
531 | gk20a_channel_free_error_notifiers(ch); | ||
532 | |||
533 | if (g->ops.fecs_trace.unbind_channel && !ch->vpr) | 521 | if (g->ops.fecs_trace.unbind_channel && !ch->vpr) |
534 | g->ops.fecs_trace.unbind_channel(g, ch); | 522 | g->ops.fecs_trace.unbind_channel(g, ch); |
535 | 523 | ||