JFYI - After talking a bit to the Asahi folks, it seems like that we're actually a ways off from Asahi having any actual usecase for the export() callback - so I'm going to just drop the dma_buf bits here for the next version of the patch series
On Mon, 2025-09-15 at 10:59 +0200, Christian König wrote:
Well exporting the buffers is trivial, but that is not really useful on its own.
So when you exported a DMA-buf you should potentially also use it in some way, e.g. command submission, rendering, scanout etc...
How do you do this without grabbing the lock on the buffer?
The usually semantics for a command submission is for example:
- Lock all involved buffers.
- Make sure prerequisites are meet.
- Allocate a slot for a dma_fence on the dma_resv object.
- Push the work to the HW.
- Remember the work in the dma_fence slot on the dma_resv object of your DMA-buf.
- Unlock all involved buffers.
Regards, Christian.