aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/files/0568-drm-amd-dal-fix-incorrect-cursor-error-msg.patch
blob: fb5e4bb9ced1feb10bbcdfd666109e65f9a30116 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From 10396990f4bef04210419ce23b4997f696fb06af Mon Sep 17 00:00:00 2001
From: Mykola Lysenko <Mykola.Lysenko@amd.com>
Date: Thu, 3 Dec 2015 11:40:23 +0800
Subject: [PATCH 0568/1110] drm/amd/dal: fix incorrect cursor error msg

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
---
 drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
index 4c460c0..3b64ffe 100644
--- a/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
+++ b/drivers/gpu/drm/amd/dal/amdgpu_dm/amdgpu_dm_types.c
@@ -115,13 +115,24 @@ static int dm_crtc_unpin_cursor_bo_old(
 		ret  = amdgpu_bo_reserve(robj, false);
 
 		if (likely(ret == 0)) {
-			amdgpu_bo_unpin(robj);
+			ret = amdgpu_bo_unpin(robj);
+
+			if (unlikely(ret != 0)) {
+				DRM_ERROR(
+					"%s: unpin failed (ret=%d), bo %p\n",
+					__func__,
+					ret,
+					amdgpu_crtc->cursor_bo);
+			}
+
 			amdgpu_bo_unreserve(robj);
-		}
-	} else {
-		DRM_ERROR("dm_crtc_unpin_cursor_ob_old bo %x, leaked %p\n",
+		} else {
+			DRM_ERROR(
+				"%s: reserve failed (ret=%d), bo %p\n",
+				__func__,
 				ret,
 				amdgpu_crtc->cursor_bo);
+		}
 	}
 
 	drm_gem_object_unreference_unlocked(amdgpu_crtc->cursor_bo);
-- 
2.7.4