Re: [PATCH] drm/amdgpu: WARN once if amdgpu_bo_unpin is called for an unpinned BO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Reviewed-by: Alex Deucher <alexander.deuche@xxxxxxx>


From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of Michel Dänzer <michel@xxxxxxxxxxx>
Sent: Thursday, December 13, 2018 11:06:35 AM
To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx
Subject: [PATCH] drm/amdgpu: WARN once if amdgpu_bo_unpin is called for an unpinned BO
 
From: Michel Dänzer <michel.daenzer@xxxxxxx>

It indicates a pin/unpin imbalance bug somewhere. While the bug isn't
necessarily in the call chain hitting this, it's at least one part
involved.

Signed-off-by: Michel Dänzer <michel.daenzer@xxxxxxx>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index fd271f9746a2..728e15e5d68a 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -912,7 +912,7 @@ int amdgpu_bo_unpin(struct amdgpu_bo *bo)
         struct ttm_operation_ctx ctx = { false, false };
         int r, i;
 
-       if (!bo->pin_count) {
+       if (WARN_ON_ONCE(!bo->pin_count)) {
                 dev_warn(adev->dev, "%p unpin not necessary\n", bo);
                 return 0;
         }
--
2.20.0.rc2

_______________________________________________
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

[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux