Skip to main content
This section outlines the process to verify the function of the VPU driver. You can use the commands and samples provided in this section to:
  • Verify if the VPU driver is successfully loaded
  • Verify if decoding/encoding is successfully offloaded to the VPU
  • Debug the VPU driver, firmware, and GStreamer video plugins
The following workflow diagram shows the sequence to verify the VPU driver:
Figure: Workflow to verify the VPU driver

Figure: Workflow to verify the VPU driver

The workflow diagram outlines the sequential steps involved in initializing and validating the VPU driver:
  1. Boot up the driver to begin the startup process and initialize the VPU driver.
  2. Verify if the VPU driver is successfully loaded into the video system.
  3. Verify if the video decoding and encoding tasks are appropriately handled by the VPU.
  4. Run use cases to validate the VPU functionality.

Verify if VPU driver is loaded on qcom-multimedia-proprietary-image

The kernel image loads the VPU driver. You can use the lsmod or udevadm commands to check if the VPU driver loads successfully on qcom-multimedia-proprietary-image.

Verify using the lsmod command

  1. Run the lsmod command on the device shell:
    lsmod | grep -i "iris_vpu"
    
  2. To verify that the VPU driver is loaded successfully, review the sample output and ensure that an entry for iris_vpu is available under the Module column:
    Module    Size    Used by
    iris_vpu   585728    0
    

Verify using the udevadm command

  1. Run the udevadm command on the device shell:
    udevadm info -n /dev/video*
    
  2. To verify that the VPU is loaded successfully, review that the following sample output shows msm_vidc_decoder and msm_vidc_encoder against the ID_V4L_PRODUCT tag:
    P: /devices/platform/soc@0/aa00000.video-codec/video4linux/video32
    M: video32
    R: 32
    U: video4linux
    D: c 81:0
    N: video32
    L: 0
    S: v4l/by-path/platform-aa00000.video-codec-video-index0
    E: DEVPATH=/devices/platform/soc@0/aa00000.video-codec/video4linux/video32
    E: DEVNAME=/dev/video32
    E: MAJOR=81
    E: MINOR=0
    E: SUBSYSTEM=video4linux
    E: USEC_INITIALIZED=3749470
    E: ID_V4L_VERSION=2
    E: ID_V4L_PRODUCT=msm_vidc_decoder
    E: ID_V4L_CAPABILITIES=:
    E: ID_PATH=platform-aa00000.video-codec
    E: ID_PATH_TAG=platform-aa00000_video-codec
    E: ID_FOR_SEAT=video4linux-platform-aa00000_video-codec
    E: DEVLINKS=/dev/v4l/by-path/platform-aa00000.video-codec-video-index0
    E: TAGS=:seat:uaccess:
    E: CURRENT_TAGS=:seat:uaccess:
    |
    P: /devices/platform/soc@0/aa00000.video-codec/video4linux/video33
    M: video33
    R: 33
    U: video4linux
    D: c 81:1
    N: video33
    L: 0
    S: v4l/by-path/platform-aa00000.video-codec-video-index1
    E: DEVPATH=/devices/platform/soc@0/aa00000.video-codec/video4linux/video33
    E: DEVNAME=/dev/video33
    E: MAJOR=81
    E: MINOR=1
    E: SUBSYSTEM=video4linux
    E: USEC_INITIALIZED=3749498
    E: ID_V4L_VERSION=2
    E: ID_V4L_PRODUCT=msm_vidc_encoder
    E: ID_V4L_CAPABILITIES=:
    E: ID_PATH=platform-aa00000.video-codec
    E: ID_PATH_TAG=platform-aa00000_video-codec
    E: ID_FOR_SEAT=video4linux-platform-aa00000_video-codec
    E: DEVLINKS=/dev/v4l/by-path/platform-aa00000.video-codec-video-index1
    E: TAGS=:seat:uaccess:
    E: CURRENT_TAGS=:seat:uaccess:
    

Note:

To identify the device nodes, check the DEVNAME tag. In the earlier example, /dev/video32 corresponds to the VPU decoder node and /dev/video33 corresponds to the VPU encoder node.

Verify if VPU driver is loaded on qcom-multimedia-image

The kernel image loads the VPU driver. You can use the lsmod and udevadm commands to check if the VPU driver loads successfully on qcom-multimedia-image.

Verify using the lsmod command

  1. Run the following lsmod command on the device shell for Dragonwing IQ-8275, Dragonwing IQ-9075, QCS6490:
    lsmod | grep -i "qcom_iris"
    
  2. To verify that the VPU driver is loaded successfully, review the sample output and ensure that an entry for qcom_iris is available under the Module column:
    Module    Size    Used by
    qcom_iris   585728    0
    
  3. Run the following lsmod command on the device shell for QCS615:
    lsmod | grep -i "venus"
    
  4. To verify that the VPU driver is loaded successfully, review the sample output and ensure that an entry for venus is available under the Module column:
    Module    Size    Used by
    venus_enc   28672    0
    venus_dec   28672    0
    

