dw_dmac: fix a regression in dwc_prep_dma_memcpy
Sometimes memory-to-memory test is failed, that's why we need to choose minimum data portion between source and destination limits together. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
This commit is contained in:
parent
fed2574b3c
commit
3d4f860583
@ -716,6 +716,7 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
|
|||||||
size_t offset;
|
size_t offset;
|
||||||
unsigned int src_width;
|
unsigned int src_width;
|
||||||
unsigned int dst_width;
|
unsigned int dst_width;
|
||||||
|
unsigned int data_width;
|
||||||
u32 ctllo;
|
u32 ctllo;
|
||||||
|
|
||||||
dev_vdbg(chan2dev(chan),
|
dev_vdbg(chan2dev(chan),
|
||||||
@ -728,11 +729,11 @@ dwc_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
src_width = min_t(unsigned int, dwc->dw->data_width[dwc_get_sms(dws)],
|
data_width = min_t(unsigned int, dwc->dw->data_width[dwc_get_sms(dws)],
|
||||||
dwc_fast_fls(src | len));
|
dwc->dw->data_width[dwc_get_dms(dws)]);
|
||||||
|
|
||||||
dst_width = min_t(unsigned int, dwc->dw->data_width[dwc_get_dms(dws)],
|
src_width = dst_width = min_t(unsigned int, data_width,
|
||||||
dwc_fast_fls(dest | len));
|
dwc_fast_fls(src | dest | len));
|
||||||
|
|
||||||
ctllo = DWC_DEFAULT_CTLLO(chan)
|
ctllo = DWC_DEFAULT_CTLLO(chan)
|
||||||
| DWC_CTLL_DST_WIDTH(dst_width)
|
| DWC_CTLL_DST_WIDTH(dst_width)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user