[PATCH v2] drm/amd/display: Don't print error when bo_pin is interrupted

Harry Wentland harry.wentland at amd.com
Fri Oct 27 14:27:15 UTC 2017


Hi Christian,

thanks for clarifying the semantics. I wasn't fully clear on that. What you say makes sense. I'll respin the patch.

Harry

On 2017-10-27 03:46 AM, Christian K├Ânig wrote:
> Hi Harry,
>
> actually it's best practice that you only ignore ERESTARTSYS here, see other code in the driver as well.
>
> EINTR means that the IOCTL was interrupted and can't be restarted because of some problem.
>
> EAGAIN mean the we can't do this operation right now, but might be able to do it at some point in the future.
>
> Both sound like a good idea to note to the user.
>
> Regards,
> Christian.
>
> Am 26.10.2017 um 22:16 schrieb Andrey Grodzovsky:
>>
>>
>>
>> On 2017-10-26 04:08 PM, Harry Wentland wrote:
>>> v2: Also don't print for ERESTARTSYS or EAGAIN
>>>
>>> Signed-off-by: Harry Wentland <harry.wentland at amd.com>
>>
>> Reviewed-by: Andrey Grodzovsky <andrey.grodzovsky at amd.com>
>>
>> Thanks,
>> Andrey
>>
>>> ---
>>>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
>>>  1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>>> index cf15701f208d..4401f0fb3f02 100644
>>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>>> @@ -2944,7 +2944,8 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,
>>>  	amdgpu_bo_unreserve(rbo);
>>>  
>>>  	if (unlikely(r != 0)) {
>>> -		DRM_ERROR("Failed to pin framebuffer\n");
>>> +		if (!(r == -EINTR || r == -ERESTARTSYS || r == EAGAIN))
>>> +			DRM_ERROR("Failed to pin framebuffer with error %d\n", r);
>>>  		return r;
>>>  	}
>>>  
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20171027/4d9b4a82/attachment-0001.html>


More information about the amd-gfx mailing list