summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/include/nvgpu/semaphore.h
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/include/nvgpu/semaphore.h
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/include/nvgpu/semaphore.h')
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/semaphore.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/semaphore.h b/drivers/gpu/nvgpu/include/nvgpu/semaphore.h
index 5c0019ae..8915b722 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/semaphore.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/semaphore.h
@@ -160,7 +160,7 @@ struct nvgpu_semaphore_sea {
160 * Semaphore sea functions. 160 * Semaphore sea functions.
161 */ 161 */
162struct nvgpu_semaphore_sea *nvgpu_semaphore_sea_create(struct gk20a *gk20a); 162struct nvgpu_semaphore_sea *nvgpu_semaphore_sea_create(struct gk20a *gk20a);
163void gk20a_semaphore_sea_destroy(struct gk20a *g); 163void nvgpu_semaphore_sea_destroy(struct gk20a *g);
164int nvgpu_semaphore_sea_map(struct nvgpu_semaphore_pool *sea, 164int nvgpu_semaphore_sea_map(struct nvgpu_semaphore_pool *sea,
165 struct vm_gk20a *vm); 165 struct vm_gk20a *vm);
166void nvgpu_semaphore_sea_unmap(struct nvgpu_semaphore_pool *sea, 166void nvgpu_semaphore_sea_unmap(struct nvgpu_semaphore_pool *sea,