From 5fb06d03ca25a207b9378a7155c0ac3e91b378ee Mon Sep 17 00:00:00 2001 From: Sagar Kamble Date: Wed, 11 Aug 2021 14:54:22 +0530 Subject: gpu: nvgpu: stop ELPG init thread during unload ELPG initialization thread creation can fail when the process is killed. That leads to driver resume failure. That thread was stopped on suspend and re-created on resume. To avoid the issue above, don't stop the ELPG thread in suspend and let the first created thread handle the ELPG state transitions always. And stop the ELPG thread during unload. bug 3345977 bug 200685277 Change-Id: I8952edf8d1664ed258f238e265002e716d1bf5c2 Signed-off-by: Sagar Kamble Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2573763 (cherry picked from commit f4571194b02094c7d447052bf0b411a44582ef09) Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2574436 Tested-by: mobile promotions Reviewed-by: Konsta Holtta Reviewed-by: Bibek Basu Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/common/pmu/pmu_fw.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/gpu/nvgpu/common/pmu/pmu_fw.c') diff --git a/drivers/gpu/nvgpu/common/pmu/pmu_fw.c b/drivers/gpu/nvgpu/common/pmu/pmu_fw.c index da77f984..d71238a3 100644 --- a/drivers/gpu/nvgpu/common/pmu/pmu_fw.c +++ b/drivers/gpu/nvgpu/common/pmu/pmu_fw.c @@ -1651,6 +1651,8 @@ static void nvgpu_remove_pmu_support(struct nvgpu_pmu *pmu) nvgpu_dma_unmap_free(vm, &pmu->super_surface_buf); + nvgpu_kill_task_pg_init(g); + nvgpu_mutex_destroy(&pmu->elpg_mutex); nvgpu_mutex_destroy(&pmu->pg_mutex); nvgpu_mutex_destroy(&pmu->isr_mutex); -- cgit v1.2.2