From b9a1af8a3b03a5e8575d87c3593a5931cd0e7a8c Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 6 May 2015 05:46:01 +0200 Subject: Add fields reporting consumed buffers and space to the dma_engine_status and provide better ipedma benchmarking --- dma/ipe_private.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'dma/ipe_private.h') diff --git a/dma/ipe_private.h b/dma/ipe_private.h index 82ea73a..1fb4e9e 100644 --- a/dma/ipe_private.h +++ b/dma/ipe_private.h @@ -7,12 +7,15 @@ #define IPEDMA_CORES 1 #define IPEDMA_TLP_SIZE 32 #define IPEDMA_PAGE_SIZE 4096 -#define IPEDMA_DMA_PAGES 16 /**< number of DMA pages in the ring buffer to allocate */ +#define IPEDMA_DMA_PAGES 32 /**< number of DMA pages in the ring buffer to allocate */ #define IPEDMA_DMA_PROGRESS_THRESHOLD 1 /**< how many pages the DMA engine should fill before reporting progress */ #define IPEDMA_DESCRIPTOR_SIZE 128 #define IPEDMA_DESCRIPTOR_ALIGNMENT 64 #define IPEDMA_BUG_LAST_READ /**< We should forbid writting the second last available DMA buffer (the last is forbidden by design) */ +#define IPEDMA_RESET_DELAY 100000 /**< Sleep between accessing DMA control and reset registers */ +#define IPEDMA_ADD_PAGE_DELAY 1000 /**< Delay between submitting successive DMA pages into IPEDMA_REG_PAGE_ADDR register */ +#define IPEDMA_NODATA_SLEEP 10 /**< To keep CPU free */ //#define IPEDMA_BUG_DMARD /**< No register read during DMA transfer */ //#define IPEDMA_DETECT_PACKETS /**< Using empty_deceted flag */ @@ -30,6 +33,9 @@ #define IPEDMA_REG_UPDATE_THRESHOLD 0x60 +#define WR(addr, value) { *(uint32_t*)(ctx->base_addr + addr) = value; } +#define RD(addr, value) { value = *(uint32_t*)(ctx->base_addr + addr); } + typedef struct ipe_dma_s ipe_dma_t; -- cgit v1.2.3