PDK API Guide for J721S2
MSC Interface

Introduction

Interface file for MSC M2M FVID2 driver

Files

file  vhwa_m2mMsc.h
 Defines the structures / control operations that could be used to configure / control MSC M2M driver.
 

Data Structures

struct  Vhwa_M2mMscSecChPrms
 Connfiguration parameters MSC secondary channel. [ Only applicable for VPAC3. NA for VPAC(J721E) ]. More...
 
struct  Vhwa_M2mMscParams
 Connfiguration parameters of MSC. More...
 
struct  Vhwa_M2mMscCreatePrms
 Parameters required to create a new handle. More...
 
struct  Vhwa_M2mMscSl2AllocPrms
 Init Parameters required to allocate MSC drivere. More...
 
struct  Vhwa_M2mMscInitParams
 Init Parameters for MSC M2M Driver. More...
 
struct  Vhwa_M2mMscPerf
 Structure for storing the performance numbers. More...
 
struct  Vhwa_M2mMscPsaSign
 Structure for storing PSA signatures. More...
 

Functions

static void Vhwa_m2mMscInitParamsInit (Vhwa_M2mMscInitParams *mscInitPrms)
 Vhwa_M2mMscInitParams structure init function. More...
 
static void Vhwa_m2mMscParamsInit (Vhwa_M2mMscParams *mscCfg)
 Function to initialize the MSC configuration parameters to default. More...
 
static void Vhwa_M2mMscCreatePrmsInit (Vhwa_M2mMscCreatePrms *createArgs)
 Function to initialize the MSC create params to default. More...
 
int32_t Vhwa_m2mMscInit (const Vhwa_M2mMscInitParams *initPrms)
 MSC initialization function. This function initializes the MSC hardware and drivers. This function should be called before calling any driver APIs and only once. More...
 
int32_t Vhwa_m2mMscDeInit (void)
 MSC de-initialization function. This function un-initializes the MSC hardware and drivers. This function should be called during system shutdown if Vhwa_m2mMscDeInit() was called by the application. More...
 
int32_t Vhwa_m2mMscAllocSl2 (const Vhwa_M2mMscSl2AllocPrms *sl2allocPrms)
 Function to allocate Sl2 memory for input and output buffers. More...
 
int32_t Vhwa_m2mMscFreeSl2 (void)
 Function to free allocated SL2. More...
 
static void Vhwa_M2mMscSl2AllocPrmsInit (Vhwa_M2mMscSl2AllocPrms *sl2Prms)
 

Macros

#define VPAC_MSC_INST_ID_0   (VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_0)
 Default MSC Instance/Thread ID 0 [For backward compatibility]. More...
 
#define VPAC_MSC_INST_ID_1   (VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_1)
 Default MSC Instance/Thread ID 1 [For backward compatibility]. More...
 
#define VHWA_M2M_MSC_MAX_INST   (VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_1 + 1U)
 Maximum supported instance for MSC [For backward compatibility]. More...
 
#define VHWA_M2M_MSC_MIN_RD_BUFFER_DEPTH   (6U)
 Minimum supported depth value for read buffer in VHWA memory. More...
 
#define VHWA_M2M_MSC_MIN_WR_BUFFER_DEPTH   (2U)
 Minimum supported depth value for write buffer in VHWA memory. More...
 
#define VHWA_M2M_MSC_MAX_COMP   (2u)
 Maximum possible MSC iteration for a simgle request (Luma + Chroma) More...
 
#define VHWA_M2M_MSC_MAX_IN_CHANNEL   (1u)
 
#define VHWA_M2M_MSC_MAX_HANDLES   (16u)
 Max Number of handles supported for each instance of MSC M2M Driver. More...
 

VHWA MSC Instance ID

VHWA VPAC MSC Instance ID's. There are two parallel threads of MSC supported in HW for each VPAC instance

#define VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_0   (0U)
 VPAC 0 MSC Instance 0. More...
 
#define VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_1   (1U)
 VPAC 0 MSC Instance 1. More...
 
#define VHWA_M2M_MSC_DRV_NUM_INST   (VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_1 + 1U)
 Total number of MSC instances. More...
 

MSC IOCTL macros

Input/Output control MACRO's for MSC driver

#define VHWA_M2M_IOCTL_MSC_SET_COEFF   (VHWA_IOCTL_MSC_IOCTL_BASE)
 IOCTL for Setting filter coefficients. More...
 
#define VHWA_M2M_IOCTL_MSC_SET_PARAMS   (VHWA_M2M_IOCTL_MSC_SET_COEFF + 1U)
 IOCTL for Setting MSC configuration. More...
 
#define VHWA_M2M_IOCTL_MSC_SET_BW_LIMITER   (VHWA_M2M_IOCTL_MSC_SET_PARAMS + 1U)
 IOCTL to set bandwidth limiter. This IOCTL take pointer to structure Vhwa_HtsLimiter as input. More...
 
#define VHWA_M2M_IOCTL_MSC_GET_PERF   (VHWA_M2M_IOCTL_MSC_SET_BW_LIMITER + 1U)
 IOCTL to get the IP performance. More...
 
#define VHWA_M2M_IOCTL_MSC_GET_PSA_SIGN   (VHWA_M2M_IOCTL_MSC_GET_PERF + 1U)
 IOCTL to get PSA signature for all enabeld outputs. More...
 
#define VHWA_M2M_IOCTL_MSC_REGISTER_ERR_CB   (VHWA_M2M_IOCTL_MSC_GET_PSA_SIGN + 1U)
 IOCTL for enabling error events and registering callbacks for the same. More...
 
#define VHWA_M2M_IOCTL_MSC_SYNC_START   (VHWA_M2M_IOCTL_MSC_REGISTER_ERR_CB + 1U)
 IOCTL to sync start each module This IOCTL doesn't configure any register and only enable pipeline to start processing. More...
 

Macro Definition Documentation

◆ VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_0

#define VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_0   (0U)

VPAC 0 MSC Instance 0.

◆ VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_1

#define VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_1   (1U)

VPAC 0 MSC Instance 1.

◆ VHWA_M2M_MSC_DRV_NUM_INST

#define VHWA_M2M_MSC_DRV_NUM_INST   (VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_1 + 1U)

Total number of MSC instances.

◆ VPAC_MSC_INST_ID_0

#define VPAC_MSC_INST_ID_0   (VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_0)

Default MSC Instance/Thread ID 0 [For backward compatibility].

◆ VPAC_MSC_INST_ID_1

#define VPAC_MSC_INST_ID_1   (VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_1)

Default MSC Instance/Thread ID 1 [For backward compatibility].

◆ VHWA_M2M_MSC_MAX_INST

#define VHWA_M2M_MSC_MAX_INST   (VHWA_M2M_VPAC_0_MSC_DRV_INST_ID_1 + 1U)

Maximum supported instance for MSC [For backward compatibility].

◆ VHWA_M2M_MSC_MIN_RD_BUFFER_DEPTH

#define VHWA_M2M_MSC_MIN_RD_BUFFER_DEPTH   (6U)

Minimum supported depth value for read buffer in VHWA memory.

◆ VHWA_M2M_MSC_MIN_WR_BUFFER_DEPTH

#define VHWA_M2M_MSC_MIN_WR_BUFFER_DEPTH   (2U)

Minimum supported depth value for write buffer in VHWA memory.

◆ VHWA_M2M_MSC_MAX_COMP

#define VHWA_M2M_MSC_MAX_COMP   (2u)

Maximum possible MSC iteration for a simgle request (Luma + Chroma)

◆ VHWA_M2M_MSC_MAX_IN_CHANNEL

#define VHWA_M2M_MSC_MAX_IN_CHANNEL   (1u)

◆ VHWA_M2M_MSC_MAX_HANDLES

#define VHWA_M2M_MSC_MAX_HANDLES   (16u)

Max Number of handles supported for each instance of MSC M2M Driver.

◆ VHWA_M2M_IOCTL_MSC_SET_COEFF

#define VHWA_M2M_IOCTL_MSC_SET_COEFF   (VHWA_IOCTL_MSC_IOCTL_BASE)

IOCTL for Setting filter coefficients.

◆ VHWA_M2M_IOCTL_MSC_SET_PARAMS

#define VHWA_M2M_IOCTL_MSC_SET_PARAMS   (VHWA_M2M_IOCTL_MSC_SET_COEFF + 1U)

IOCTL for Setting MSC configuration.

