public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <deathsimple@vodafone.de>
To: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org
Cc: sumit.semwal@linaro.org
Subject: [PATCH] dma-buf: fix reservation_object_wait_timeout_rcu to wait correctly
Date: Fri, 21 Jul 2017 18:20:01 +0200	[thread overview]
Message-ID: <1500654001-20899-1-git-send-email-deathsimple@vodafone.de> (raw)

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

With hardware resets in mind it is possible that all shared fences are
signaled, but the exlusive isn't. Fix waiting for everything in this situation.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/dma-buf/reservation.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c
index e2eff86..ce3f9c1 100644
--- a/drivers/dma-buf/reservation.c
+++ b/drivers/dma-buf/reservation.c
@@ -461,7 +461,7 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj,
 		}
 	}
 
-	if (!shared_count) {
+	if (!fence) {
 		struct dma_fence *fence_excl = rcu_dereference(obj->fence_excl);
 
 		if (fence_excl &&
-- 
2.7.4

             reply	other threads:[~2017-07-21 16:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21 16:20 Christian König [this message]
2017-07-24  8:33 ` [PATCH] dma-buf: fix reservation_object_wait_timeout_rcu to wait correctly Daniel Vetter
2017-07-24  9:51   ` Christian König
2017-07-24 11:57     ` Daniel Vetter
2017-07-25  6:16       ` zhoucm1
2017-07-25  6:50         ` Daniel Vetter
2017-07-25  6:55           ` zhoucm1
2017-07-25  7:02             ` Daniel Vetter
2017-07-25  7:15               ` zhoucm1
2017-07-25  9:11       ` Christian König
2017-07-25 12:14         ` Daniel Vetter
2017-07-24  8:34 ` zhoucm1
2017-07-24  9:58   ` 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=1500654001-20899-1-git-send-email-deathsimple@vodafone.de \
    --to=deathsimple@vodafone.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-media@vger.kernel.org \
    --cc=sumit.semwal@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox