]> git.itanic.dy.fi Git - linux-stable/commitdiff
drm/amdgpu: conduct a proper cleanup of PDB bo
authorGuchun Chen <guchun.chen@amd.com>
Tue, 15 Mar 2022 06:59:28 +0000 (14:59 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 25 Mar 2022 16:40:24 +0000 (12:40 -0400)
Use amdgpu_bo_free_kernel instead of amdgpu_bo_unref to
perform a proper cleanup of PDB bo.

v2: update subject to be more accurate

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c

index 431742eb78110acd28507e85673cf4e94eda4a9f..08ceabd6c85335cfe113e3629e42a3e17d0eb6a1 100644 (file)
@@ -1721,7 +1721,7 @@ static int gmc_v9_0_sw_fini(void *handle)
        amdgpu_gem_force_release(adev);
        amdgpu_vm_manager_fini(adev);
        amdgpu_gart_table_vram_free(adev);
-       amdgpu_bo_unref(&adev->gmc.pdb0_bo);
+       amdgpu_bo_free_kernel(&adev->gmc.pdb0_bo, NULL, &adev->gmc.ptr_pdb0);
        amdgpu_bo_fini(adev);
 
        return 0;