diff options
author | David Nieto <dmartineznie@nvidia.com> | 2017-04-19 00:56:09 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-09-22 18:47:01 -0400 |
commit | 90568a2ce58c03f457bdd4fab6675cd327ed13fd (patch) | |
tree | 4095b7599083ac478dbfbb522f1abcc585dc2801 /drivers/gpu/nvgpu/clk/clk_arb.c | |
parent | 7134e9e852116f86745cd23312bbfba34100bf6d (diff) |
gpu: nvgpu: allow bind to be interrupted
This change solves two problems:
(*) the possibility of a crash due to interrupting the gpu
initialization following a bind
(*) a IOVA memory leak that could prevent the GPU from binding after
about 200 bind/unbind cycles
A detailed list of fixes:
- chek that arbiter is initialized before freeing it.
- do not re-enable interrupts when MSI is enabled on unbind.
- free the semaphore sea on unbind.
- ensure we dont double load the vbios.
- check return value of nvgpu_mutex_init for semaphores.
- add corresponding nvgpu_mutex_destroy calls.
bug 1816516
Change-Id: Ia8af73019e0e1183998855d55bb3eea09672a8b7
Signed-off-by: David Nieto <dmartineznie@nvidia.com>
Reviewed-on: http://git-master/r/1465302
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-by: David Jarrett <djarrett@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1563019
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_arb.c')
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_arb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c index 4f09da74..0df9545a 100644 --- a/drivers/gpu/nvgpu/clk/clk_arb.c +++ b/drivers/gpu/nvgpu/clk/clk_arb.c | |||
@@ -490,9 +490,9 @@ void nvgpu_clk_arb_cleanup_arbiter(struct gk20a *g) | |||
490 | nvgpu_kfree(g, arb->vf_table_pool[index].mclk_points); | 490 | nvgpu_kfree(g, arb->vf_table_pool[index].mclk_points); |
491 | } | 491 | } |
492 | nvgpu_mutex_destroy(&g->clk_arb->pstate_lock); | 492 | nvgpu_mutex_destroy(&g->clk_arb->pstate_lock); |
493 | nvgpu_kfree(g, g->clk_arb); | ||
494 | g->clk_arb = NULL; | ||
493 | } | 495 | } |
494 | nvgpu_kfree(g, g->clk_arb); | ||
495 | g->clk_arb = NULL; | ||
496 | } | 496 | } |
497 | 497 | ||
498 | static int nvgpu_clk_arb_install_fd(struct gk20a *g, | 498 | static int nvgpu_clk_arb_install_fd(struct gk20a *g, |