Small correction on the dma_buf attach/detach functions: They're just used to reconfigure the pipeline - the exporter is allowed to delay the allocation up to map time and needs to because only by then all devices will be attached. Similarly it's map/unmap that should enforce cache coherency and synchronization and not attach/detach. We'll likely add an extension to allow streaming dma with persistent device mappings.
Also note that map/unmap doesn't synchronize hw access in the sense of gl sync objects. Imo that's an orthogonal issue to buffer sharing and dma buffer allocation. But something we might need to support in the kernel, too, because some SoC have hw-based semaphores and mailboxes to sync up different blocks without the cpu being woken up.
Posted Feb 22, 2012 1:42 UTC (Wed) by zengtm (subscriber, #74989)
[Link]
In the article it does say that map/unmap is the place to handle cache coherency and buffer synchronization. Did I have wording to indicate attach/detach is for synchronization?
And I agree that the persistent device mappings seem to be the more common smart phone use cases.