Verify using the udevadm command

  1. Run the udevadm command on the device shell:
    udevadm info -a -n /dev/video*
    

    Note:

    Run the udevadm info -a -n /dev/video<0 to 27> command on all available video nodes.

  2. To verify that the VPU is loaded successfully for Dragonwing IQ-8275/Dragonwing IQ-9075/ QCS6490, review that the sample output shows qcom-iris-decoder and qcom-iris-encoder against available video devices:
    '/devices/platform/soc@0/aa00000.video-codec/video4linux/video0':
    KERNEL=="video0"
    SUBSYSTEM=="video4linux"
    DRIVER==""
    ATTR{dev_debug}=="0"
    ATTR{index}=="0"
    ATTR{name}=="qcom-iris-decoder"
    ATTR{power/control}=="auto"
    ATTR{power/runtime_active_time}=="0"
    ATTR{power/runtime_status}=="unsupported"
    ATTR{power/runtime_suspended_time}=="0"
    
  3. To verify that the VPU is loaded successfully for QCS615, review that the sample output shows qcom-venus-decoder and qcom-venus-encoder against available video devices:
    '/devices/platform/soc@0/aa00000.video-codec/video4linux/video0':
    KERNEL=="video0"
    SUBSYSTEM=="video4linux"
    DRIVER==""
    ATTR{dev_debug}=="0"
    ATTR{index}=="0"
    ATTR{name}=="qcom-venus-decoder"
    ATTR{power/control}=="auto"
    ATTR{power/runtime_active_time}=="0"
    ATTR{power/runtime_status}=="unsupported"
    ATTR{power/runtime_suspended_time}=="0"
    

Verify if decoding and encoding are offloaded on qcom-multimedia-proprietary-image

To confirm if video decoding or encoding is successfully offloaded to the VPU:
  1. Run the following command in a loop:
cat /proc/interrupts | grep "msm-vidc"
Sample output:
253: 4        0        0        0        0        0        0        0     GICv3 206 Level  msm-vidc
  1. Verify that the interrupt count from msm-vidc increases on any CPU while the decoding or encoding use case is running.

Verify if decoding/encoding is offloaded on qcom-multimedia-image

To confirm if the video decoding or encoding is successfully offloaded to the VPU:
  1. Run the following command in a loop for Dragonwing IQ-8275/Dragonwing IQ-9075/QCS6490:
cat /proc/interrupts | grep "iris"
Sample output:
253: 4        0        0        0        0        0        0        0     GICv3 206 Level  iris
  1. Verify that the interrupt count from iris increases on any CPU while the decoding or encoding use case is running.
  2. Run the following command in a loop for QCS615:
cat /proc/interrupts | grep "venus"
Sample output:
253: 4        0        0        0        0        0        0        0     GICv3 206 Level  venus
  1. Verify that the interrupt count from venus increases on any CPU while the decoding or encoding use case is running.

Debug video

If you face an issue while running a video decode or encode use case, debugging can help identify the root cause.

Debug the VPU driver

This section provides the commands to use, debug log levels, and log value information that helps in debugging the VPU driver and firmware. The following workflow diagram shows the sequence to debug the VPU driver and firmware:
Figure: Debug VPU workflow

Figure: Debug VPU workflow

This workflow outlines the procedure to capture debug logs from the VPU:
  1. Mount the debug file system to start the debug process.
  2. Choose the preferred log level.
  3. Configure the log levels for the VPU driver and/or the firmware as needed.
  4. Apply the chosen log level using the debugfs node.
  5. Start capturing logs for both the VPU driver and the firmware.
Follow the steps to debug the VPU driver and firmware:
  1. Mount the debugfs node using the following command:
    mount -t debugfs none /sys/kernel/debug/
    
  2. Choose the VPU driver debug log level and debug log value as listed in the following table. You can also select multiple debug log levels by using the bitmask of debug log values.
Table: VPU driver debug log levels and values
Debug log levelDebug log value
VIDC_ERR0x00000001
VIDC_HIGH0x00000002
VIDC_LOW0x00000004
VIDC_PERF0x00000008
VIDC_PKT0x00000010
VIDC_BUS0x00000020
VIDC_STAT0x00000040
VIDC_ENCODER0x00000100
VIDC_DECODER0x00000200
VIDC_PRINTK0x10000000
VIDC_FTRACE0x20000000

Note: The VPU driver sets the default debug level to VIDC_ERR and limits debug logs to error scenarios.
  1. Set the VPU driver debug log value to the /sys/module/iris_vpu/parameters/msm_vidc_debug node. The sample command to activate all message levels:
    echo 0x1000037F > /sys/module/iris_vpu/parameters/msm_vidc_debug
    
  2. Choose the VPU firmware debug log level and debug log value as listed in the following table. You can also select many debug log levels by using the bitmask of debug log values.
Table: VPU firmware debug log levels and values
Debug log levelDebug log value
FW_LOW0x00000001
FW_MED0x00000002
FW_HIGH0x00000004
FW_ERROR0x00000008
FW_FATAL0x00000010
FW_PERF0x00000020
FW_CACHE_LOW0x00000100
FW_CACHE_MED0x00000200
FW_CACHE_HIGH0x00000400
FW_CACHE_ERROR0x00000800
FW_CACHE_FATAL0x00001000
FW_CACHE_PERF0x00002000
FW_PRINTK0x10000000
FW_FTRACE0x20000000

Note: The VPU firmware debug logs are limited to error and fatal scenarios, and the default debug level is set to `FW_ERROR | FW_FATAL`.
  1. Set the VPU firmware debug log value to the /sys/module/iris_vpu/parameters/msm_fw_debug node. Sample command to activate all message levels:
    echo 0x1000037F > /sys/module/iris_vpu/parameters/msm_fw_debug
    
  2. Start capturing kernel messages for both the VPU driver and the firmware using the following command in device shell and run the use case:
    cat /proc/kmsg or dmesg -w
    

Note:

  • The debug video instructions provided in this section are applicable only to qcom-multimedia-prop-image.
  • No debug logs are available in the qcom-multimedia-image of the Adreno VPU driver.
  • To debug the Adreno video driver on qcom-multimedia-image, add dev_err logs in the driver source and build the qcom-multimedia-image.
  • For more information, see VPU driver build instructions for qcom-multimedia-image.

Debug the GStreamer plugins

Qualcomm GStreamer video plugins are compliant with the standard GStreamer framework. For information on the debugging these GStreamer plugins, see Debugging tools.