Commit a4b306e
dmaengine: stm32-mdma: use Link Address Register to compute residue
Current implementation relies on curr_hwdesc index. But to keep this index
up to date, Block Transfer interrupt (BTIE) has to be enabled.
If it is not, curr_hwdesc is not updated, and then residue is not reliable.
Rely on Link Address Register instead. And disable BTIE interrupt
in stm32_mdma_setup_xfer() because it is no more needed in case of
_prep_slave_sg() to maintain curr_hwdesc up to date.
It avoids extra interrupts and also ensures a reliable residue. These
improvements are required for STM32 DCMI camera capture use case, which
need STM32 DMA and MDMA chaining for good performance.
Fixes: 6968743 ("dmaengine: stm32-mdma: add support to be triggered by STM32 DMA")
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20231004163531.2864160-2-amelie.delaunay@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>1 parent 81337b9 commit a4b306e
1 file changed
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
780 | | - | |
781 | | - | |
782 | 780 | | |
783 | 781 | | |
784 | 782 | | |
| |||
1324 | 1322 | | |
1325 | 1323 | | |
1326 | 1324 | | |
1327 | | - | |
| 1325 | + | |
1328 | 1326 | | |
1329 | 1327 | | |
| 1328 | + | |
| 1329 | + | |
1330 | 1330 | | |
1331 | | - | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
1332 | 1334 | | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
1333 | 1340 | | |
1334 | 1341 | | |
1335 | 1342 | | |
| |||
0 commit comments