All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 5/5] reservation: revert "wait only with non-zero timeout specified (v3)" v2
Date: Thu, 20 Oct 2016 15:20:15 +0200	[thread overview]
Message-ID: <1476969615-4421-5-git-send-email-deathsimple@vodafone.de> (raw)
In-Reply-To: <1476969615-4421-1-git-send-email-deathsimple@vodafone.de>

From: Christian König <christian.koenig@amd.com>

This reverts commit fb8b7d2b9d80e1e71f379e57355936bd2b024be9.

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.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com> (v1)
---
 drivers/dma-buf/reservation.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c
index 9566a62..debb91d 100644
--- a/drivers/dma-buf/reservation.c
+++ b/drivers/dma-buf/reservation.c
@@ -379,10 +379,7 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj,
 {
 	struct 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;
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-10-20 13:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-20 13:20 [PATCH 1/5] Revert "drm/amd/dal: Fix underlay pipe and pipe count for Stoney" Christian König
2016-10-20 13:20 ` [PATCH 2/5] dma-buf/fence: make timeout handling in fence_default_wait consistent Christian König
2016-10-20 19:57   ` Alex Deucher
2016-11-07  0:59   ` Gustavo Padovan
2016-10-20 13:20 ` [PATCH 3/5] dma-buf/fence: revert "don't wait when specified timeout is zero" Christian König
2016-11-07  1:01   ` Gustavo Padovan
2016-10-20 13:20 ` [PATCH 4/5] drm/ttm: fix ttm_bo_wait Christian König
2016-11-07  1:07   ` Gustavo Padovan
2016-10-20 13:20 ` Christian König [this message]
2016-11-07  1:07   ` [PATCH 5/5] reservation: revert "wait only with non-zero timeout specified (v3)" v2 Gustavo Padovan
2016-11-07 17:55     ` Alex Deucher
2016-11-08  9:27       ` Daniel Vetter
2016-10-20 13:25 ` [PATCH 1/5] Revert "drm/amd/dal: Fix underlay pipe and pipe count for Stoney" Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1476969615-4421-5-git-send-email-deathsimple@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.