summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
authorDavid Nieto <dmartineznie@nvidia.com>2017-04-19 00:56:09 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-09-22 18:47:01 -0400
commit90568a2ce58c03f457bdd4fab6675cd327ed13fd (patch)
tree4095b7599083ac478dbfbb522f1abcc585dc2801 /drivers/gpu/nvgpu/gk20a
parent7134e9e852116f86745cd23312bbfba34100bf6d (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/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h1
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index 13c62691..0cd77d1e 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -1233,6 +1233,7 @@ struct gk20a {
1233#ifdef CONFIG_DEBUG_FS 1233#ifdef CONFIG_DEBUG_FS
1234 struct debugfs_blob_wrapper bios_blob; 1234 struct debugfs_blob_wrapper bios_blob;
1235#endif 1235#endif
1236 bool bios_is_init;
1236 1237
1237 struct nvgpu_clk_arb *clk_arb; 1238 struct nvgpu_clk_arb *clk_arb;
1238 1239
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 0e0326dd..dd8b900d 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -393,7 +393,7 @@ static void gk20a_remove_mm_support(struct mm_gk20a *mm)
393 nvgpu_vm_put(mm->pmu.vm); 393 nvgpu_vm_put(mm->pmu.vm);
394 nvgpu_vm_put(mm->cde.vm); 394 nvgpu_vm_put(mm->cde.vm);
395 395
396 gk20a_semaphore_sea_destroy(g); 396 nvgpu_semaphore_sea_destroy(g);
397 gk20a_vidmem_destroy(g); 397 gk20a_vidmem_destroy(g);
398 nvgpu_pd_cache_fini(g); 398 nvgpu_pd_cache_fini(g);
399} 399}