On 2018-07-16 05:55 PM, Tom St Denis wrote:
> I have the same now and get the attached dmesg.

Still all question marks. :( Anyway, looks like it's probably from
ttm_bo_delayed_delete, but that still doesn't tell us where the BO is
really freed from.


Can you try the attached patch and see if the warning message triggers?
If yes, what error does it report?


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
index b12526ce1a9d..89669544ffa8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
@@ -361,16 +361,21 @@ int amdgpu_bo_create_kernel(struct amdgpu_device *adev,
 void amdgpu_bo_free_kernel(struct amdgpu_bo **bo, u64 *gpu_addr,
 			   void **cpu_addr)
 {
+	int r;
+
 	if (*bo == NULL)
 		return;
 
-	if (likely(amdgpu_bo_reserve(*bo, true) == 0)) {
+	r = amdgpu_bo_reserve(*bo, true);
+	if (likely(r == 0)) {
 		if (cpu_addr)
 			amdgpu_bo_kunmap(*bo);
 
 		amdgpu_bo_unpin(*bo);
 		amdgpu_bo_unreserve(*bo);
-	}
+	} else
+		DRM_WARN_ONCE("amdgpu_bo_reserve returned %d, can't unpin kernel BO\n", r);
+
 	amdgpu_bo_unref(bo);
 
 	if (gpu_addr)
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to