Genio-520 (MT8371) VPU hardware decoder not working

Hello,

We are working with MediaTek Genio-520 EVK (MT8371) and facing an issue where VPU hardware decoding is not functional, while the same software stack works correctly on Genio-510 (MT8370).

Below are the observations and differences we found. We would appreciate your guidance on what is missing or needs to be enabled for MT8371.

Working Platform
Board: Genio-510 EVK
SoC: MT8370
Kernel: 6.6.37-mtk
Result: VPU hardware decoding works
G510 – dmesg output
read_img: vpu_fw request_firmware cam_vpu1 success
read_img: vpu_fw request_firmware cam_vpu2 success
read_img: vpu_fw request_firmware cam_vpu3 success
apusys_load_image: vpu_fw request_firmware mediatek/mt8370/apusys.sig.img success
vpu_probe: succeed
G510 – runtime
/sys/class/devfreq/soc:vpu_devfreq
G510 – firmware present
/lib/firmware/mediatek/mt8370/
├─ cam_vpu1.img
├─ cam_vpu2.img
├─ cam_vpu3.img
└─ apusys.sig.img
Non-working Platform
Board: Genio-520 EVK
SoC: MT8371
Kernel: 6.6.37-mtk
Result: Hardware decoder not used (software decode only)
G520 – dmesg output
mvpu_init: register platform driver pass
mtk-apu: creating channel mvpu-tx-rpmsg
[VCU] mtk_vcu_open name: vpud
Missing on G520

No vpu_fw request_firmware
No vpu_probe: succeed
No soc:vpu_devfreq
G520 – firmware check
/lib/firmware/mediatek/
├─ apusys.sig.img
└─ mt8371/apusys.sig.img
:cross_mark: No cam_vpu*.img for MT8371

Kernel Configuration
The following options are enabled in kernel:

CONFIG_MTK_VPU=y
CONFIG_MTK_VPU_FW=y
CONFIG_MTK_VPU_DEVFREQ=y
However:

/sys/class/devfreq/soc:vpu_devfreq is not created
request_firmware(cam_vpu*) is never triggered
Questions / Clarification Needed
Does MT8371 (Genio-520) require cam_vpu*.img firmware similar to MT8370?

If yes, where can we obtain the correct MT8371 VPU firmware?
Is VPU camera/codec firmware intentionally not provided for MT8371 in current BSP?

Are additional device-tree nodes required to enable VPU firmware loading on MT8371?

If possible, could you share the required DT bindings or reference DTS?
Is mvpu + VCU support sufficient for video decode on MT8371, or is classic vpu_core not supported?

Is hardware video decode officially supported on Genio-520 in the current Linux BSP?

If yes, which components must be enabled (firmware / DT / userspace)?
Summary
VPU hardware exists on MT8371
Kernel driver loads (mvpu_init)
But firmware is not loaded
No devfreq node is created
Hardware decoder is not used
We would appreciate clarification on missing firmware, DT requirements, or BSP limitations for enabling VPU hardware decoding on Genio-520.

Thank you for your support.

Yes, we support HW video decode on Genio-520.
Please refer to the web doc:

And video decoder does not need cam_vpu*.img.

Hi @macross.chen ,

I am attempting to decode an H.264 encoded video stream using hardware acceleration on my system. However, the pipeline fails to utilize the hardware decoder and consistently falls back to software-based decoding, or fails to initialize entirely with an error.

Command Executed:

gst-launch-1.0 filesrc location=raw.h264 ! \
  h264parse config-interval=1 ! \
  v4l2h264dec ! videoconvert ! autovideosink

Observed Behavior:

  • The v4l2h264dec element is failing to process the stream.

  • System logs indicate a fallback to software libraries.

  • occuring with a specific error “Internal data stream error.”

I have attached following scenario i tried and there observations for the hardware H.264 encoder and decoder on the Genio-520 platform are functional using GStreamer, and to compare behavior with software decoding.


Step 1: Hardware H.264 Encoding Validation (Camera → H.264 File)

The following pipeline is used to validate hardware-based H.264 encoding using v4l2h264enc with a USB camera (/dev/video2).

gst-launch-1.0 -e -v \
v4l2src device=/dev/video2 ! \
videoconvert ! \
video/x-raw,format=NV12,width=640,height=480,framerate=30/1 ! \
v4l2h264enc extra-controls="controls,h264_profile=0" ! \
h264parse config-interval=1 ! \
filesink location=test_baseline.h264

Result

  • H.264 file test_baseline.h264 is successfully generated.

  • Confirms that camera capture + hardware H.264 encoder are working correctly.


Step 2: Hardware H.264 Decoding Validation (File → Display)

The encoded H.264 file is decoded using the hardware decoder v4l2h264dec and displayed using Wayland sink.

gst-launch-1.0 -v \
filesrc location=test_baseline.h264 ! \
h264parse ! \
v4l2h264dec ! \
gtkwaylandsink

Result

  • Pipeline fails / video is not rendered.

  • Indicates hardware H.264 decoder is not functional on this platform.


Step 3: Software H.264 Decoding Validation (File → Display)

The same H.264 file is decoded using the software decoder avdec_h264.

gst-launch-1.0 -v \
filesrc location=test_baseline.h264 ! \
h264parse ! \
avdec_h264 ! \
gtkwaylandsink

Result

  • Video plays successfully.

  • Confirms that:

    • The H.264 bitstream is valid

    • Display pipeline and Wayland sink are functional

    • Failure is not related to the encoder, camera, or file format


Conclusion

  • Hardware H.264 encoding (v4l2h264enc) works correctly

  • Hardware H.264 decoding (v4l2h264dec) does not work

  • Software decoding (avdec_h264) works reliably

  • This strongly indicates a hardware decoder / driver / firmware issue, not a GStreamer pipeline or caps negotiation issue.

    This is the error signature i am observing when i use hardware decoder.

Thank you for your support.