Hi Emily, Thanks for catching this. I think freeing Discovery TMR bo should be put at amdgpu_ttm_fini() instead of amdgpu_ttm_late_init() because unlike VGA stolen bo, touching PSP-protected Discovery TMR bo will cause GPU hang. Therefore, it should be reserved across the life-cycle of amdgpu driver. Please kindly send v2 patch with this change. BR, Xiaojie ________________________________________ From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Emily Deng <Emily.Deng@xxxxxxx> Sent: Friday, November 1, 2019 5:07 PM To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx Cc: Deng, Emily Subject: [PATCH] drm/amdgpu: Need to free discovery memory When unloading driver, need to free discovery memory. Signed-off-by: Emily Deng <Emily.Deng@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 9f2a893..50d6ed2 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -1091,8 +1091,11 @@ static int gmc_v9_0_sw_fini(void *handle) amdgpu_gem_force_release(adev); amdgpu_vm_manager_fini(adev); - if (gmc_v9_0_keep_stolen_memory(adev)) + if (gmc_v9_0_keep_stolen_memory(adev)) { amdgpu_bo_free_kernel(&adev->stolen_vga_memory, NULL, &stolen_vga_buf); + /* return the IP Discovery TMR memory back to VRAM */ + amdgpu_bo_free_kernel(&adev->discovery_memory, NULL, NULL); + } amdgpu_gart_table_vram_free(adev); amdgpu_bo_fini(adev); -- 2.7.4 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx