![]() |
libxcoder
5.2.0
|
Private definitions for interfacing with NETINT video processing devices over NVMe. More...
#include "ni_defs.h"
Go to the source code of this file.
Data Structures | |
struct | _ni_nvme_command |
struct | _ni_nvme_id_power_state |
struct | _ni_nvme_identity_xcoder_hw |
struct | _ni_nvme_identity |
struct | _ni_nvme_write_complete_dw0_t |
Macros | |
#define | NI_NVME_IDENTITY_CMD_DATA_SZ 4096 |
#define | WRITE_INSTANCE_SET_DW2_SUBFRAME_IDX(dst, size) (dst = (size & 0xFFFFFFFFUL)) |
#define | WRITE_INSTANCE_SET_DW3_SUBFRAME_SIZE(dst, size) (dst = (size & 0xFFFFFFFFUL)) |
#define | CREATE_SESSION_SET_DW10_SUBTYPE(dst) (dst = (nvme_open_xcoder_create_session & 0xFFFFUL)) |
#define | CREATE_SESSION_SET_DW11_INSTANCE(dst, instance) (dst = (instance & 0xFFFFUL)) |
#define | CREATE_SESSION_SET_DW12_DEC_CID(dst, cid) (dst = (cid & 0xFFFFUL)) |
#define | CREATE_SESSION_SET_DW12_DEC_HWF(dst, hwf) (dst = (((hwf << 16) & 0xFFFF0000UL) | (dst & 0xFFFFUL))) |
#define | CREATE_SESSION_SET_DW12_SCL_OPC(dst, opc) (dst = (opc & 0xFFFFUL)) |
#define | CREATE_SESSION_SET_DW12_ENC_CID_FRWIDTH(dst, cid, width) (dst = (((width << 16) & 0xFFFF0000UL) | (cid & 0xFFFFUL))) |
#define | CREATE_SESSION_SET_DW13_ENC_FRHIGHT(dst, hight) (dst = (hight & 0xFFFFUL)) |
#define | CREATE_SESSION_SET_DW14_MODEL_LOAD(dst, load) (dst = (load & 0xFFFFFFFFUL)) |
#define | CREATE_SESSION_SET_DW12_AI_HWF(dst, hwf) (dst = (((hwf << 16) & 0xFFFF0000UL) | (dst & 0xFFFFUL))) |
#define | DESTROY_SESSION_SET_DW10_INSTANCE(dst, sid) (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_close_xcoder_destroy_session & 0xFFFFUL))) |
#define | READ_INSTANCE_SET_DW10_SUBTYPE(dst, sid) (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_write_xcoder_write_instance & 0xFFFFUL))) |
#define | READ_INSTANCE_SET_DW11_INSTANCE(dst, instance) (dst = (instance & 0xFFFFUL)) |
#define | READ_INSTANCE_SET_DW15_SIZE(dst, size) (dst = (size & 0xFFFFFFFFUL)) |
#define | WRITE_INSTANCE_SET_DW10_SUBTYPE(dst, sid) (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_write_xcoder_write_instance & 0xFFFFUL))) |
#define | WRITE_INSTANCE_SET_DW11_INSTANCE(dst, instance) (dst = (instance & 0xFFFFUL)) |
#define | WRITE_INSTANCE_SET_DW11_PAGEOFFSET(dst, pageoffset) (dst = (((pageoffset << 16) | dst))) |
#define | WRITE_INSTANCE_SET_DW12_ISHWDESC(dst, ishwdesc) (dst = (ishwdesc & 0xFFFFUL)) |
#define | WRITE_INSTANCE_SET_DW12_FRAMEINSTID(dst, fid) (dst = (0xFFFFUL & dst) | ((fid<<16) & 0xFFFF0000UL)) |
#define | WRITE_INSTANCE_SET_DW15_SIZE(dst, size) (dst = (size & 0xFFFFFFFFUL)) |
#define | QUERY_SESSION_SET_DW10_SUBTYPE(dst, sid) (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_query_xcoder_query_session & 0xFFFFUL))) |
#define | QUERY_SESSION_SET_DW11_INSTANCE(dst, instance) (dst = (instance & 0xFFFFUL)) |
#define | QUERY_SESSION_SET_DW11_SESSION_STATS(dst) (dst = (nvme_query_xcoder_session_get_stats & 0xFFFFUL)) |
#define | QUERY_SESSION_SET_DW15_SIZE(dst, size) (dst = (size & 0xFFFFFFFFUL)) |
#define | QUERY_INSTANCE_SET_DW10_SUBTYPE(dst, sid) (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_query_xcoder_query_instance & 0xFFFFUL))) |
#define | QUERY_INSTANCE_SET_DW11_INSTANCE_STATUS(dst, instance) (dst = (((nvme_query_xcoder_instance_get_status << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | QUERY_INSTANCE_SET_DW11_INSTANCE_STREAM_INFO(dst, instance) (dst = (((nvme_query_xcoder_instance_get_stream_info << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | QUERY_INSTANCE_SET_DW11_INSTANCE_END_OF_OUTPUT(dst, instance) (dst = (((nvme_query_xcoder_instance_get_end_of_output << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | QUERY_INSTANCE_SET_DW11_INSTANCE_BUF_INFO(dst, rw_type, inst_type) (dst = (((rw_type << 16) & 0xFFFF0000UL) | (inst_type & 0xFFFFUL))) |
#define | QUERY_INSTANCE_SET_DW15_SIZE(dst, size) (dst = (size & 0xFFFFFFFFUL)) |
#define | QUERY_GENERAL_SET_DW10_SUBTYPE(dst) (dst = ( (nvme_query_xcoder_query_general & 0xFFFFUL))) |
#define | QUERY_GENERAL_SET_DW11_INSTANCE_STATUS(dst, instance) (dst = (((nvme_query_xcoder_general_get_status << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | CONFIG_SESSION_SET_DW10_SESSION_ID(dst, sid) (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_config_xcoder_config_session & 0xFFFFUL))) |
#define | CONFIG_SESSION_SET_DW11_SUBTYPE(dst, subtype) (dst = (((0 << 16) & 0xFFFF0000UL) | (subtype & 0xFFFFUL))) |
#define | CONFIG_SESSION_SET_DW15_SIZE(dst, size) (dst = (size & 0xFFFFFFFFUL)) |
#define | CONFIG_INSTANCE_SET_DW10_SUBTYPE(dst, sid) (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_config_xcoder_config_instance & 0xFFFFUL))) |
#define | CONFIG_INSTANCE_SET_DW11_SOS(dst, instance) (dst = (((nvme_config_xcoder_config_set_sos << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | CONFIG_INSTANCE_SET_DW11_EOS(dst, instance) (dst = (((nvme_config_xcoder_config_set_eos << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | CONFIG_INSTANCE_SET_DW11_DEC_PARAMS(dst, instance) (dst = (((nvme_config_xcoder_config_set_dec_params << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | CONFIG_INSTANCE_SET_DW11_ENC_PARAMS(dst, instance) (dst = (((nvme_config_xcoder_config_set_enc_params << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | CONFIG_INSTANCE_SET_DW11_ENC_FRAME_PARAMS(dst, instance) (dst = (((nvme_config_xcoder_config_set_enc_frame_params << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | CONFIG_INSTANCE_SET_DW11_FLUSH(dst, instance) (dst = (((nvme_config_xcoder_config_flush << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | CONFIG_INSTANCE_SET_DW11_UPDATE_PARAMS(dst, instance) (dst = (((nvme_config_xcoder_config_update_enc_params << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | CONFIG_INSTANCE_SET_DW11_ALLOC_FRAME(dst, instance) (dst = (((nvme_config_xcoder_config_alloc_frame << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | CONFIG_INSTANCE_SET_DW11_WRITE_LEN(dst, instance) (dst = (((nvme_config_xcoder_config_set_write_legth << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define | CONFIG_INSTANCE_SET_DW11_AI_PARAMS(dst, instance) |
#define | CONFIG_INSTANCE_SET_DW15_SIZE(dst, size) (dst = (size & 0xFFFFFFFFUL)) |
#define | RECYCLE_BUFFER_SET_DW10_BUFID(dst, bid) (dst = (bid & 0xFFFFUL)) |
#define | NI_DATA_BUFFER_LEN 4096 |
#define | LBA_BIT_OFFSET 12 |
#define | NI_SUB_BIT_OFFSET 4 |
#define | NI_OP_BIT_OFFSET 8 |
#define | NI_INSTANCE_TYPE_OFFSET 19 |
#define | NI_SESSION_ID_OFFSET 22 |
#define | NI_SESSION_ID_SHIFT_HI 3 |
#define | MBs(xMB) ((xMB)*1024*1024) |
#define | MBs_to_4k(xMB) ((xMB)*1024*1024/4096) |
#define | START_OFFSET_IN_4K MBs_to_4k(512) |
#define | CTL_OFFSET_IN_4K(op, sub, subtype) |
#define | RD_OFFSET_IN_4K (START_OFFSET_IN_4K + MBs_to_4k(128)) |
#define | WR_OFFSET_IN_4K (RD_OFFSET_IN_4K + MBs_to_4k(256)) |
#define | LOAD_OFFSET_IN_4K (WR_OFFSET_IN_4K + MBs_to_4k(256)) |
#define | WR_METADATA_OFFSET_IN_4K (MBs_to_4k(1024) + MBs_to_4k(256)) |
#define | DOWNLOAD_OFFSET_IN_4K (WR_METADATA_OFFSET_IN_4K + MBs_to_4k(128)) |
#define | DUMP_LOG_OFFSET_IN_4K (LOAD_OFFSET_IN_4K + MBs_to_4k(8)) |
#define | NVME_LOG_OFFSET_IN_4K (DUMP_LOG_OFFSET_IN_4K) |
#define | EP_LOG_OFFSET_IN_4K (NVME_LOG_OFFSET_IN_4K + MBs_to_4k(1)) |
#define | DP_LOG_OFFSET_IN_4K (EP_LOG_OFFSET_IN_4K + MBs_to_4k(1)) |
#define | TP_LOG_OFFSET_IN_4K (DP_LOG_OFFSET_IN_4K + MBs_to_4k(1)) |
#define | FP_LOG_OFFSET_IN_4K (TP_LOG_OFFSET_IN_4K + MBs_to_4k(1)) |
#define | HIGH_OFFSET_IN_4K(sid, instance) |
#define | GAP(opcode) ((opcode) - nvme_admin_cmd_xcoder_open) |
#define | WRITE_INSTANCE_W(sid, instance) HIGH_OFFSET_IN_4K(sid,instance) + WR_OFFSET_IN_4K |
#define | WRITE_METADATA_W(sid, instance) HIGH_OFFSET_IN_4K(sid, instance) + WR_METADATA_OFFSET_IN_4K |
#define | READ_INSTANCE_R(sid, instance) HIGH_OFFSET_IN_4K(sid,instance) + RD_OFFSET_IN_4K |
#define | DOWNLOAD_FRAMEIDX_R(frame_id) ((frame_id & 0xFFFUL) << NI_INSTANCE_TYPE_OFFSET) + DOWNLOAD_OFFSET_IN_4K |
#define | IDENTIFY_DEVICE_R HIGH_OFFSET_IN_4K(0,0) + CTL_OFFSET_IN_4K(GAP(0xD9), 1, 0) |
#define | OPEN_GET_SID_R(instance) |
#define | OPEN_SESSION_W(sid, instance) |
#define | OPEN_SESSION_CODEC(instance, codec, param) |
#define | OPEN_ADD_CODEC(instance, codec, param) |
#define | CLOSE_SESSION_R(sid, instance) |
#define | QUERY_SESSION_R(sid, instance) |
#define | QUERY_SESSION_STATS_R(sid, instance) |
#define | QUERY_INSTANCE_STATUS_R(sid, instance) |
#define | QUERY_INSTANCE_CUR_STATUS_INFO_R(sid, instance) |
#define | QUERY_INSTANCE_AI_INFO_R(sid, instance) |
#define | QUERY_INSTANCE_STREAM_INFO_R(sid, instance) |
#define | QUERY_INSTANCE_EOS_R(sid, instance) |
#define | QUERY_INSTANCE_RBUFF_SIZE_R(sid, instance) |
#define | QUERY_INSTANCE_WBUFF_SIZE_R(sid, instance) |
#define | QUERY_INSTANCE_WBUFF_SIZE_R_BY_EP(sid, instance) |
#define | QUERY_INSTANCE_RBUFF_SIZE_BUSY_R(sid, instance) |
#define | QUERY_INSTANCE_WBUFF_SIZE_BUSY_R(sid, instance) |
#define | QUERY_INSTANCE_UPLOAD_ID_R(sid, instance) |
#define | QUERY_INSTANCE_ACQUIRE_BUF(sid, instance) |
#define | QUERY_INSTANCE_HW_OUT_SIZE_R(sid, instance) |
#define | QUERY_INSTANCE_NL_SIZE_R(sid, instance) |
#define | QUERY_INSTANCE_NL_R(sid, instance) |
#define | QUERY_INSTANCE_NL_SIZE_V2_R(sid, instance) |
#define | QUERY_INSTANCE_NL_V2_R(sid, instance) |
#define | QUERY_INSTANCE_METRICS_R(sid, instance) |
#define | QUERY_GENERAL_GET_STATUS_R(instance) |
#define | QUERY_DETAIL_GET_STATUS_R(instance) |
#define | QUERY_DETAIL_GET_STATUS_V1_R(instance) |
#define | QUERY_GET_NVME_STATUS_R |
#define | QUERY_GET_VERSIONS_R |
#define | QUERY_GET_NS_VF_R |
#define | QUERY_GET_TEMPERATURE_R |
#define | QUERY_GET_EXTTRA_INFO_R |
#define | CONFIG_INSTANCE_SetSOS_W(sid, instance) |
#define | CONFIG_INSTANCE_SetEOS_W(sid, instance) |
#define | CONFIG_INSTANCE_Flush_W(sid, instance) |
#define | CONFIG_INSTANCE_SetDecPara_W(sid, instance) |
#define | CONFIG_INSTANCE_SetScalerPara_W(sid, instance) |
#define | CONFIG_INSTANCE_SetScalerAlloc_W(sid, instance) |
#define | CONFIG_INSTANCE_SetScalerDrawBoxPara_W(sid, instance) |
#define | CONFIG_INSTANCE_SetScalerWatermarkPara_W(sid, instance) |
#define | CONFIG_INSTANCE_SetEncPara_W(sid, instance) |
#define | CONFIG_INSTANCE_UpdateEncPara_W(sid, instance) |
#define | CONFIG_INSTANCE_SetEncFramePara_W(sid, instance) |
#define | CONFIG_INSTANCE_SetPktSize_W(sid, instance) |
#define | CONFIG_INSTANCE_SetSeqChange_W(sid, instance) |
#define | CONFIG_INSTANCE_SetEncRoiQpMap_W(sid, instance) |
#define | CONFIG_INSTANCE_SetAiPara_W(sid, instance) |
#define | CONFIG_INSTANCE_SetAiHVSPlus_W(sid, instance) |
#define | CONFIG_INSTANCE_SetAiFrm_W(sid, instance) |
#define | CONFIG_INSTANCE_SetP2P_W(sid, instance) |
#define | CONFIG_SESSION_KeepAlive_W(sid) |
#define | CONFIG_SESSION_Read_W(sid) |
#define | CONFIG_SESSION_Write_W(sid) |
#define | CLEAR_INSTANCE_BUF_W(frame_id) CTL_OFFSET_IN_4K(GAP(nvme_admin_cmd_xcoder_recycle_buffer), 0, (frame_id & 0x00FF)) + (((frame_id & 0xFF00)>>8)<<NI_INSTANCE_TYPE_OFFSET) |
#define | SEND_P2P_BUF_W CTL_OFFSET_IN_4K(GAP(nvme_admin_cmd_xcoder_p2p_send), 0, 0) |
#define | CONFIG_SESSION_KeepAliveTimeout_W(sid) |
#define | CONFIG_SESSION_SWVersion_W(sid) |
#define | CONFIG_GLOBAL_NAMESPACE_NUM |
#define | CONFIG_SESSION_DDR_PRIORITY_W(sid) |
#define | CONFIG_SESSION_FRAME_COPY_W(sid) |
#define | CONFIG_INSTANCE_UploadModel_W(sid, instance) |
Functions | |
int32_t | ni_nvme_send_admin_cmd (ni_nvme_admin_opcode_t opcode, ni_device_handle_t fd, ni_nvme_command_t *p_ni_nvme_cmd, uint32_t data_len, void *data, uint32_t *pResult) |
Compose a nvme admin command. More... | |
int32_t | ni_nvme_send_io_cmd (ni_nvme_opcode_t opcode, ni_device_handle_t fd, ni_nvme_command_t *p_ni_nvme_cmd, uint32_t data_len, void *data, uint32_t *pResult) |
Compose a nvme io command. More... | |
int32_t | ni_nvme_send_io_cmd_thru_admin_queue (ni_nvme_admin_opcode_t opcode, ni_device_handle_t fd, ni_nvme_command_t *p_ni_nvme_cmd, uint32_t data_len, void *data, uint32_t *pResult) |
ni_retcode_t | ni_nvme_check_error_code (int rc, int opcode, uint32_t xcoder_type, uint32_t hw_id, uint32_t *inst_id) |
Check f/w error return code, and if it's a fatal one, terminate application's decoding/encoding processing by sending self a SIGTERM signal. Application shall handle this gracefully. More... | |
int | ni_nvme_enumerate_devices (char ni_devices[][NI_MAX_DEVICE_NAME_LEN], int max_handles) |
int32_t | ni_nvme_send_read_cmd (ni_device_handle_t handle, ni_event_handle_t event_handle, void *p_data, uint32_t data_len, uint32_t lba) |
Compose an io read command. More... | |
int32_t | ni_nvme_send_write_cmd (ni_device_handle_t handle, ni_event_handle_t event_handle, void *p_data, uint32_t data_len, uint32_t lba) |
Compose a io write command. More... | |
Private definitions for interfacing with NETINT video processing devices over NVMe.
Definition in file ni_nvme.h.
#define CLEAR_INSTANCE_BUF_W | ( | frame_id | ) | CTL_OFFSET_IN_4K(GAP(nvme_admin_cmd_xcoder_recycle_buffer), 0, (frame_id & 0x00FF)) + (((frame_id & 0xFF00)>>8)<<NI_INSTANCE_TYPE_OFFSET) |
#define CLOSE_SESSION_R | ( | sid, | |
instance | |||
) |
#define CONFIG_GLOBAL_NAMESPACE_NUM |
#define CONFIG_INSTANCE_Flush_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SET_DW10_SUBTYPE | ( | dst, | |
sid | |||
) | (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_config_xcoder_config_instance & 0xFFFFUL))) |
#define CONFIG_INSTANCE_SET_DW11_AI_PARAMS | ( | dst, | |
instance | |||
) |
#define CONFIG_INSTANCE_SET_DW11_ALLOC_FRAME | ( | dst, | |
instance | |||
) | (dst = (((nvme_config_xcoder_config_alloc_frame << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define CONFIG_INSTANCE_SET_DW11_DEC_PARAMS | ( | dst, | |
instance | |||
) | (dst = (((nvme_config_xcoder_config_set_dec_params << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define CONFIG_INSTANCE_SET_DW11_ENC_FRAME_PARAMS | ( | dst, | |
instance | |||
) | (dst = (((nvme_config_xcoder_config_set_enc_frame_params << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define CONFIG_INSTANCE_SET_DW11_ENC_PARAMS | ( | dst, | |
instance | |||
) | (dst = (((nvme_config_xcoder_config_set_enc_params << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define CONFIG_INSTANCE_SET_DW11_EOS | ( | dst, | |
instance | |||
) | (dst = (((nvme_config_xcoder_config_set_eos << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define CONFIG_INSTANCE_SET_DW11_FLUSH | ( | dst, | |
instance | |||
) | (dst = (((nvme_config_xcoder_config_flush << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define CONFIG_INSTANCE_SET_DW11_SOS | ( | dst, | |
instance | |||
) | (dst = (((nvme_config_xcoder_config_set_sos << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define CONFIG_INSTANCE_SET_DW11_UPDATE_PARAMS | ( | dst, | |
instance | |||
) | (dst = (((nvme_config_xcoder_config_update_enc_params << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define CONFIG_INSTANCE_SET_DW11_WRITE_LEN | ( | dst, | |
instance | |||
) | (dst = (((nvme_config_xcoder_config_set_write_legth << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define CONFIG_INSTANCE_SET_DW15_SIZE | ( | dst, | |
size | |||
) | (dst = (size & 0xFFFFFFFFUL)) |
#define CONFIG_INSTANCE_SetAiFrm_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetAiHVSPlus_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetAiPara_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetDecPara_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetEncFramePara_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetEncPara_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetEncRoiQpMap_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetEOS_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetP2P_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetPktSize_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetScalerAlloc_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetScalerDrawBoxPara_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetScalerPara_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetScalerWatermarkPara_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetSeqChange_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_SetSOS_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_UpdateEncPara_W | ( | sid, | |
instance | |||
) |
#define CONFIG_INSTANCE_UploadModel_W | ( | sid, | |
instance | |||
) |
#define CONFIG_SESSION_DDR_PRIORITY_W | ( | sid | ) |
#define CONFIG_SESSION_FRAME_COPY_W | ( | sid | ) |
#define CONFIG_SESSION_KeepAlive_W | ( | sid | ) |
#define CONFIG_SESSION_KeepAliveTimeout_W | ( | sid | ) |
#define CONFIG_SESSION_Read_W | ( | sid | ) |
#define CONFIG_SESSION_SET_DW10_SESSION_ID | ( | dst, | |
sid | |||
) | (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_config_xcoder_config_session & 0xFFFFUL))) |
#define CONFIG_SESSION_SET_DW11_SUBTYPE | ( | dst, | |
subtype | |||
) | (dst = (((0 << 16) & 0xFFFF0000UL) | (subtype & 0xFFFFUL))) |
#define CONFIG_SESSION_SET_DW15_SIZE | ( | dst, | |
size | |||
) | (dst = (size & 0xFFFFFFFFUL)) |
#define CONFIG_SESSION_SWVersion_W | ( | sid | ) |
#define CONFIG_SESSION_Write_W | ( | sid | ) |
#define CREATE_SESSION_SET_DW10_SUBTYPE | ( | dst | ) | (dst = (nvme_open_xcoder_create_session & 0xFFFFUL)) |
#define CREATE_SESSION_SET_DW11_INSTANCE | ( | dst, | |
instance | |||
) | (dst = (instance & 0xFFFFUL)) |
#define CREATE_SESSION_SET_DW12_AI_HWF | ( | dst, | |
hwf | |||
) | (dst = (((hwf << 16) & 0xFFFF0000UL) | (dst & 0xFFFFUL))) |
#define CREATE_SESSION_SET_DW12_DEC_CID | ( | dst, | |
cid | |||
) | (dst = (cid & 0xFFFFUL)) |
#define CREATE_SESSION_SET_DW12_DEC_HWF | ( | dst, | |
hwf | |||
) | (dst = (((hwf << 16) & 0xFFFF0000UL) | (dst & 0xFFFFUL))) |
#define CREATE_SESSION_SET_DW12_ENC_CID_FRWIDTH | ( | dst, | |
cid, | |||
width | |||
) | (dst = (((width << 16) & 0xFFFF0000UL) | (cid & 0xFFFFUL))) |
#define CREATE_SESSION_SET_DW12_SCL_OPC | ( | dst, | |
opc | |||
) | (dst = (opc & 0xFFFFUL)) |
#define CREATE_SESSION_SET_DW13_ENC_FRHIGHT | ( | dst, | |
hight | |||
) | (dst = (hight & 0xFFFFUL)) |
#define CREATE_SESSION_SET_DW14_MODEL_LOAD | ( | dst, | |
load | |||
) | (dst = (load & 0xFFFFFFFFUL)) |
#define CTL_OFFSET_IN_4K | ( | op, | |
sub, | |||
subtype | |||
) |
#define DESTROY_SESSION_SET_DW10_INSTANCE | ( | dst, | |
sid | |||
) | (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_close_xcoder_destroy_session & 0xFFFFUL))) |
#define DOWNLOAD_FRAMEIDX_R | ( | frame_id | ) | ((frame_id & 0xFFFUL) << NI_INSTANCE_TYPE_OFFSET) + DOWNLOAD_OFFSET_IN_4K |
#define DOWNLOAD_OFFSET_IN_4K (WR_METADATA_OFFSET_IN_4K + MBs_to_4k(128)) |
#define DP_LOG_OFFSET_IN_4K (EP_LOG_OFFSET_IN_4K + MBs_to_4k(1)) |
#define DUMP_LOG_OFFSET_IN_4K (LOAD_OFFSET_IN_4K + MBs_to_4k(8)) |
#define EP_LOG_OFFSET_IN_4K (NVME_LOG_OFFSET_IN_4K + MBs_to_4k(1)) |
#define FP_LOG_OFFSET_IN_4K (TP_LOG_OFFSET_IN_4K + MBs_to_4k(1)) |
#define GAP | ( | opcode | ) | ((opcode) - nvme_admin_cmd_xcoder_open) |
#define HIGH_OFFSET_IN_4K | ( | sid, | |
instance | |||
) |
#define IDENTIFY_DEVICE_R HIGH_OFFSET_IN_4K(0,0) + CTL_OFFSET_IN_4K(GAP(0xD9), 1, 0) |
#define LOAD_OFFSET_IN_4K (WR_OFFSET_IN_4K + MBs_to_4k(256)) |
#define NVME_LOG_OFFSET_IN_4K (DUMP_LOG_OFFSET_IN_4K) |
#define OPEN_ADD_CODEC | ( | instance, | |
codec, | |||
param | |||
) |
#define OPEN_GET_SID_R | ( | instance | ) |
#define OPEN_SESSION_CODEC | ( | instance, | |
codec, | |||
param | |||
) |
#define OPEN_SESSION_W | ( | sid, | |
instance | |||
) |
#define QUERY_DETAIL_GET_STATUS_R | ( | instance | ) |
#define QUERY_DETAIL_GET_STATUS_V1_R | ( | instance | ) |
#define QUERY_GENERAL_GET_STATUS_R | ( | instance | ) |
#define QUERY_GENERAL_SET_DW10_SUBTYPE | ( | dst | ) | (dst = ( (nvme_query_xcoder_query_general & 0xFFFFUL))) |
#define QUERY_GENERAL_SET_DW11_INSTANCE_STATUS | ( | dst, | |
instance | |||
) | (dst = (((nvme_query_xcoder_general_get_status << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define QUERY_GET_EXTTRA_INFO_R |
#define QUERY_GET_NS_VF_R |
#define QUERY_GET_NVME_STATUS_R |
#define QUERY_GET_TEMPERATURE_R |
#define QUERY_GET_VERSIONS_R |
#define QUERY_INSTANCE_ACQUIRE_BUF | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_AI_INFO_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_CUR_STATUS_INFO_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_EOS_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_HW_OUT_SIZE_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_METRICS_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_NL_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_NL_SIZE_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_NL_SIZE_V2_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_NL_V2_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_RBUFF_SIZE_BUSY_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_RBUFF_SIZE_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_SET_DW10_SUBTYPE | ( | dst, | |
sid | |||
) | (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_query_xcoder_query_instance & 0xFFFFUL))) |
#define QUERY_INSTANCE_SET_DW11_INSTANCE_BUF_INFO | ( | dst, | |
rw_type, | |||
inst_type | |||
) | (dst = (((rw_type << 16) & 0xFFFF0000UL) | (inst_type & 0xFFFFUL))) |
#define QUERY_INSTANCE_SET_DW11_INSTANCE_END_OF_OUTPUT | ( | dst, | |
instance | |||
) | (dst = (((nvme_query_xcoder_instance_get_end_of_output << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define QUERY_INSTANCE_SET_DW11_INSTANCE_STATUS | ( | dst, | |
instance | |||
) | (dst = (((nvme_query_xcoder_instance_get_status << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define QUERY_INSTANCE_SET_DW11_INSTANCE_STREAM_INFO | ( | dst, | |
instance | |||
) | (dst = (((nvme_query_xcoder_instance_get_stream_info << 16) & 0xFFFF0000UL) | (instance & 0xFFFFUL))) |
#define QUERY_INSTANCE_SET_DW15_SIZE | ( | dst, | |
size | |||
) | (dst = (size & 0xFFFFFFFFUL)) |
#define QUERY_INSTANCE_STATUS_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_STREAM_INFO_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_UPLOAD_ID_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_WBUFF_SIZE_BUSY_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_WBUFF_SIZE_R | ( | sid, | |
instance | |||
) |
#define QUERY_INSTANCE_WBUFF_SIZE_R_BY_EP | ( | sid, | |
instance | |||
) |
#define QUERY_SESSION_R | ( | sid, | |
instance | |||
) |
#define QUERY_SESSION_SET_DW10_SUBTYPE | ( | dst, | |
sid | |||
) | (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_query_xcoder_query_session & 0xFFFFUL))) |
#define QUERY_SESSION_SET_DW11_INSTANCE | ( | dst, | |
instance | |||
) | (dst = (instance & 0xFFFFUL)) |
#define QUERY_SESSION_SET_DW11_SESSION_STATS | ( | dst | ) | (dst = (nvme_query_xcoder_session_get_stats & 0xFFFFUL)) |
#define QUERY_SESSION_SET_DW15_SIZE | ( | dst, | |
size | |||
) | (dst = (size & 0xFFFFFFFFUL)) |
#define QUERY_SESSION_STATS_R | ( | sid, | |
instance | |||
) |
#define RD_OFFSET_IN_4K (START_OFFSET_IN_4K + MBs_to_4k(128)) |
#define READ_INSTANCE_R | ( | sid, | |
instance | |||
) | HIGH_OFFSET_IN_4K(sid,instance) + RD_OFFSET_IN_4K |
#define READ_INSTANCE_SET_DW10_SUBTYPE | ( | dst, | |
sid | |||
) | (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_write_xcoder_write_instance & 0xFFFFUL))) |
#define READ_INSTANCE_SET_DW11_INSTANCE | ( | dst, | |
instance | |||
) | (dst = (instance & 0xFFFFUL)) |
#define READ_INSTANCE_SET_DW15_SIZE | ( | dst, | |
size | |||
) | (dst = (size & 0xFFFFFFFFUL)) |
#define RECYCLE_BUFFER_SET_DW10_BUFID | ( | dst, | |
bid | |||
) | (dst = (bid & 0xFFFFUL)) |
#define SEND_P2P_BUF_W CTL_OFFSET_IN_4K(GAP(nvme_admin_cmd_xcoder_p2p_send), 0, 0) |
#define TP_LOG_OFFSET_IN_4K (DP_LOG_OFFSET_IN_4K + MBs_to_4k(1)) |
#define WR_OFFSET_IN_4K (RD_OFFSET_IN_4K + MBs_to_4k(256)) |
#define WRITE_INSTANCE_SET_DW10_SUBTYPE | ( | dst, | |
sid | |||
) | (dst = (((sid << 16) & 0xFFFF0000UL) | (nvme_write_xcoder_write_instance & 0xFFFFUL))) |
#define WRITE_INSTANCE_SET_DW11_INSTANCE | ( | dst, | |
instance | |||
) | (dst = (instance & 0xFFFFUL)) |
#define WRITE_INSTANCE_SET_DW11_PAGEOFFSET | ( | dst, | |
pageoffset | |||
) | (dst = (((pageoffset << 16) | dst))) |
#define WRITE_INSTANCE_SET_DW12_FRAMEINSTID | ( | dst, | |
fid | |||
) | (dst = (0xFFFFUL & dst) | ((fid<<16) & 0xFFFF0000UL)) |
#define WRITE_INSTANCE_SET_DW12_ISHWDESC | ( | dst, | |
ishwdesc | |||
) | (dst = (ishwdesc & 0xFFFFUL)) |
#define WRITE_INSTANCE_SET_DW15_SIZE | ( | dst, | |
size | |||
) | (dst = (size & 0xFFFFFFFFUL)) |
#define WRITE_INSTANCE_SET_DW2_SUBFRAME_IDX | ( | dst, | |
size | |||
) | (dst = (size & 0xFFFFFFFFUL)) |
#define WRITE_INSTANCE_SET_DW3_SUBFRAME_SIZE | ( | dst, | |
size | |||
) | (dst = (size & 0xFFFFFFFFUL)) |
#define WRITE_INSTANCE_W | ( | sid, | |
instance | |||
) | HIGH_OFFSET_IN_4K(sid,instance) + WR_OFFSET_IN_4K |
#define WRITE_METADATA_W | ( | sid, | |
instance | |||
) | HIGH_OFFSET_IN_4K(sid, instance) + WR_METADATA_OFFSET_IN_4K |
typedef enum _ni_nvme_admin_opcode ni_nvme_admin_opcode_t |
typedef struct _ni_nvme_command ni_nvme_command_t |
typedef struct _ni_nvme_id_power_state ni_nvme_id_power_state_t |
typedef struct _ni_nvme_identity ni_nvme_identity_t |
typedef struct _ni_nvme_identity_xcoder_hw ni_nvme_identity_xcoder_hw_t |
typedef uint32_t ni_nvme_result_t |
typedef struct _ni_nvme_write_complete_dw0_t ni_nvme_write_complete_dw0_t |
typedef enum _nvme_close_xcoder_subtype nvme_close_xcoder_subtype_t |
typedef enum _nvme_config_xcoder_config_instance_subtype nvme_config_xcoder_config_instance_subtype_t |
typedef enum _nvme_config_xcoder_subtype nvme_config_xcoder_subtype_t |
typedef enum _nvme_open_xcoder_subtype nvme_open_xcoder_subtype_t |
typedef enum _nvme_query_xcoder_subtype nvme_query_xcoder_subtype_t |
typedef enum _nvme_read_xcoder_subtype nvme_read_xcoder_subtype_t |
typedef enum _nvme_write_xcoder_subtype nvme_write_xcoder_subtype_t |
ni_retcode_t ni_nvme_check_error_code | ( | int | rc, |
int | opcode, | ||
uint32_t | xcoder_type, | ||
uint32_t | hw_id, | ||
uint32_t * | p_instance_id | ||
) |
int ni_nvme_enumerate_devices | ( | char | ni_devices[][NI_MAX_DEVICE_NAME_LEN], |
int | max_handles | ||
) |
int32_t ni_nvme_send_admin_cmd | ( | ni_nvme_admin_opcode_t | opcode, |
ni_device_handle_t | handle, | ||
ni_nvme_command_t * | p_ni_nvme_cmd, | ||
uint32_t | data_len, | ||
void * | p_data, | ||
uint32_t * | p_result | ||
) |
int32_t ni_nvme_send_io_cmd | ( | ni_nvme_opcode_t | opcode, |
ni_device_handle_t | handle, | ||
ni_nvme_command_t * | p_ni_nvme_cmd, | ||
uint32_t | data_len, | ||
void * | p_data, | ||
uint32_t * | p_result | ||
) |
int32_t ni_nvme_send_io_cmd_thru_admin_queue | ( | ni_nvme_admin_opcode_t | opcode, |
ni_device_handle_t | fd, | ||
ni_nvme_command_t * | p_ni_nvme_cmd, | ||
uint32_t | data_len, | ||
void * | data, | ||
uint32_t * | pResult | ||
) |
int32_t ni_nvme_send_read_cmd | ( | ni_device_handle_t | handle, |
ni_event_handle_t | event_handle, | ||
void * | p_data, | ||
uint32_t | data_len, | ||
uint32_t | lba | ||
) |