aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/0945-drm-amdgpu-WARN-once-if-amdgpu_bo_unpin-is-called-fo.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.19.8/0945-drm-amdgpu-WARN-once-if-amdgpu_bo_unpin-is-called-fo.patch')
-rw-r--r--common/recipes-kernel/linux/linux-yocto-4.19.8/0945-drm-amdgpu-WARN-once-if-amdgpu_bo_unpin-is-called-fo.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.19.8/0945-drm-amdgpu-WARN-once-if-amdgpu_bo_unpin-is-called-fo.patch b/common/recipes-kernel/linux/linux-yocto-4.19.8/0945-drm-amdgpu-WARN-once-if-amdgpu_bo_unpin-is-called-fo.patch
new file mode 100644
index 00000000..9f075e88
--- /dev/null
+++ b/common/recipes-kernel/linux/linux-yocto-4.19.8/0945-drm-amdgpu-WARN-once-if-amdgpu_bo_unpin-is-called-fo.patch
@@ -0,0 +1,36 @@
+From f0090b23a9d6faec8b12f2ddf075130c2d3bb7d0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>
+Date: Thu, 13 Dec 2018 17:05:31 +0100
+Subject: [PATCH 0945/2940] drm/amdgpu: WARN once if amdgpu_bo_unpin is called
+ for an unpinned BO
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+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.
+
+Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+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 | 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 55cfbf509b15..b308751d9e16 100644
+--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
++++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
+@@ -945,7 +945,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.17.1
+