[PATCH] reservation: wait only with non-zero timeout specified (v3)
Zhou, Jammy
Jammy.Zhou at amd.com
Tue Jan 13 01:19:19 PST 2015
> but where do you need this?
With the new upcoming amdgpu driver, we would like to use 'timeout==0' to check if the fences are signaled or not (without waiting).
Besides, the jiffies accuracy is not enough for UMDs if the specified timeout is nsecs or usecs, and then nsecs_to_jiffies/usecs_to_jiffies may return zero. So the 'timeout==0' case is easy to be hit for reservation_object_wait_timeout_rcu.
Regards,
Jammy
-----Original Message-----
From: Maarten Lankhorst [mailto:maarten.lankhorst at canonical.com]
Sent: Tuesday, January 13, 2015 5:04 PM
To: Zhou, Jammy; dri-devel at lists.freedesktop.org
Cc: Deucher, Alexander; Koenig, Christian
Subject: Re: [PATCH] reservation: wait only with non-zero timeout specified (v3)
Op 13-01-15 om 10:36 schreef Jammy Zhou:
> When the timeout value passed to reservation_object_wait_timeout_rcu
> is zero, no wait should be done if the fences are not signaled.
>
> Return '1' for idle and '0' for busy if the specified timeout is '0'
> to keep consistent with the case of non-zero timeout.
>
> v2: call fence_put if not signaled in the case of timeout==0
>
>
Looks more sane, but where do you need this?
~Maarten
More information about the dri-devel
mailing list