aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.19.8/1102-drm-amdgpu-soc15-return-proper-error-codes-in-baco-r.patch
blob: 6f97a4cf4a33385d31c703c82b4f6f55afb8f185 (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
48
49
From 6bf541a1b571b647646f00e6752bdab20fd43bf7 Mon Sep 17 00:00:00 2001
From: Alex Deucher <alexander.deucher@amd.com>
Date: Mon, 14 Jan 2019 14:56:42 -0500
Subject: [PATCH 1102/2940] drm/amdgpu/soc15: return proper error codes in baco
 reset

Rather than just -1.

Reviewed-by: JimQu <Jim.Qu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/soc15.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
index 9eb2bc607487..1cf4a89f4157 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
@@ -427,7 +427,7 @@ static int soc15_asic_get_baco_capability(struct amdgpu_device *adev, bool *cap)
 
 	if (!pp_funcs || !pp_funcs->get_asic_baco_capability) {
 		*cap = false;
-		return -1;
+		return -ENOENT;
 	}
 
 	return pp_funcs->get_asic_baco_capability(pp_handle, cap);
@@ -439,15 +439,15 @@ static int soc15_asic_baco_reset(struct amdgpu_device *adev)
 	const struct amd_pm_funcs *pp_funcs = adev->powerplay.pp_funcs;
 
 	if (!pp_funcs ||!pp_funcs->get_asic_baco_state ||!pp_funcs->set_asic_baco_state)
-		return -1;
+		return -ENOENT;
 
 	/* enter BACO state */
 	if (pp_funcs->set_asic_baco_state(pp_handle, 1))
-		return -1;
+		return -EIO;
 
 	/* exit BACO state */
 	if (pp_funcs->set_asic_baco_state(pp_handle, 0))
-		return -1;
+		return -EIO;
 
 	dev_info(adev->dev, "GPU BACO reset\n");
 
-- 
2.17.1