DIVP模块调试手册

Version 1.2


1. cat

  • 调试信息

    # cat /proc/mi_modules/mi_divp/mi_divp0
    

  • 调试信息分析

    记录当前某DIVP device的使用状况,以及device属性、layer属性、inputport属性,可以动态地获取到这些信息,方便调试和测试。

  • 参数说明

    参数 描述
    channelinfo ChnId 0~16
    16 Capture Channel 不对上层开放
    Status 0 INITED
    1 CREATED
    2 STARTED
    3 STOPED
    4 DISTROYED
    AttrChg 0:not change
    1:changed
    FieldType0, FieldType1 (last two fields's type) 0 NONE, //< no field.
    1 TOP, //< Top field only.
    2 BOTTOM, //< Bottom field only.
    3 BOTH, //< Both fields.
    4 NUM
    ChnAttrPre channel的上一次设置属性
    ChnAttrOrg channel的原始设置属性
    CropX,CropY,CropW,CropH 上层设置的crop位置
    bHMirror bVMirror 水平翻转使能
    垂直翻转使能
    0:disable
    1:enable
    eDiType 0 OFF,//off
    1 2D,///2.5D DI
    2 3D,///3D DI
    3 NUM,
    eRotateType 0 NONE, //Rotate 0 degrees
    1 90, //Rotate 90 degrees
    2 180, //Rotate 180 degrees
    3 270, //Rotate 270 degrees
    4 NUM,
    eTnrLevel 0 OFF,
    1 LOW,
    2 MIDDLE,
    3 HIGH,
    4 NUM,
    inputport info
    ChnId Channel ID 0~16
    InputChg input port 属性是否发生变化
    bIPChg 0 隔行和逐行之间没有发生变化
    1 隔行切换到逐行,or 逐行到隔行
    PreWidth input port width
    PreHeight input port height
    Pixel E_MI_SYS_PIXEL_FRAME_YUV422_YUYV = 0,
    E_MI_SYS_PIXEL_FRAME_ARGB8888,
    E_MI_SYS_PIXEL_FRAME_ABGR8888,
    E_MI_SYS_PIXEL_FRAME_RGB565,
    E_MI_SYS_PIXEL_FRAME_ARGB1555,
    E_MI_SYS_PIXEL_FRAME_I2,
    E_MI_SYS_PIXEL_FRAME_I4,
    E_MI_SYS_PIXEL_FRAME_I8,
    E_MI_SYS_PIXEL_FRAME_YUV_SEMIPLANAR_422,
    E_MI_SYS_PIXEL_FRAME_YUV_SEMIPLANAR_420,
    E_MI_SYS_PIXEL_FRAME_YUV_MST_420,
    //vdec mstar private video format
    E_MI_SYS_PIXEL_FRAME_YC420_MSTTILE1_H264,
    E_MI_SYS_PIXEL_FRAME_YC420_MSTTILE2_H265,
    E_MI_SYS_PIXEL_FRAME_YC420_MSTTILE3_H265,
    E_MI_SYS_PIXEL_FRAME_FORMAT_MAX
    Stride Input的stride
    2Pmode b2P_Enable值,1表示enable,0表示disable
    EnqueueTask Enqueue的task数目
    GetInTaskCnt OnPreProcessInputTask的task数目
    Outputport Info ChnId Channel ID 0~16
    OutputChg Output 属性是否发生变化
    0: not change
    1: changed
    Pixel 同input pixel
    CompMode 0 //no compress
    1 //compress unit is 256 bytes as a segment
    2 //compress unit is the whole line
    3 //compress unit is the whole frame
    4 //number
    PreWidth PreHeight 上一次设置的output port 宽和高
    Stride Output 的stride
    phyaddr Ouput buffer 的物理地址
    FinishTaskCnt Finish task的数目
    fps Output port的帧率
    Common Info ChnNum Channel的总数
    Pixel 同input pixel
    PassNum Pass的总数
    InPortNum Input port的个数
    OutPortNum Output port的个数
    CollectSize Attach的pstAllocator数目
    current_buf_size 当前申请的内存大小
    Peak_buf_size 使用内存的峰值
    user_pid 进程id
    user_buf_quota User可以拿的buffer最大个数
    UsrInjectQ_cnt User inject buffer个数
    BindInQ_cnt 前端给input port enqueue的buffer个数
    TotalPendingBuf_size 当前input working队列中各个task总共所占的buffer size
    usrLockedInjectCnt 用户拿到buffer的个数
    newPulseQ_cnt new_pulse_fifo_inputqueque的buffer个数
    nextTodoPulseQ_cnt next_todo_pulse_inputqueue的buffer个数
    curWorkingQ_cnt cur_working_input_queue的buffer个数
    workingTask_cnt input_working_tasklist的task个数
    lazzyRewindTask_cnt 需要retry的task个数
    bind_module_id 绑定的模块id
    bind_module_name 绑定的模块名字
    bind_ChnId 绑定模块的channel id
    bind_PortId 绑定模块的port id
    bind_Type 绑定方式:
    E_MI_SYS_BIND_TYPE_FRAME_BASE = 0x00000001,
    E_MI_SYS_BIND_TYPE_SW_LOW_LATENCY = 0x00000002,
    E_MI_SYS_BIND_TYPE_REALTIME = 0x00000004,
    E_MI_SYS_BIND_TYPE_HW_AUTOSYNC = 0x00000008,
    E_MI_SYS_BIND_TYPE_HW_RING = 0x00000010
    bind_Param 绑定的参数
    SrcFrmrate source 帧率
    DstFrmrate destination帧率
    GetFrame/Ms 实际帧数/所用时间
    FPS 实际帧率
    RewindCnt 需要retry的task个数
    usrDepth User可以拿到output port buffer的最大个数
    BufCntQuota Output 可以申请buffer的最大个数
    usrLockedCnt User实际拿到的buffer个数
    totalOutPortInUsed Outport实际申请到的buffer个数
    DrvBkRefFifoQ_cnt for special driver which need to refer back pre-processed buffer
    DrvBkRefFifoQ_size stDrvBkRefFifoQueue 所占用的buffer size总数
    UsrGetFifoQ_cnt Duplicate 到output port的buffer个数
    UsrGetFifoQ_size Duplicate 到output port的buffer所占的总大小
    UsrGetFifoQ_seqnum output拿到buffer的总数
    UsrGetFifoQ_discardnum Output由于申请新的buffer需求而遗弃原来buffer的个数
    finishedTask_cnt Output finish task的个数
    GetTotalCnt Output拿到buffer总个数
    GetOkCnt 统计index为E_MI_SYS_FRC_OBTAIN的帧数
    ISRNum 收到的中断总数


2. Echo

功能 打印接收到每一帧的PTS,如果前端是VDEC,则打印送过来的FrameID和Debug丢帧问题,正常情况下FrameID和PTS的值都是递增的。
命令 echo checkframeid [ChnID] [Status] > /proc/mi_modules/mi_divp/mi_divp0
[ChnID] 通道号 [0~32]
[Status] ON:开始打印; OFF:停止打印
举例 echo checkframeid 0 ON/OFF > /proc/mi_modules/mi_divp/mi_divp0 [MI DIVP PROCFS]:ChnID 0, receive buffer ID = 63 , H = 0, L = 196615, PTS = 43956000 [MI DIVP PROCFS]:ChnID 0, receive buffer ID = 64 , H = 0, L = 196616, PTS = 43989000 [MI DIVP PROCFS]:ChnID 0, receive buffer ID = 65 , H = 0, L = 196615, PTS = 44022000 [MI DIVP PROCFS]:ChnID 0, receive buffer ID = 66 , H = 0, L = 196615, PTS = 44055000 [MI DIVP PROCFS]:ChnID 0, receive buffer ID = 67 , H = 0, L = 196615, PTS = 44088000 [MI DIVP PROCFS]:ChnID 0, receive buffer ID = 68 , H = 0, L = 196615, PTS = 44121000 [MI DIVP PROCFS]:ChnID 0, receive buffer ID = 69 , H = 0, L = 196614, PTS = 44154000 [MI DIVP PROCFS]:ChnID 0, receive buffer ID = 70 , H = 0, L = 196615, PTS = 44187000; receive buffer ID:每个channel接收到buffer的ID。 H,L:VDEC 送来的FrameID,H高32位,L低32位,前端不是VDEC则无该打印。 PTS:FrameBuffer的PTS。
功能 统计1秒时间内GetBuffer的数量,以及每拿到两个inputbuffer之间的间隔时间的平均值,最大值,最小值,Debug丢帧问题。
命令 echo statintervaltime [ChnID] ON/OFF > /proc/mi_modules/mi_divp/mi_divp0
参数说明 [ChnID] 通道号 [0~32]
[Status] ON: 开始统计并打印; OFF: 停止统计和打印
举例 echo statintervaltime 0 ON > /proc/mi_modules/mi_divp/mi_divp0 [MI DIVP PROCFS]: ChnlID 0, 1s FrameCnt:19, Average time: 50393 us, MAX 59601 us, 57652 us,57534 us, MIN 41401 us, 42415 us, 42896 us [MI DIVP PROCFS]: ChnlID 0, 1s FrameCnt:19,Average time: 50247 us,MAX 63004 us,62889 us,62845 us,MIN 36896 us, 37120 us, 37130 us [MI DIVP PROCFS]: ChnlID 0, 1s FrameCnt:18, Average time: 51049 us, MAX 70431 us,59763 us, 59736 us, MIN 38873 us,40109 us,40283 us [MI DIVP PROCFS]: ChnlID 0,1s FrameCnt:20, Average time: 48537 us, MAX 67168 us,67117 us,66953 us, MIN 18513 us,31242 us,32681 us [MI DIVP PROCFS]: ChnlID 0,1s FrameCnt:19, Average time: 49962 us, MAX 61416 us, 61416 us, 61338 us, MIN 38564 us, 38736 us, 38762 us FrameCnt: 1秒时间GetBuffer的数量; Average time: 拿到两个buffer之间间隔时间的平均时间 ;MAX:间隔时间最大的三个值; MIN: 间隔时间最小的三个值
功能 DIVP不再处理某一个channel,以节省频宽,验证频宽相关问题
命令 echo stoponechannel [ChnID] [Status] > /proc/mi_modules/mi_divp/mi_divp0
参数说明 [ChnID] 通道号 [0~32]
[Status] ON: 停止处理设置的channel ;OFF:继续处理设置的channel
举例 echo stoponechannel 0 ON > /proc/mi_modules/mi_divp/mi_divp0
通道0的画面将会停住
功能 dump一张input frame。
命令 echo dumpframe [ChnID] [frameStorePath] > /proc/mi_modules/mi_divp/mi_divp0
参数说明 [ChnID] 通道号 [0~16]。
[ frameStorePath ] 指定保存input frame的位置。
举例 #echo dumpframe 0 /customer > /proc/mi_modules/mi_divp/mi_divp0
dump 一张 input frame保存在/customer这个路径下。
默认的input frame名字, 比如:dump_divp_chn0_frame_w_352_h_288.yuv
功能 打开mi divp的debug信息。
命令 echo debug 0/1 > /proc/mi_modules/mi_divp/mi_divp0
参数说明 [0/1] 0:表示关闭,1:表示打开。
举例 #echo debug 1 > /proc/mi_modules/mi_divp/mi_divp0 printk in _MI_SYS_IMPL_Common_WriteProc divp debug:on #echo debug 0 > /proc/mi_modules/mi_divp/mi_divp0 printk in _MI_SYS_IMPL_Common_WriteProc divp debug: off