drm/amdgpu: Don't warn on destroying a pinned BO
authorMichel Dänzer <michel.daenzer@amd.com>
Thu, 19 Jul 2018 15:38:18 +0000 (17:38 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 24 Jul 2018 20:14:45 +0000 (15:14 -0500)
The warning turned out to be not so useful, as BO destruction tends to
be deferred to a workqueue.

Also, we should be preventing any damage from this now, so not really
important anymore to fix code doing this.

Acked-by: Alex Deucher <alexander.deucher@amd.com>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

index b12526ce1a9d3e7133b74c66e806f7c82c8d26b6..3010f0136de9c4afdb6b20caaef34fab7c4f2a49 100644 (file)
@@ -89,7 +89,7 @@ static void amdgpu_ttm_bo_destroy(struct ttm_buffer_object *tbo)
        struct amdgpu_device *adev = amdgpu_ttm_adev(tbo->bdev);
        struct amdgpu_bo *bo = ttm_to_amdgpu_bo(tbo);
 
-       if (WARN_ON_ONCE(bo->pin_count > 0))
+       if (bo->pin_count > 0)
                amdgpu_bo_subtract_pin_size(bo);
 
        if (bo->kfd_bo)