[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7eee4274-bd69-df8d-9067-771366217804@amd.com>
Date: Mon, 30 May 2022 16:55:41 +0200
From: Christian König <christian.koenig@....com>
To: Sergey Senozhatsky <senozhatsky@...omium.org>,
Sumit Semwal <sumit.semwal@...aro.org>,
Gustavo Padovan <gustavo@...ovan.org>
Cc: Tomasz Figa <tfiga@...omium.org>,
Ricardo Ribalda <ribalda@...omium.org>,
Christoph Hellwig <hch@...radead.org>,
linux-media@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linaro-mm-sig@...ts.linaro.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] dma-fence: allow dma fence to have their own lock
Hi Sergey,
I'm removing most of the mail because you have a very fundamental
misunderstanding about what this dma_fence lock is all about.
Am 30.05.22 um 16:22 schrieb Sergey Senozhatsky:
> [SNIP]
> So the `lock` should have at least same lifespan as the DMA fence
> that borrows it, which is impossible to guarantee in our case.
Nope, that's not correct. The lock should have at least same lifespan as
the context of the DMA fence.
The idea here is that DMA fence signaling and callback calling
serializes. E.g. when you have fence a,b,c,d... they must signal in the
order a,b,c,d... and that's what this lock is good for.
If you just want to create a single dma_fence which is also only bound
to a single context you can embed the lock into the fence without much
problem.
See how the dma_fence_array does that for example:
https://elixir.bootlin.com/linux/latest/source/include/linux/dma-fence-array.h#L37
Regards,
Christian.
Powered by blists - more mailing lists