PDK API Guide for J721E
dmautils_autoincrement_3d.h File Reference

Introduction

This file contains the data types and util function prototype for configuring DMA Utility autoincrement 3D usecase.

Typical sequence of operation : DmaUtilsAutoInc3d_getContextSize(numChannels) : Request memory required based on the number of channels required for a usecase DmaUtilsAutoInc3d_init : To allocate hardware resources required for for a usecase ( Need to be called only once per frame DmaUtilsAutoInc3d_getTrMemReq : Request memory required to prepare TR/TR descriptor based on the number of transfer records that needs to be submitted on a particular channel DmaUtilsAutoInc3d_prepareTr : Populate the tr based on the actual transfer property. This can be computed upfront to avoid cycles consumed to prepare it DmaUtilsAutoInc3d_configure : Configure a a particular channel by submitting the TR memory prepared earlier. This can be called multiple times within a frame DmaUtilsAutoInc3d_trigger : Trigger a particular channel DmaUtilsAutoInc3d_wait : wait for transfer completion of particular channel

Trigger and wait can be called multiple times till we finish requrested number of transfers

DmaUtilsAutoInc3d_deconfigure : DmaUtilsAutoInc3d_deint :

Requirement: DOX_REQ_TAG(PDK-2644), DOX_REQ_TAG(PDK-2643), DOX_REQ_TAG(PDK-2642), DOX_REQ_TAG(PDK-2645), DOX_REQ_TAG(PDK-2646), DOX_REQ_TAG(PDK-2650), DOX_REQ_TAG(PDK-2652), DOX_REQ_TAG(PDK-3241)

Go to the source code of this file.

Data Structures

struct  DmaUtilsAutoInc3d_TransferDim
 This structure specifies the properties of the transfer for auto increment usecase. More...
 
struct  DmaUtilsAutoInc3d_TransferCirc
 This structure specifies the circular properties for each level of the transfer count. User can specify 2 different sizes for each level. More...
 
struct  DmaUtilsAutoInc3d_IOPointers
 This structure specifies the input and output pointers for the transfer. More...
 
struct  DmaUtilsAutoInc3d_TransferProp
 This structure specifies the properties of the transfer for auto increment usecase. More...
 
struct  DmaUtilsAutoInc3d_ChannelInitParam
 This structure specifies the parameter to initialize auto increment related properties. More...
 
struct  DmaUtilsAutoInc3d_InitParam
 
struct  DmaUtilsAutoInc3d_TrPrepareParam
 

Macros

#define DMAUTILS_MAX_NUM_TR_DIRECT_TR_MODE   (1U)
 Number of TR's that can be submitted back to back channel. More...
 

Enumerations

enum  DmaUtilsAutoInc3d_SyncType { DMAUTILSAUTOINC3D_SYNC_1D = 0, DMAUTILSAUTOINC3D_SYNC_2D = 1, DMAUTILSAUTOINC3D_SYNC_3D = 2, DMAUTILSAUTOINC3D_SYNC_4D = 3 }
 Describes the boundary at which the DMA is suppose to get synced. More...
 
enum  DmaUtilsAutoInc3d_AddrType { DMAUTILSAUTOINC3D_ADDR_LINEAR = 0, DMAUTILSAUTOINC3D_ADDR_CIRC1 = 1, DMAUTILSAUTOINC3D_ADDR_CIRC2 = 2 }
 Describes the boundary at which the DMA is suppose to get synced. More...
 
enum  DmaUtilsAutoInc3d_CircDirType { DMAUTILSAUTOINC3D_CIRCDIR_SRC = 0, DMAUTILSAUTOINC3D_CIRCDIR_DST = 1 }
 Describes the direction in which circular addressing is applied. More...
 
enum  DmaUtilsAutoInc3d_druOwner { DMAUTILSAUTOINC3D_DRUOWNER_DIRECT_TR = 0, DMAUTILSAUTOINC3D_DRUOWNER_UDMA = 1 }
 
enum  DmaUtilsAutoInc3d_addrConvertMask { DMAUTILSAUTOINC3D_ADDRCONVERTMASK_SRCADDR = (uint32_t)1U << 0, DMAUTILSAUTOINC3D_ADDRCONVERTMASK_DSTADDR = (uint32_t)1U << 1 }
 Describes the addresses that needs to be converted while using DmaUtilsAutoInc3d_convertToPhysicalAddr update API.User can create a mask with more than one fields of this enumby "OR"ing these fields to update more than one parameters. e.g. if user wants to convert both src and destination addresses then they can create this mask as follows : mask = DMAUTILSAUTOINC3D_ADDRCONVERTMASK_SRCADDR | DMAUTILSAUTOINC3D_ADDRCONVERTMASK_DSTADDR. More...
 

Functions

int32_t DmaUtilsAutoInc3d_getContextSize (int32_t numChannels)
 Returns the size of dmautils context. More...
 
int32_t DmaUtilsAutoInc3d_init (void *autoIncrementContext, DmaUtilsAutoInc3d_InitParam *initParams, DmaUtilsAutoInc3d_ChannelInitParam chInitParams[])
 This function initializes the DMA UTILS context for autoincrement usecase. More...
 
int32_t DmaUtilsAutoInc3d_getTrMemReq (int32_t numTRs)
 This function returns the size of the TR descriptor required for the transfer configuration given by the user. More...
 
int32_t DmaUtilsAutoInc3d_prepareTr (DmaUtilsAutoInc3d_TrPrepareParam *trPrepParam, DmaUtilsAutoInc3d_TransferProp transferProp[])
 This function will prepare a TR/ TR descriptor depending on the number of Tr's to be submitted on a particular channel. Note this function will use the addresses as given by the user without any conversion. If user wants to convert addresses from virtual to physical address they should use DmaUtilsAutoInc3d_convertTrVirtToPhyAddr API. Other way to do the same is to call DmaUtilsAutoInc3d_convertToPhysicalAddr to explicitly convert the address in TR to physical address. More...
 
int32_t DmaUtilsAutoInc3d_prepareTrWithPhysicalAddress (void *autoIncrementContext, DmaUtilsAutoInc3d_TrPrepareParam *trPrepParam, DmaUtilsAutoInc3d_TransferProp transferProp[])
 This function will prepare a TR/ TR descriptor depending on the number of Tr's to be submitted on a particular channel. The only difference between this function and DmaUtilsAutoInc3d_prepareTr function is that this function will call UDMA driver's Udma_VirtToPhyFxn function if its not NULL to convert virtual address to physical address. Note that this function will convert the virtual addresses given to physical addresses if UDMA driver Udma_VirtToPhyFxn function is not NULL using the same function. If user is preparing TR without using this API then it is user's responsibity to provide the physical addresses or call DmaUtilsAutoInc3d_convertToPhysicalAddr API to covert the addresses given in TR to physical addresses. More...
 
int32_t DmaUtilsAutoInc3d_convertTrVirtToPhyAddr (void *autoIncrementContext, DmaUtilsAutoInc3d_TrPrepareParam *trPrepParam, uint32_t convertMask)
 This function should be called whenever provides TR with virtual addresses of src and dst pointer. This function will convert the virtual addresses given to physical addresses using UDMA driver initialized function Udma_VirtToPhyFxn. If UDMA driver Udma_VirtToPhyFxn function is NULL then this API results into no change. More...
 
int32_t DmaUtilsAutoInc3d_configure (void *autoIncrementContext, int32_t channelId, uint8_t *trMem, int32_t numTr)
 This function configures autoincrement for a particular channel. More...
 
int32_t DmaUtilsAutoInc3d_trigger (void *autoIncrementContext, int32_t channelId)
 This function triggers transfer on a particular channel. More...
 
void DmaUtilsAutoInc3d_wait (void *autoIncrementContext, int32_t channelId)
 This function waits for completion transfer on a particular channel. More...
 
int32_t DmaUtilsAutoInc3d_deconfigure (void *autoIncrementContext, int32_t channelId, uint8_t *trMem, int32_t numTr)
 This function deconfigures autoincrement for a particular channel. More...
 
int32_t DmaUtilsAutoInc3d_deinit (void *autoIncrementContext)
 This function deinit autoincrement by releasing all the resorces allocated. More...