]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: fix warning of drm_mm_clean
authorZhenGuo Yin <zhenguo.yin@amd.com>
Tue, 8 Apr 2025 08:18:28 +0000 (16:18 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 16 Apr 2025 19:52:49 +0000 (15:52 -0400)
Kernel doorbell BOs needs to be freed before ttm_fini.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4145
Fixes: 54c30d2a8def ("drm/amdgpu: create kernel doorbell pages")
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: ZhenGuo Yin <zhenguo.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 39938a8ed979e398faa3791a47e282c82bcc6f04)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index b34b915203f25003d845b3036c0ee03d0338dfbf..7f354cd532dc146318daf7e419dd4490e1cd80f3 100644 (file)
@@ -3510,6 +3510,7 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)
                        amdgpu_device_mem_scratch_fini(adev);
                        amdgpu_ib_pool_fini(adev);
                        amdgpu_seq64_fini(adev);
+                       amdgpu_doorbell_fini(adev);
                }
                if (adev->ip_blocks[i].version->funcs->sw_fini) {
                        r = adev->ip_blocks[i].version->funcs->sw_fini(&adev->ip_blocks[i]);
@@ -4858,7 +4859,6 @@ void amdgpu_device_fini_sw(struct amdgpu_device *adev)
 
                iounmap(adev->rmmio);
                adev->rmmio = NULL;
-               amdgpu_doorbell_fini(adev);
                drm_dev_exit(idx);
        }