[PATCH] amdgpu: Don't use DRM_ERROR when failing to allocate a BO

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 14.11.2017 um 18:54 schrieb Deucher, Alexander:
>> -----Original Message-----
>> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
>> Of Michel Dänzer
>> Sent: Tuesday, November 14, 2017 12:52 PM
>> To: amd-gfx at lists.freedesktop.org
>> Subject: [PATCH] amdgpu: Don't use DRM_ERROR when failing to allocate a
>> BO
>>
>> From: Michel Dänzer <michel.daenzer at amd.com>
>>
>> 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 <michel.daenzer at amd.com>
> Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

Reviewed-by: Christian König <christian.koenig at amd.com>

>
>> ---
>>   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(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> index 951d625bbdd7..04ddd782bf6d 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c
>> @@ -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;
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> index 5acf20cfb1d0..3233d5988f66 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
>> @@ -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;
>>   }
>>
>> --
>> 2.15.0
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux