From: zhoucm1 <david1.zhou@amd.com>
To: "Christian König" <deathsimple@vodafone.de>,
linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
linaro-mm-sig@lists.linaro.org
Subject: Re: [PATCH] dma-buf: fix reservation_object_wait_timeout_rcu to wait correctly
Date: Mon, 24 Jul 2017 16:34:05 +0800 [thread overview]
Message-ID: <5975B0FD.5070908@amd.com> (raw)
In-Reply-To: <1500654001-20899-1-git-send-email-deathsimple@vodafone.de>
On 2017年07月22日 00:20, Christian König wrote:
> 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) {
previous code seems be a bug, the exclusive fence isn't be waited at all
if shared_count != 0.
With your fix, there still is a case the exclusive fence could be
skipped, that when fobj->shared[shared_count-1] isn't signalled.
Regards,
David Zhou
> struct dma_fence *fence_excl = rcu_dereference(obj->fence_excl);
>
> if (fence_excl &&
next prev parent reply other threads:[~2017-07-24 8:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-21 16:20 [PATCH] dma-buf: fix reservation_object_wait_timeout_rcu to wait correctly Christian König
2017-07-24 8:33 ` 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 [this message]
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=5975B0FD.5070908@amd.com \
--to=david1.zhou@amd.com \
--cc=deathsimple@vodafone.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.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