diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-12-12 05:45:35 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-12-12 05:45:35 +0100 |
commit | 2e4e8a00b27182a155cb10f0a00e44977bfcd5cf (patch) | |
tree | 86afd1b7ceb834dbb3cedf8d55c3ac0734947333 /dma/nwl_loopback.c | |
parent | 7a4cfb9e546c496792d3fe0c61c822c66ad0128f (diff) | |
download | pcitool-2e4e8a00b27182a155cb10f0a00e44977bfcd5cf.tar.gz pcitool-2e4e8a00b27182a155cb10f0a00e44977bfcd5cf.tar.bz2 pcitool-2e4e8a00b27182a155cb10f0a00e44977bfcd5cf.tar.xz pcitool-2e4e8a00b27182a155cb10f0a00e44977bfcd5cf.zip |
multithread preprocessing of ipecamera frames and code reorganization
Diffstat (limited to 'dma/nwl_loopback.c')
-rw-r--r-- | dma/nwl_loopback.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/dma/nwl_loopback.c b/dma/nwl_loopback.c index 11f7f34..ce0844f 100644 --- a/dma/nwl_loopback.c +++ b/dma/nwl_loopback.c @@ -66,13 +66,10 @@ int dma_nwl_stop_loopback(nwl_dma_t *ctx) { double dma_nwl_benchmark(pcilib_dma_context_t *vctx, pcilib_dma_engine_addr_t dma, uintptr_t addr, size_t size, size_t iterations, pcilib_dma_direction_t direction) { int iter, i; - int res; int err; size_t bytes, rbytes; - uint32_t val; uint32_t *buf, *cmp; const char *error = NULL; - pcilib_register_value_t regval; size_t packet_size, blocks; size_t us = 0; @@ -83,9 +80,6 @@ double dma_nwl_benchmark(pcilib_dma_context_t *vctx, pcilib_dma_engine_addr_t dm pcilib_dma_engine_t readid = pcilib_find_dma_by_addr(ctx->pcilib, PCILIB_DMA_FROM_DEVICE, dma); pcilib_dma_engine_t writeid = pcilib_find_dma_by_addr(ctx->pcilib, PCILIB_DMA_TO_DEVICE, dma); - char *read_base = ctx->engines[readid].base_addr; - char *write_base = ctx->engines[writeid].base_addr; - if (size%sizeof(uint32_t)) size = 1 + size / sizeof(uint32_t); else size /= sizeof(uint32_t); @@ -214,8 +208,7 @@ double dma_nwl_benchmark(pcilib_dma_context_t *vctx, pcilib_dma_engine_addr_t dm #ifndef NWL_BUG_EXTRA_DATA if (direction == PCILIB_DMA_BIDIRECTIONAL) { - res = memcmp(buf, cmp, size * sizeof(uint32_t)); - if (res) { + if (memcmp(buf, cmp, size * sizeof(uint32_t))) { for (i = 0; i < size; i++) if (buf[i] != cmp[i]) break; |