◆ VHWA_M2M_IOCTL_MSC_SET_BW_LIMITER

#define VHWA_M2M_IOCTL_MSC_SET_BW_LIMITER   (VHWA_M2M_IOCTL_MSC_SET_PARAMS + 1U)

IOCTL to set bandwidth limiter. This IOCTL take pointer to structure Vhwa_HtsLimiter as input.

◆ VHWA_M2M_IOCTL_MSC_GET_PERF

#define VHWA_M2M_IOCTL_MSC_GET_PERF   (VHWA_M2M_IOCTL_MSC_SET_BW_LIMITER + 1U)

IOCTL to get the IP performance.

◆ VHWA_M2M_IOCTL_MSC_GET_PSA_SIGN

#define VHWA_M2M_IOCTL_MSC_GET_PSA_SIGN   (VHWA_M2M_IOCTL_MSC_GET_PERF + 1U)

IOCTL to get PSA signature for all enabeld outputs.

◆ VHWA_M2M_IOCTL_MSC_REGISTER_ERR_CB

#define VHWA_M2M_IOCTL_MSC_REGISTER_ERR_CB   (VHWA_M2M_IOCTL_MSC_GET_PSA_SIGN + 1U)

IOCTL for enabling error events and registering callbacks for the same.

◆ VHWA_M2M_IOCTL_MSC_SYNC_START

#define VHWA_M2M_IOCTL_MSC_SYNC_START   (VHWA_M2M_IOCTL_MSC_REGISTER_ERR_CB + 1U)

IOCTL to sync start each module This IOCTL doesn't configure any register and only enable pipeline to start processing.

Function Documentation

◆ Vhwa_m2mMscInitParamsInit()

static void Vhwa_m2mMscInitParamsInit ( Vhwa_M2mMscInitParams mscInitPrms)
inlinestatic

Vhwa_M2mMscInitParams structure init function.

Parameters
mscInitPrmsPointer to Vhwa_M2mMscInitParams structure.
Returns
None

◆ Vhwa_m2mMscParamsInit()

static void Vhwa_m2mMscParamsInit ( Vhwa_M2mMscParams mscCfg)
inlinestatic

Function to initialize the MSC configuration parameters to default.

Parameters
mscCfgPointer to a Vhwa_M2mMscParams containing MSC configuration
Returns
None

◆ Vhwa_M2mMscCreatePrmsInit()

static void Vhwa_M2mMscCreatePrmsInit ( Vhwa_M2mMscCreatePrms createArgs)
inlinestatic

Function to initialize the MSC create params to default.

Parameters
createArgsPointer to a Vhwa_M2mMscCreatePrms, MSC Create Args
Returns
None

◆ Vhwa_m2mMscInit()

int32_t Vhwa_m2mMscInit ( const Vhwa_M2mMscInitParams initPrms)

MSC initialization function. This function initializes the MSC hardware and drivers. This function should be called before calling any driver APIs and only once.

Parameters
initPrmsPointer to a Vhwa_M2mMscInitParams structure containing the MSC driver initialization parameters
Returns
FVID2_SOK if successful, else suitable error code

◆ Vhwa_m2mMscDeInit()

int32_t Vhwa_m2mMscDeInit ( void  )

MSC de-initialization function. This function un-initializes the MSC hardware and drivers. This function should be called during system shutdown if Vhwa_m2mMscDeInit() was called by the application.

Returns
FVID2_SOK if successful, else suitable error code

◆ Vhwa_m2mMscAllocSl2()

int32_t Vhwa_m2mMscAllocSl2 ( const Vhwa_M2mMscSl2AllocPrms sl2allocPrms)

Function to allocate Sl2 memory for input and output buffers.

Parameters
sl2allocPrmsPointer to a Vhwa_M2mMscSl2AllocPrms structure containing the SL2 allocation parameters
Returns
FVID2_SOK if successful, else suitable error code

◆ Vhwa_m2mMscFreeSl2()

int32_t Vhwa_m2mMscFreeSl2 ( void  )

Function to free allocated SL2.

Returns
FVID2_SOK if successful, else suitable error code

◆ Vhwa_M2mMscSl2AllocPrmsInit()

static void Vhwa_M2mMscSl2AllocPrmsInit ( Vhwa_M2mMscSl2AllocPrms sl2Prms)
inlinestatic