# Verify and debug
The following workflow outlines the process to verify the function of the VPU driver.
**Figure : Workflow to verify the VPU driver**
The commands and samples provided here enable you to verify the following:
- VPU driver is successfully loaded
- Decoding/encoding is offloaded to the VPU
## Verify if the VPU driver is successfully loaded
The VPU driver is loaded as part of the kernel image. You can confirm whether the VPU driver is loaded successfully by executing either of the following commands:
### Using lsmod command
1. Run the following `lsmod` command on the device shell:
lsmod | grep -i "iris"
Copy to clipboard
2. To verify if the VPU driver is successfully loaded, 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
Copy to clipboard
### Using udevadm command
1. Run the following command on the device shell and verify if the output shows `msm_vidc_decoder` and `msm_vidc_encoder` against the `ID_V4L_PRODUCT` tag.
udevadm info -n /dev/video*
Copy to clipboard
2. To verify whether the VPU is successfully loaded, review the following sample output:
P: [/devices/platform/soc@0/aa00000.video-codec/video4linux/video32](mailto:/devices/platform/soc%400/aa00000.video-codec/video4linux/video32)
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](mailto:DEVPATH=/devices/platform/soc%400/aa00000.video-codec/video4linux/video32)
E: DEVNAME=/dev/video32
E: MAJOR=81
E: MINOR=26
E: SUBSYSTEM=video4linux
E: USEC\_INITIALIZED=6690806
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
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=27
E: SUBSYSTEM=video4linux
E: USEC\_INITIALIZED=6686892
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 for the `DEVNAME` tag. In the earlier example, the `/dev/video32` is for the VPU decoder node and `/dev/video33` is for the VPU encoder node.
## Verify if the decoding/encoding is offloaded to the VPU
You can confirm if the video decoding or encoding is successfully offloaded to the VPU by doing the following:
- Run the following command as a loop:
cat /proc/interrupts | grep "msm-vidc"
Copy to clipboard
- The following is the sample output that helps you verify whether the video decoding/encoding is offloaded to the VPU. Verify if the interrupt count from `msm-vidc` increases across any CPU when the use case is running:
253: 4 0 0 0 0 0 0 0 GICv3 206 Level msm-vidc
## Debug
The methods to debug the VPU driver and firmware, and the GStreamer video plugins are provided in the following sections.
### Debug VPU
**Figure : Debug VPU workflow**
To debug the VPU driver and VPU firmware, do the following:
1. Mount the `debugfs` node, using the following command:
mount -t debugfs none /sys/kernel/debug/
Copy to clipboard
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.
| Debug log level | Debug log value |
| --- | --- |
| VIDC\_ERR | 0x00000001 |
| VIDC\_HIGH | 0x00000002 |
| VIDC\_LOW | 0x00000004 |
| VIDC\_PERF | 0x00000008 |
| VIDC\_PKT | 0x00000010 |
| VIDC\_BUS | 0x00000020 |
| VIDC\_STAT | 0x00000040 |
| VIDC\_ENCODER | 0x00000100 |
| VIDC\_DECODER | 0x00000200 |
| VIDC\_PRINTK | 0x10000000 |
| VIDC\_FTRACE | 0x20000000 |
Note
The VPU driver debug logs are limited to error scenarios, and the default debug level is set to `VIDC_ERR`.
3. Set the VPU driver debug log value to the `/sys/module/iris_vpu/parameters/msm_vidc_debug` node.
The following is a sample command to enable all message levels:
echo 0x1000037F > /sys/module/iris_vpu/parameters/msm_vidc_debug
Copy to clipboard
4. Choose the VPU firmware 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.
| Debug log level | Debug log value |
| --- | --- |
| FW\_LOW | 0x00000001 |
| FW\_MED | 0x00000002 |
| FW\_HIGH | 0x00000004 |
| FW\_ERROR | 0x00000008 |
| FW\_FATAL | 0x00000010 |
| FW\_PERF | 0x00000020 |
| FW\_CACHE\_LOW | 0x00000100 |
| FW\_CACHE\_MED | 0x00000200 |
| FW\_CACHE\_HIGH | 0x00000400 |
| FW\_CACHE\_ERROR | 0x00000800 |
| FW\_CACHE\_FATAL | 0x00001000 |
| FW\_CACHE\_PERF | 0x00002000 |
| FW\_PRINTK | 0x10000000 |
| FW\_FTRACE | 0x20000000 |
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`.
5. Set the VPU firmware debug log value to the `/sys/module/iris_vpu/parameters/msm_fw_debug` node.
The following is a sample command to enable all message levels:
echo 0x1000037F > /sys/module/iris_vpu/parameters/msm_fw_debug
Copy to clipboard
6. Start capturing kernel messages for both the VPU driver and the firmware using the following command and run the use case:
cat /proc/kmsg
Copy to clipboard
### Debug GStreamer plugins
Qualcomm GStreamer video plugins are compliant with the standard GStreamer framework. For information on the debug methods for the GStreamer plugins, see [Debug GStreamer Plugins](https://gstreamer.freedesktop.org/documentation/tutorials/basic/debugging-tools.html).
Last Published: Dec 30, 2024
[Previous Topic
Software](https://docs.qualcomm.com/bundle/publicresource/80-70017-20/topics/software.md) [Next Topic
Detailed capabilities and feature descriptions](https://docs.qualcomm.com/bundle/publicresource/80-70017-20/topics/feature-descriptions.md)