Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d38a8c62 authored by Dan Williams's avatar Dan Williams
Browse files

dmaengine: prepare for generic 'unmap' data



Add a hook for a common dma unmap implementation to enable removal of
the per driver custom unmap code.  (A reworked version of Bartlomiej
Zolnierkiewicz's patches to remove the custom callbacks and the size
increase of dma_async_tx_descriptor for drivers that don't care about
raid).

Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Tomasz Figa <t.figa@samsung.com>
Cc: Dave Jiang <dave.jiang@intel.com>
[bzolnier: prepare pl330 driver for adding missing unmap while at it]
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 56ea27fd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1197,6 +1197,7 @@ static void pl08x_desc_free(struct virt_dma_desc *vd)
	struct pl08x_txd *txd = to_pl08x_txd(&vd->tx);
	struct pl08x_dma_chan *plchan = to_pl08x_chan(vd->tx.chan);

	dma_descriptor_unmap(txd);
	if (!plchan->slave)
		pl08x_unmap_buffers(txd);

+1 −0
Original line number Diff line number Diff line
@@ -345,6 +345,7 @@ atc_chain_complete(struct at_dma_chan *atchan, struct at_desc *desc)
	list_move(&desc->desc_node, &atchan->free_list);

	/* unmap dma addresses (not on slave channels) */
	dma_descriptor_unmap(txd);
	if (!atchan->chan_common.private) {
		struct device *parent = chan2parent(&atchan->chan_common);
		if (!(txd->flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
+1 −0
Original line number Diff line number Diff line
@@ -311,6 +311,7 @@ dwc_descriptor_complete(struct dw_dma_chan *dwc, struct dw_desc *desc,
	list_splice_init(&desc->tx_list, &dwc->free_list);
	list_move(&desc->desc_node, &dwc->free_list);

	dma_descriptor_unmap(txd);
	if (!is_slave_direction(dwc->direction)) {
		struct device *parent = chan2parent(&dwc->chan);
		if (!(txd->flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
+1 −0
Original line number Diff line number Diff line
@@ -791,6 +791,7 @@ static void ep93xx_dma_tasklet(unsigned long data)
		 * For the memcpy channels the API requires us to unmap the
		 * buffers unless requested otherwise.
		 */
		dma_descriptor_unmap(&desc->txd);
		if (!edmac->chan.private)
			ep93xx_dma_unmap_buffers(desc);

+1 −0
Original line number Diff line number Diff line
@@ -868,6 +868,7 @@ static void fsldma_cleanup_descriptor(struct fsldma_chan *chan,
	/* Run any dependencies */
	dma_run_dependencies(txd);

	dma_descriptor_unmap(txd);
	/* Unmap the dst buffer, if requested */
	if (!(txd->flags & DMA_COMPL_SKIP_DEST_UNMAP)) {
		if (txd->flags & DMA_COMPL_DEST_UNMAP_SINGLE)
Loading