From 90568a2ce58c03f457bdd4fab6675cd327ed13fd Mon Sep 17 00:00:00 2001 From: David Nieto Date: Tue, 18 Apr 2017 21:56:09 -0700 Subject: 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 Reviewed-on: http://git-master/r/1465302 Reviewed-by: Alex Waterman Reviewed-by: Thomas Fleury Reviewed-by: David Jarrett Reviewed-on: https://git-master.nvidia.com/r/1563019 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gk20a.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h') 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 { #ifdef CONFIG_DEBUG_FS struct debugfs_blob_wrapper bios_blob; #endif + bool bios_is_init; struct nvgpu_clk_arb *clk_arb; -- cgit v1.2.2