aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/2126-drm-amdgpu-Turn-expected-errors-into-debug-messages.patch
blob: cf7d8851679560723e1a32cefdcf475bce95e9c2 (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
50
51
52
53
54
55
56
57
58
59
From 908ac11135a20f45def6dac67a170ecdedf0dab3 Mon Sep 17 00:00:00 2001
From: Felix Kuehling <Felix.Kuehling@amd.com>
Date: Fri, 13 Oct 2017 12:06:48 -0400
Subject: [PATCH 2126/4131] drm/amdgpu: Turn expected errors into debug
 messages

Expected errors that must be handled in user mode shouldn't spam the
kernel log. These messages can also mislead users into thinking that
they found a KFD bug. Turn them into debug messages.

Change-Id: I820a5c6ab8caf5445d225fdc90c42f5d1cb5142d
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index b1873c2..a013f5b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -719,7 +719,7 @@ static int __alloc_memory_of_gpu(struct kgd_dev *kgd, uint64_t va,
 
 	ret = amdgpu_amdkfd_reserve_system_mem_limit(adev, size, alloc_domain);
 	if (ret) {
-		pr_err("Insufficient system memory\n");
+		pr_debug("Insufficient system memory\n");
 		goto err_bo_create;
 	}
 
@@ -733,7 +733,7 @@ static int __alloc_memory_of_gpu(struct kgd_dev *kgd, uint64_t va,
 				alloc_domain,
 			       flags, sg, NULL, 0, &bo);
 	if (ret != 0) {
-		pr_err("Failed to create BO on domain %s. ret %d\n",
+		pr_debug("Failed to create BO on domain %s. ret %d\n",
 				domain_string(alloc_domain), ret);
 		unreserve_system_mem_limit(adev, size, alloc_domain);
 		goto err_bo_create;
@@ -1096,7 +1096,7 @@ int amdgpu_amdkfd_gpuvm_alloc_memory_of_gpu(
 	struct sg_table *sg = NULL;
 
 	if (!(flags & ALLOC_MEM_FLAGS_NONPAGED)) {
-		pr_err("current hw doesn't support paged memory\n");
+		pr_debug("current hw doesn't support paged memory\n");
 		return -EINVAL;
 	}
 
@@ -1176,7 +1176,7 @@ int amdgpu_amdkfd_gpuvm_free_memory_of_gpu(
 	mutex_lock(&mem->lock);
 
 	if (mem->mapped_to_gpu_memory > 0) {
-		pr_err("BO VA 0x%llx size 0x%lx is already mapped to vm %p.\n",
+		pr_debug("BO VA 0x%llx size 0x%lx is already mapped to vm %p.\n",
 				mem->va, bo_size, vm);
 		mutex_unlock(&mem->lock);
 		return -EBUSY;
-- 
2.7.4