diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-10-24 23:14:38 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-10-24 23:14:38 +0200 |
commit | 39125f647c27a19abf85b25c753fc97832708d38 (patch) | |
tree | 2556a8c897498802281d974909d0d36978303e0f /dma | |
parent | 95b5fb80dbe71ef58d235c26c9e73849fb07f84c (diff) | |
download | ipecamera-39125f647c27a19abf85b25c753fc97832708d38.tar.gz ipecamera-39125f647c27a19abf85b25c753fc97832708d38.tar.bz2 ipecamera-39125f647c27a19abf85b25c753fc97832708d38.tar.xz ipecamera-39125f647c27a19abf85b25c753fc97832708d38.zip |
Fix DMA synchronization for writes as well
Diffstat (limited to 'dma')
-rw-r--r-- | dma/nwl_engine.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/dma/nwl_engine.c b/dma/nwl_engine.c index 1fc147f..037ab02 100644 --- a/dma/nwl_engine.c +++ b/dma/nwl_engine.c @@ -242,7 +242,10 @@ int dma_nwl_write_fragment(pcilib_dma_context_t *vctx, pcilib_dma_engine_t dma, } void *buf = pcilib_kmem_get_block_ua(ctx->pcilib, info->pages, bufnum); + + pcilib_kmem_sync_block(ctx->pcilib, info->pages, PCILIB_KMEM_SYNC_FROMDEVICE, bufnum); memcpy(buf, data, block_size); + pcilib_kmem_sync_block(ctx->pcilib, info->pages, PCILIB_KMEM_SYNC_TODEVICE, bufnum); err = dma_nwl_push_buffer(ctx, info, block_size, (flags&PCILIB_DMA_FLAG_EOP)&&((pos + block_size) == size), timeout); if (err) { |