diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-03-08 04:50:58 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-14 14:46:58 -0400 |
commit | bf717d6273fa2d618dd2adf9bc349881f599e102 (patch) | |
tree | 31a69151bd2c3cff6e480c8fe817b25ecb2407fa /drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |
parent | 9efadcdfc07572d789f8f2581af70d03cf5cbde4 (diff) |
gpu: nvgpu: check return value of mutex_init for channel/TSG
- check return value of nvgpu_mutex_init for all the mutexes
of a channel and TSG
- add corresponding nvgpu_mutex_destroy calls
Jira NVGPU-13
Change-Id: Iba3a5f8bc2261ec684b300dd4237ab7d22fa3630
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1317139
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 04d68872..a2846d2a 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -513,6 +513,7 @@ static void gk20a_remove_fifo_support(struct fifo_gk20a *f) | |||
513 | */ | 513 | */ |
514 | for (; i < f->num_channels; i++) { | 514 | for (; i < f->num_channels; i++) { |
515 | struct channel_gk20a *c = f->channel + i; | 515 | struct channel_gk20a *c = f->channel + i; |
516 | struct tsg_gk20a *tsg = f->tsg + i; | ||
516 | 517 | ||
517 | /* | 518 | /* |
518 | * Could race but worst that happens is we get an error message | 519 | * Could race but worst that happens is we get an error message |
@@ -520,6 +521,21 @@ static void gk20a_remove_fifo_support(struct fifo_gk20a *f) | |||
520 | */ | 521 | */ |
521 | if (c->referenceable) | 522 | if (c->referenceable) |
522 | __gk20a_channel_kill(c); | 523 | __gk20a_channel_kill(c); |
524 | |||
525 | nvgpu_mutex_destroy(&tsg->event_id_list_lock); | ||
526 | |||
527 | nvgpu_mutex_destroy(&c->ioctl_lock); | ||
528 | nvgpu_mutex_destroy(&c->error_notifier_mutex); | ||
529 | nvgpu_mutex_destroy(&c->joblist.cleanup_lock); | ||
530 | nvgpu_mutex_destroy(&c->joblist.pre_alloc.read_lock); | ||
531 | nvgpu_mutex_destroy(&c->sync_lock); | ||
532 | #if defined(CONFIG_GK20A_CYCLE_STATS) | ||
533 | nvgpu_mutex_destroy(&c->cyclestate.cyclestate_buffer_mutex); | ||
534 | nvgpu_mutex_destroy(&c->cs_client_mutex); | ||
535 | #endif | ||
536 | nvgpu_mutex_destroy(&c->event_id_list_lock); | ||
537 | nvgpu_mutex_destroy(&c->dbg_s_lock); | ||
538 | |||
523 | } | 539 | } |
524 | 540 | ||
525 | vfree(f->channel); | 541 | vfree(f->channel); |