From: "Christian König" <christian.koenig@amd.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org, linux-media@vger.kernel.org,
linaro-mm-sig@lists.linaro.org,
Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 2/2] dma-buf: Fix dma_resv_test_signaled.
Date: Fri, 15 Oct 2021 14:07:32 +0200 [thread overview]
Message-ID: <ebf0714c-2f49-a0ad-1861-16394ade468d@amd.com> (raw)
In-Reply-To: <20211015115720.79958-3-maarten.lankhorst@linux.intel.com>
Am 15.10.21 um 13:57 schrieb Maarten Lankhorst:
> Commit 7fa828cb9265 ("dma-buf: use new iterator in dma_resv_test_signaled")
> accidentally forgot to test whether the dma-buf is actually signaled, breaking
> pretty much everything depending on it.
NAK, the dma_resv_for_each_fence_unlocked() returns only unsignaled
fences. So the code is correct as it is.
Regards,
Christian.
>
> Fixes: 7fa828cb9265 ("dma-buf: use new iterator in dma_resv_test_signaled")
> Cc: Christian König <christian.koenig@amd.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> drivers/dma-buf/dma-resv.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/dma-buf/dma-resv.c b/drivers/dma-buf/dma-resv.c
> index 70a8082660c5..37ab2875e469 100644
> --- a/drivers/dma-buf/dma-resv.c
> +++ b/drivers/dma-buf/dma-resv.c
> @@ -655,14 +655,16 @@ bool dma_resv_test_signaled(struct dma_resv *obj, bool test_all)
> {
> struct dma_resv_iter cursor;
> struct dma_fence *fence;
> + bool ret = true;
>
> dma_resv_iter_begin(&cursor, obj, test_all);
> dma_resv_for_each_fence_unlocked(&cursor, fence) {
> - dma_resv_iter_end(&cursor);
> - return false;
> + ret = dma_fence_is_signaled(fence);
> + if (!ret)
> + break;
> }
> dma_resv_iter_end(&cursor);
> - return true;
> + return ret;
> }
> EXPORT_SYMBOL_GPL(dma_resv_test_signaled);
>
next prev parent reply other threads:[~2021-10-15 12:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-15 11:57 [PATCH 0/2] dma-buf: Fix breakages from dma_resv_iter conversion Maarten Lankhorst
2021-10-15 11:57 ` [PATCH 1/2] dma-buf: Fix dma_resv_wait_timeout handling of timeout = 0 Maarten Lankhorst
2021-10-18 11:20 ` [Linaro-mm-sig] " Christian König
2021-10-15 11:57 ` [PATCH 2/2] dma-buf: Fix dma_resv_test_signaled Maarten Lankhorst
2021-10-15 12:07 ` Christian König [this message]
2021-10-15 12:52 ` Maarten Lankhorst
2021-10-15 12:56 ` [Linaro-mm-sig] " Christian König
2021-10-21 12:08 ` Daniel Vetter
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=ebf0714c-2f49-a0ad-1861-16394ade468d@amd.com \
--to=christian.koenig@amd.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-media@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
/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