aboutsummaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/linux/linux-yocto-4.14.71/2125-drm-amdkfd-Turn-expected-errors-into-debug-messages.patch
blob: d17dc9f2e156f7e4f3d1c115009a30299f3253a1 (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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
From 9035f78f25fa6e38c267444528201169f612c371 Mon Sep 17 00:00:00 2001
From: Felix Kuehling <Felix.Kuehling@amd.com>
Date: Fri, 13 Oct 2017 11:52:29 -0400
Subject: [PATCH 2125/4131] drm/amdkfd: 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: If2b2030b091e1cfd8a3f44995758e10efbe29cd9
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c               | 8 ++++----
 drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index c7cae86..f6b3165 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
@@ -1297,7 +1297,7 @@ static int kfd_ioctl_map_memory_to_gpu(struct file *filep,
 
 	if (args->device_ids_array_size > 0 &&
 			(args->device_ids_array_size < sizeof(uint32_t))) {
-		pr_err("Node IDs array size %u\n",
+		pr_debug("Node IDs array size %u\n",
 				args->device_ids_array_size);
 		return -EFAULT;
 	}
@@ -1336,7 +1336,7 @@ static int kfd_ioctl_map_memory_to_gpu(struct file *filep,
 		for (i = 0 ; i < num_dev; i++) {
 			peer = kfd_device_by_id(devices_arr[i]);
 			if (!peer) {
-				pr_err("Getting device by id failed for 0x%x\n",
+				pr_debug("Getting device by id failed for 0x%x\n",
 						devices_arr[i]);
 				err = -EFAULT;
 				goto get_mem_obj_from_handle_failed;
@@ -1428,7 +1428,7 @@ static int kfd_ioctl_unmap_memory_from_gpu(struct file *filep,
 
 	if (args->device_ids_array_size > 0 &&
 			(args->device_ids_array_size < sizeof(uint32_t))) {
-		pr_err("Node IDs array size %u\n",
+		pr_debug("Node IDs array size %u\n",
 				args->device_ids_array_size);
 		return -EFAULT;
 	}
@@ -1451,7 +1451,7 @@ static int kfd_ioctl_unmap_memory_from_gpu(struct file *filep,
 
 	pdd = kfd_get_process_device_data(dev, p);
 	if (!pdd) {
-		pr_err("Process device data doesn't exist\n");
+		pr_debug("Process device data doesn't exist\n");
 		err = PTR_ERR(pdd);
 		goto bind_process_to_device_failed;
 	}
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
index 88894fd..fb7d711 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
@@ -188,7 +188,7 @@ int pqm_create_queue(struct process_queue_manager *pqm,
 	switch (type) {
 	case KFD_QUEUE_TYPE_SDMA:
                 if (dev->dqm->sdma_queue_count >= CIK_SDMA_QUEUES) {
-			pr_err("Over-subscription is not allowed for SDMA\n");
+			pr_debug("Over-subscription is not allowed for SDMA\n");
                         retval = -EPERM;
                         goto err_create_queue;
                 }
@@ -210,7 +210,7 @@ int pqm_create_queue(struct process_queue_manager *pqm,
 				KFD_SCHED_POLICY_HWS_NO_OVERSUBSCRIPTION) &&
 		((dev->dqm->processes_count >= dev->vm_info.vmid_num_kfd) ||
 		(dev->dqm->queue_count >= get_queues_num(dev->dqm)))) {
-			pr_err("Over-subscription is not allowed in radeon_kfd.sched_policy == 1\n");
+			pr_debug("Over-subscription is not allowed in radeon_kfd.sched_policy == 1\n");
 			retval = -EPERM;
 			goto err_create_queue;
 		}
-- 
2.7.4