Skip to contentSkip to conversation

amdgpu: Downgrade DRM_ERROR to DRM_DEBUG in amdgpu_queue_mgr_map

PATCH In review Michel Dänzer 3 participants 3 messages Nov 21, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amdgpu: Downgrade DRM_ERROR to DRM_DEBUG in amdgpu_queue_mgr_map

From: Michel Dänzer <[email protected]>

Prevent buggy userspace from spamming dmesg.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c +5 -5
index 93d86619e802..262c1267249e 100644
@@ -225,7 +225,7 @@ int amdgpu_queue_mgr_map(struct amdgpu_device *adev,
 
 	/* Right now all IPs have only one instance - multiple rings. */
 	if (instance != 0) {
-		DRM_ERROR("invalid ip instance: %d\n", instance);
+		DRM_DEBUG("invalid ip instance: %d\n", instance);
 		return -EINVAL;
 	}
 
@@ -255,13 +255,13 @@ int amdgpu_queue_mgr_map(struct amdgpu_device *adev,
 		ip_num_rings = adev->vcn.num_enc_rings;
 		break;
 	default:
-		DRM_ERROR("unknown ip type: %d\n", hw_ip);
+		DRM_DEBUG("unknown ip type: %d\n", hw_ip);
 		return -EINVAL;
 	}
 
 	if (ring >= ip_num_rings) {
-		DRM_ERROR("Ring index:%d exceeds maximum:%d for ip:%d\n",
-				ring, ip_num_rings, hw_ip);
+		DRM_DEBUG("Ring index:%d exceeds maximum:%d for ip:%d\n",
+			  ring, ip_num_rings, hw_ip);
 		return -EINVAL;
 	}
 
@@ -292,7 +292,7 @@ int amdgpu_queue_mgr_map(struct amdgpu_device *adev,
 	default:
 		*out_ring = NULL;
 		r = -EINVAL;
-		DRM_ERROR("unknown HW IP type: %d\n", mapper->hw_ip);
+		DRM_DEBUG("unknown HW IP type: %d\n", mapper->hw_ip);
 	}
 
 out_unlock:
Signature · 6 lines
2.15.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 20171121172958.8100-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org

Reviewed-by Alex Deucher
#2 lore raw
Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Tuesday, November 21, 2017 12:30 PM
To: [email protected]
Subject: [PATCH] amdgpu: Downgrade DRM_ERROR to DRM_DEBUG in amdgpu_queue_mgr_map

Quoted 5 lines

From: Michel Dänzer <[email protected]>

Prevent buggy userspace from spamming dmesg.

Quoted 50 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c +4 -4
index 93d86619e802..262c1267249e 100644
@@ -225,7 +225,7 @@ int amdgpu_queue_mgr_map(struct amdgpu_device
 *adev,
 
 	/* Right now all IPs have only one instance - multiple rings. */
 	if (instance != 0) {
-		DRM_ERROR("invalid ip instance: %d\n", instance);
+		DRM_DEBUG("invalid ip instance: %d\n", instance);
 		return -EINVAL;
 	}
@@ -255,13 +255,13 @@ int amdgpu_queue_mgr_map(struct
 amdgpu_device *adev,
 		ip_num_rings = adev->vcn.num_enc_rings;
 		break;
 	default:
-		DRM_ERROR("unknown ip type: %d\n", hw_ip);
+		DRM_DEBUG("unknown ip type: %d\n", hw_ip);
 		return -EINVAL;
 	}
 
 	if (ring >= ip_num_rings) {
-		DRM_ERROR("Ring index:%d exceeds maximum:%d for
 ip:%d\n",
-				ring, ip_num_rings, hw_ip);
+		DRM_DEBUG("Ring index:%d exceeds maximum:%d for
 ip:%d\n",
+			  ring, ip_num_rings, hw_ip);
drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c +1 -1
 		return -EINVAL;
 	}
@@ -292,7 +292,7 @@ int amdgpu_queue_mgr_map(struct amdgpu_device
 *adev,
 	default:
 		*out_ring = NULL;
 		r = -EINVAL;
-		DRM_ERROR("unknown HW IP type: %d\n", mapper-
 >hw_ip);
+		DRM_DEBUG("unknown HW IP type: %d\n", mapper-
 >hw_ip);

}

Quoted 8 lines

out_unlock:
--
2.15.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

#3 lore raw
In reply to a message not in the archive

Am 21.11.2017 um 18:29 schrieb Michel Dänzer:

Quoted 5 lines

From: Michel Dänzer <[email protected]>

Prevent buggy userspace from spamming dmesg.

Once more subject line, apart from that Reviewed-by: Christian König <[email protected]>

Quoted 35 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c +4 -4
index 93d86619e802..262c1267249e 100644
@@ -225,7 +225,7 @@ int amdgpu_queue_mgr_map(struct amdgpu_device *adev,
 
  	/* Right now all IPs have only one instance - multiple rings. */
  	if (instance != 0) {
-		DRM_ERROR("invalid ip instance: %d\n", instance);
+		DRM_DEBUG("invalid ip instance: %d\n", instance);
  		return -EINVAL;
  	}
 
@@ -255,13 +255,13 @@ int amdgpu_queue_mgr_map(struct amdgpu_device *adev,
  		ip_num_rings = adev->vcn.num_enc_rings;
  		break;
  	default:
-		DRM_ERROR("unknown ip type: %d\n", hw_ip);
+		DRM_DEBUG("unknown ip type: %d\n", hw_ip);
  		return -EINVAL;
  	}
 
  	if (ring >= ip_num_rings) {
-		DRM_ERROR("Ring index:%d exceeds maximum:%d for ip:%d\n",
-				ring, ip_num_rings, hw_ip);
+		DRM_DEBUG("Ring index:%d exceeds maximum:%d for ip:%d\n",
+			  ring, ip_num_rings, hw_ip);
  		return -EINVAL;
  	}
 

drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c int amdgpu_queue_mgr_map(struct amdgpu_device *adev, · line 298

Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_queue_mgr.c +1 -1
@@ -292,7 +292,7 @@ int amdgpu_queue_mgr_map(struct amdgpu_device *adev,
  	default:
  		*out_ring = NULL;
  		r = -EINVAL;
-		DRM_ERROR("unknown HW IP type: %d\n", mapper->hw_ip);
+		DRM_DEBUG("unknown HW IP type: %d\n", mapper->hw_ip);
  	}
 
  out_unlock:

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx