[PATCH 4/5] dma-buf/fence-chain: Let test cases decide which fence to wait on
Janusz Krzysztofik
janusz.krzysztofik at linux.intel.com
Tue Aug 12 08:56:05 UTC 2025
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 at 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 9649c1147d12b..b431acd4db04b 100644
--- a/drivers/dma-buf/st-dma-fence-chain.c
+++ b/drivers/dma-buf/st-dma-fence-chain.c
@@ -589,9 +589,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;
@@ -611,7 +611,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;
@@ -660,7 +660,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;
@@ -714,7 +714,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
More information about the Intel-gfx-trybot
mailing list