amdgpu: Don't use DRM_ERROR when failing to allocate a BO
Subsystems (2)
PATCH 1/1 amdgpu: Don't use DRM_ERROR when failing to allocate a BO
From: Michel Dänzer <[email protected]>
This can be triggered by userspace, e.g. trying to allocate too large a BO, so it shouldn't log anything by default.
Callers need to handle failure anyway.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +1 -1
@@ -72,7 +72,7 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size, initial_domain |=AMDGPU_GEM_DOMAIN_GTT ; goto retry; } -DRM_ERROR ("Failed to allocate GEM object (%ld, %d, %u, %d)\n" , +DRM_DEBUG ("Failed to allocate GEM object (%ld, %d, %u, %d)\n" , size, initial_domain, alignment, r); }return r;
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 -2
@@ -314,8 +314,8 @@ static bool amdgpu_bo_validate_size(struct amdgpu_device *adev,return true; fail: -DRM_ERROR ("BO size %lu > total memory in domain: %llu\n" , size, - man->size <<PAGE_SHIFT ); +DRM_DEBUG ("BO size %lu > total memory in domain: %llu\n" , size, + man->size <<PAGE_SHIFT );return false; }
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): 20171114175214.2342-1-michel-otUistvHUpPR7s880joybQ@public.gmane.org
Deucher, Alexander
Reviewed-by Alex DeucherQuoted 8 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Tuesday, November 14, 2017 12:52 PM
To: [email protected]
Subject: [PATCH] amdgpu: Don't useDRM_ERRORwhen failing to allocate a BO
Quoted 8 lines
From: Michel Dänzer <[email protected]>
This can be triggered by userspace, e.g. trying to allocate too large a BO, so it shouldn't log anything by default.
Callers need to handle failure anyway.
Signed-off-by Michel Dänzer <[email protected]>
Quoted 43 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +1
-1@@ -72,7 +72,7 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size, initial_domain |=AMDGPU_GEM_DOMAIN_GTT ; goto retry; } - DRM_ERROR("Failed to allocate GEM object (%ld, %d, %u, %d)\n", + DRM_DEBUG("Failed to allocate GEM object (%ld,%d, %u, %d)\n",
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +0
-0size, initial_domain, alignment, r); }return r;drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2
-3@@ -314,8 +314,8 @@ static bool amdgpu_bo_validate_size(structamdgpu_device *adev, return true; fail: -DRM_ERROR ("BO size %lu > total memory in domain: %llu\n" , size, - man->size <<PAGE_SHIFT ); +DRM_DEBUG ("BO size %lu > total memory in domain: %llu\n" , size, + man->size <<PAGE_SHIFT );return false; } --2.15.0
Quoted 4 lines
_______________________________________________
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
A message that is not in the archive (sent off-list or not yet received): BN6PR12MB1652264B02251DCC0278385EF7280-/b2+HYfkarQqUD6E6FAiowdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org
Christian König
Reviewed-byAm 14.11.2017 um 18:54 schrieb Deucher, Alexander:
Quoted 10 lines
Quoted 10 lines
-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Michel Dänzer
Sent: Tuesday, November 14, 2017 12:52 PM
To: [email protected]
Subject: [PATCH] amdgpu: Don't useDRM_ERRORwhen failing to allocate a BOFrom: Michel Dänzer <[email protected]>
Quoted 7 lines
Quoted 6 lines
This can be triggered by userspace, e.g. trying to allocate too large a BO, so it shouldn't log anything by default.
Callers need to handle failure anyway.
Signed-off-by Michel Dänzer <[email protected]>Reviewed-by Alex Deucher <[email protected]>
Quoted 44 lines
Quoted 44 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +1
-1@@ -72,7 +72,7 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size, initial_domain |=AMDGPU_GEM_DOMAIN_GTT ; goto retry; } - DRM_ERROR("Failed to allocate GEM object (%ld, %d, %u, %d)\n", + DRM_DEBUG("Failed to allocate GEM object (%ld,%d, %u, %d)\n",
size,initial_domain, alignment, r);
}
return r;drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2
-3@@ -314,8 +314,8 @@ static bool amdgpu_bo_validate_size(structamdgpu_device *adev, return true; fail: -DRM_ERROR ("BO size %lu > total memory in domain: %llu\n" , size, - man->size <<PAGE_SHIFT ); +DRM_DEBUG ("BO size %lu > total memory in domain: %llu\n" , size, + man->size <<PAGE_SHIFT );return false; } --2.15.0
Quoted 8 lines
Quoted 4 lines
_______________________________________________
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
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx