[PATCH v3 1/2] dmaengine: virt-dma: share the DMAengine synchronization callback

Amelie Delaunay amelie.delaunay at foss.st.com
Wed Oct 28 08:18:42 PDT 2026


On 10/27/26 19:22, James Hilliard wrote:
> Several virt-dma drivers implement device_synchronize with a wrapper that
> only converts the DMA channel and calls vchan_synchronize(). Provide
> vchan_dma_synchronize() with the DMAengine callback signature so these
> drivers can assign it directly.
> 
> Document the requirement to stop the channel and prevent new callbacks
> before synchronization, and the context in which the callback wait may
> run. Replace the equivalent wrappers in the existing drivers with the
> shared helper, preserving their callback-wait and descriptor-cleanup
> behavior.
> 
> Suggested-by: Frank Li<Frank.li at oss.nxp.com>
> Signed-off-by: James Hilliard<james.hilliard1 at gmail.com>
> ---
>   drivers/dma/stm32/stm32-dma.c                  |  9 +--------
>   drivers/dma/stm32/stm32-dma3.c                 |  9 +--------
>   drivers/dma/stm32/stm32-mdma.c                 |  9 +--------
>   drivers/dma/virt-dma.h                         | 15 +++++++++++++++

Reviewed-by: Amelie Delaunay <amelie.delaunay at foss.st.com> # stm32, virt-dma

Regards,
Amelie



More information about the Linux-mediatek mailing list