reservation: revert "wait only with non-zero timeout specified (v3)" v2

Reverts commit fb8b7d2b9d
	("reservation: wait only with non-zero timeout specified (v3)")

Otherwise signaling might never be activated on the fences. This can
result in infinite waiting with hardware which has unreliable interrupts.

v2: still return one when the timeout is zero and we don't have any fences.

Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Chunming Zhou <[email protected]> (v1)
Signed-off-by: Alex Deucher <[email protected]>
Reviewed-by: Gustavo Padovan <[email protected]>
Signed-off-by: Sumit Semwal <[email protected]>
  [sumits: fix checkpatch warnings]
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
This commit is contained in:
Christian König 2016-11-07 16:16:16 -05:00 • committed by Sumit Semwal
commit 06a66b5c77

View file

@ -370,10 +370,7 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj,
{
struct dma_fence *fence;
unsigned seq, shared_count, i = 0;
long ret = timeout;
if (!timeout)
return reservation_object_test_signaled_rcu(obj, wait_all);
long ret = timeout ? timeout : 1;
retry:
fence = NULL;