ISP Debug SOP


REVISION HISTORY

Revision No.
Description
Date
1.0
  • Initial release
  • 12/10/2024

    Introduction

    This document is written for FAE and software development personnel, aiming to introduce how to conduct preliminary troubleshooting when customers encounter ISP-related issues during the development process, and to provide relevant information to RD for analysis after confirming it is a Sigmastar SDK issue.


    1. Frame Drops, Unstable Frame Rate

    1. Check if the incoming frame rate from the front end meets the requirements; if not, address it at the front end.

    2. Use cat /proc/mi_modules/mi_isp/debug_hal/isp_ints to check if the P0_FIFO_FULL field has increased to determine if a FIFO full has occurred.

    3. Use cat /proc/mi_modules/mi_isp/mi_isp0 to check output port common info,

      BufCntQuota: Total buffer count requested by the user.

      usrLockedCnt: Buffer count in the user's hands; a high cumulative value indicates that the customer is slow in putting buffers.

      totalOutPortInUsed: A high cumulative value indicates that the customer's subsequent processing is not fast enough.

      GetIntoMmaLackCnt: Buffer count that failed to be allocated due to insufficient memory, which may lead to frame drops.

    2. ISP FIFO FULL

    1. If vif-isp is in frame mode, it is unrelated to ISP; generally, the VIF writing speed to DRAM is too slow, and you need to check if the bandwidth is sufficient. Please seek assistance from the VIF & MIU owner.

    2. If vif-isp is in real-time mode, check if the sensor pixel rate is too high or if the v-blanking is too long.

    3. Use cat /sys/devices/system/miu/miu0/bw to check the current bandwidth and determine if there is a bandwidth shortage.

    4. Provide the serial log to RD to determine if the issue is caused by subsequent processing.

    3. Cmdq Timeout

    1. Modify /config/modparam.json to disable cmdq timeout reset first.

      "E_MI_MODULE_ID_SYS" :
          {
              ...
              "bEnableCmdqReset" : false
              ...
          },
      
    2. Use cat /proc/mi_modules/mi_isp/debug_hal/isp_ints to check the ISPIF_VSYNC field; if it is 0, it indicates that the front end has not sent data, and you need to seek assistance from the front end.

    3. In other cases, please save all logs and use the following script to dump registers for RD analysis: dump_isp.sh

    4. Image Quality Issues

    4.1 Flower Pattern

    1. Turn off WDR or 3DNR and run again to see if it can be reproduced, to identify the IP.

    2. Check if the raw image output from the sensor has a flower pattern.

    3. Use cat /proc/mi_modules/mi_isp/debug_hal/isp_ints to check if a FIFO full has occurred.

    4.2 High-Resolution Sensor, ISP Receiving with Multi Dev, Image Stitching Issues

    Check if the stitching seams are more apparent when facing a light source; if turning off WDR eliminates the seams, check if the overlap is large enough, verify if the LPF is enabled, and try increasing the WDR box number to see if there is any improvement.

    5. 3A Issues

    5.1 Uncontrolled Brightness

    Confirm with the sensor driver whether shutter/gain/AE notifications have been received; if not, please seek RD analysis.

    5.2 Brightness Fluctuation

    Use the IQ Tool to confirm the effective frames from the sensor and compare them with the sensor gain/shutter delay set in the sensor driver; if they match, please seek RD analysis.

    6. Add WQ Error Information Appears

    1. Check if other threads have high CPU loading, causing the ISP thread to be unable to be processed.

    2. Check the CPU usage of the ISP IRQ to see if other IRQs are growing rapidly, which may affect the processing of the ISP IRQ.

    3. Use GDB or sys's show thread to check the stack of the stuck thread to confirm if there are issues such as deadlocks or untimely CPU scheduling; use perf to capture flame graphs to clarify if there are other IRQs refreshing quickly affecting the ISP IRQ situation.