From: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
To: "Christian König" <christian.koenig@amd.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>,
Gustavo Padovan <gustavo@padovan.org>,
Chris Wilson <chris.p.wilson@linux.intel.com>,
linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
Subject: [PATCH 2/4] dma-buf/fence-chain: Let test cases decide which fence to wait on
Date: Thu, 14 Aug 2025 10:16:13 +0200 [thread overview]
Message-ID: <20250814094824.217142-8-janusz.krzysztofik@linux.intel.com> (raw)
In-Reply-To: <20250814094824.217142-6-janusz.krzysztofik@linux.intel.com>
Test cases that create threads around __wait_fence_chains() function now
pass info about the whole chain to those threads as an argument, with no
hint on which fence of the chain to wait on. That decision is hard coded
into the __wait_fence_chains() function which always selects the tail of
the chain.
Since future test cases may decide to spawn threads that wait on arbitrary
links of the chain, pass a single fence as the thread argument instead.
Signed-off-by: Janusz Krzysztofik <janusz.krzysztofik@linux.intel.com>
---
drivers/dma-buf/st-dma-fence-chain.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/dma-buf/st-dma-fence-chain.c b/drivers/dma-buf/st-dma-fence-chain.c
index 80598da9237af..bff4192420d8b 100644
--- a/drivers/dma-buf/st-dma-fence-chain.c
+++ b/drivers/dma-buf/st-dma-fence-chain.c
@@ -560,9 +560,9 @@ static int signal_backward(void *arg)
static int __wait_fence_chains(void *arg)
{
- struct fence_chains *fc = arg;
+ struct dma_fence *f = arg;
- if (dma_fence_wait(fc->tail, false))
+ if (dma_fence_wait(f, false))
return -EIO;
return 0;
@@ -580,7 +580,7 @@ static int wait_forward(void *arg)
if (err)
return err;
- tsk = kthread_run(__wait_fence_chains, &fc, "dmabuf/wait");
+ tsk = kthread_run(__wait_fence_chains, fc.tail, "dmabuf/wait");
if (IS_ERR(tsk)) {
err = PTR_ERR(tsk);
goto err;
@@ -614,7 +614,7 @@ static int wait_backward(void *arg)
if (err)
return err;
- tsk = kthread_run(__wait_fence_chains, &fc, "dmabuf/wait");
+ tsk = kthread_run(__wait_fence_chains, fc.tail, "dmabuf/wait");
if (IS_ERR(tsk)) {
err = PTR_ERR(tsk);
goto err;
@@ -666,7 +666,7 @@ static int wait_random(void *arg)
randomise_fences(&fc);
- tsk = kthread_run(__wait_fence_chains, &fc, "dmabuf/wait");
+ tsk = kthread_run(__wait_fence_chains, fc.tail, "dmabuf/wait");
if (IS_ERR(tsk)) {
err = PTR_ERR(tsk);
goto err;
--
2.50.1
next prev parent reply other threads:[~2025-08-14 9:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-14 8:16 [PATCH 0/4] dma-buf/fence-chain: Speed up processing of rearmed callbacks Janusz Krzysztofik
2025-08-14 8:16 ` [PATCH 1/4] dma-buf/fence-chain: Report time spent in wait_* test cases Janusz Krzysztofik
2025-08-14 8:16 ` Janusz Krzysztofik [this message]
2025-08-14 8:16 ` [PATCH 3/4] dma-buf/fence-chain: Wait on each tested chain link Janusz Krzysztofik
2025-08-14 8:16 ` [PATCH 4/4] dma-buf/fence-chain: Speed up processing of rearmed callbacks Janusz Krzysztofik
2025-08-14 12:24 ` Christian König
2025-08-18 14:30 ` Janusz Krzysztofik
2025-08-18 14:42 ` Christian König
2025-08-19 9:04 ` Janusz Krzysztofik
2025-08-19 9:15 ` 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=20250814094824.217142-8-janusz.krzysztofik@linux.intel.com \
--to=janusz.krzysztofik@linux.intel.com \
--cc=chris.p.wilson@linux.intel.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gustavo@padovan.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®