diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-03-29 04:59:29 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-30 15:36:21 -0400 |
commit | 6c3370a588108ba920c952d63699670905e16449 (patch) | |
tree | f2fdcca18c9a7e127a7d71f601c70da52858b76d /drivers/gpu/nvgpu/gk20a | |
parent | 1ca4c5f069f8b055248aab61619c9a2490b1fe9c (diff) |
gpu: nvgpu: check return value of mutex_init in mclk code
- check return value of nvgpu_mutex_init in clk_mclk.c
- declare new callback g->ops.pmu.mclk_deinit() to
deinitialize mclk mutexes
- and define this callback for gp106
- add corresponding nvgpu_mutex_destroy calls in
deinitialization
Jira NVGPU-13
Change-Id: I1491c084d330ac9756c9520477e6fe494560e651
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1321294
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 4ed7251a..aae3072a 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -452,6 +452,9 @@ static int gk20a_pm_prepare_poweroff(struct device *dev) | |||
452 | ret |= gk20a_mm_suspend(g); | 452 | ret |= gk20a_mm_suspend(g); |
453 | ret |= gk20a_fifo_suspend(g); | 453 | ret |= gk20a_fifo_suspend(g); |
454 | 454 | ||
455 | if (g->ops.pmu.mclk_deinit) | ||
456 | g->ops.pmu.mclk_deinit(g); | ||
457 | |||
455 | /* Disable GPCPLL */ | 458 | /* Disable GPCPLL */ |
456 | if (g->ops.clk.suspend_clk_support) | 459 | if (g->ops.clk.suspend_clk_support) |
457 | ret |= g->ops.clk.suspend_clk_support(g); | 460 | ret |= g->ops.clk.suspend_clk_support(g); |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 951c8267..e3dad962 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -699,6 +699,7 @@ struct gpu_ops { | |||
699 | int (*flcn_populate_bl_dmem_desc)(struct gk20a *g, | 699 | int (*flcn_populate_bl_dmem_desc)(struct gk20a *g, |
700 | void *lsfm, u32 *p_bl_gen_desc_size, u32 falconid); | 700 | void *lsfm, u32 *p_bl_gen_desc_size, u32 falconid); |
701 | int (*mclk_init)(struct gk20a *g); | 701 | int (*mclk_init)(struct gk20a *g); |
702 | void (*mclk_deinit)(struct gk20a *g); | ||
702 | u32 lspmuwprinitdone; | 703 | u32 lspmuwprinitdone; |
703 | u32 lsfloadedfalconid; | 704 | u32 lsfloadedfalconid; |
704 | bool fecsbootstrapdone; | 705 | bool fecsbootstrapdone; |