]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/amdgpu: warn when there are still mappings when a BO is destroyed v2
authorChristian König <christian.koenig@amd.com>
Mon, 4 Dec 2023 14:51:50 +0000 (15:51 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 13 Dec 2023 21:50:46 +0000 (16:50 -0500)
This can only happen when there is a reference counting bug.

v2: fix typo

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

index d79b4ca1ecfc4a0028bceb48703ea2cf3d989067..5ad03f2afdb45aa5233c5c48b3e12276513be831 100644 (file)
@@ -1343,6 +1343,8 @@ void amdgpu_bo_release_notify(struct ttm_buffer_object *bo)
 
        abo = ttm_to_amdgpu_bo(bo);
 
+       WARN_ON(abo->vm_bo);
+
        if (abo->kfd_bo)
                amdgpu_amdkfd_release_notify(abo);