drm/amdkfd: fix a memory leak issue
Subsystems (3)
PATCH 1/1 drm/amdkfd: fix a memory leak issue
In the resume stage of GPU recovery, start_cpsch will call pm_init which set pm->allocated as false, cause the next pm_release_ib has no chance to release ib memory.
Add pm_release_ib in stop_cpsch which will be called in the suspend stage of GPU recovery.
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2 -0
@@ -1192,6 +1192,8 @@ static int stop_cpsch(struct device_queue_manager *dqm) dqm->sched_running = false;dqm_unlock (dqm); +pm_release_ib (&dqm->packets); +kfd_gtt_sa_free (dqm->dev, dqm->fence_mem);pm_uninit (&dqm->packets, hanging);
Signature · 6 lines
2.17.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Am 2020-09-02 um 5:32 a.m. schrieb Dennis Li:
Quoted 8 lines
In the resume stage of GPU recovery,
start_cpschwill callpm_initwhich setpm->allocatedas false, cause the nextpm_release_ibhas no chance to release ib memory.Add
pm_release_ibinstop_cpschwhich will be called in the suspend stage of GPU recovery.Signed-off-by Dennis Li <[email protected]>
Quoted 6 lines
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +0
-0
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c static int stop_cpsch(struct device_queue_manager *dqm) · line 1199
Quoted 8 lines
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +2
-0@@ -1192,6 +1192,8 @@ static int stop_cpsch(struct device_queue_manager *dqm) dqm->sched_running = false;dqm_unlock (dqm); +pm_release_ib (&dqm->packets); +kfd_gtt_sa_free (dqm->dev, dqm->fence_mem);pm_uninit (&dqm->packets, hanging);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx