Commit d1cab34c authored by Bartlomiej Zolnierkiewicz's avatar Bartlomiej Zolnierkiewicz Committed by Dan Williams

dmatest: make driver unmap also source buffers by itself

Make the driver DMA unmap also source buffers by itself
(currently it DMA unmaps only destination buffers) as
a preparation for introducing generic 'ummap' data.

Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Tomasz Figa <t.figa@samsung.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Acked-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent 31d141e3
...@@ -597,11 +597,10 @@ static int dmatest_func(void *data) ...@@ -597,11 +597,10 @@ static int dmatest_func(void *data)
set_user_nice(current, 10); set_user_nice(current, 10);
/* /*
* src buffers are freed by the DMAEngine code with dma_unmap_single() * src and dst buffers are freed by ourselves below
* dst buffers are freed by ourselves below
*/ */
flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT flags = DMA_CTRL_ACK | DMA_PREP_INTERRUPT |
| DMA_COMPL_SKIP_DEST_UNMAP | DMA_COMPL_SRC_UNMAP_SINGLE; DMA_COMPL_SKIP_SRC_UNMAP | DMA_COMPL_SKIP_DEST_UNMAP;
while (!kthread_should_stop() while (!kthread_should_stop()
&& !(params->iterations && total_tests >= params->iterations)) { && !(params->iterations && total_tests >= params->iterations)) {
...@@ -750,7 +749,8 @@ static int dmatest_func(void *data) ...@@ -750,7 +749,8 @@ static int dmatest_func(void *data)
continue; continue;
} }
/* Unmap by myself (see DMA_COMPL_SKIP_DEST_UNMAP above) */ /* Unmap by myself */
unmap_src(dev->dev, dma_srcs, len, src_cnt);
unmap_dst(dev->dev, dma_dsts, params->buf_size, dst_cnt); unmap_dst(dev->dev, dma_dsts, params->buf_size, dst_cnt);
error_count = 0; error_count = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment