mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-25 11:04:51 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
7134e9e852
commit
90568a2ce5
@@ -66,11 +66,12 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
void gk20a_semaphore_sea_destroy(struct gk20a *g)
|
||||
void nvgpu_semaphore_sea_destroy(struct gk20a *g)
|
||||
{
|
||||
if (!g->sema_sea)
|
||||
return;
|
||||
|
||||
nvgpu_dma_free(g, &g->sema_sea->sea_mem);
|
||||
nvgpu_mutex_destroy(&g->sema_sea->sea_lock);
|
||||
nvgpu_kfree(g, g->sema_sea);
|
||||
g->sema_sea = NULL;
|
||||
|
||||
Reference in New Issue
Block a user