Hi,
my goal is to enable HEVC decoding on a RPI4 running Balena OS.
I previously was able to make a patched FFMPEG work on the same RPI4 board with an Ubuntu 20.04 server for RPI4 distribution, following the instructions here: https://github.com/jc-kynesim/rpi-ffmpeg/tree/dev/4.3.1%2Fdrm_prime_1.
With Balena OS
Now looking at dmesg (both with the prebuilt image and with the self made image) I notice the vc_sm_cma_vchi_init error and no /dev/videoX devices initialized:
[ 15.638816] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Registers at 0xfeb00000 length 0x00010000
[ 15.686483] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00001000
[ 15.738116] mc: Linux media interface: v0.10
[ 15.739213] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x00010000
[ 15.781821] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x00010000
[ 15.810891] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[ 15.844259] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ 15.864135] [vc_sm_connected_init]: start
[ 15.883729] vc_sm_cma_vchi_init: failed to open VCHI service (-1)
[ 15.883739] [vc_sm_connected_init]: failed to initialize shared memory service
On Ubuntu 20.04 server instead:
8.776970] rpivid-mem feb00000.hevc-decoder: rpivid-hevcmem initialised: Registers at 0xfeb00000 length 0x00010000
[ 8.777171] rpivid-mem feb10000.rpivid-local-intc: rpivid-intcmem initialised: Registers at 0xfeb10000 length 0x00001000
[ 8.777339] rpivid-mem feb20000.h264-decoder: rpivid-h264mem initialised: Registers at 0xfeb20000 length 0x00010000
[ 8.777501] rpivid-mem feb30000.vp9-decoder: rpivid-vp9mem initialised: Registers at 0xfeb30000 length 0x00010000
[ 8.824418] vc_sm_cma: module is from the staging directory, the quality is unknown, you have been warned.
[ 8.825008] vc_sm_cma: module verification failed: signature and/or required key missing - tainting kernel
[ 8.826000] bcm2835_vc_sm_cma_probe: Videocore shared memory driver
[ 8.826009] [vc_sm_connected_init]: start
[ 8.829893] [vc_sm_connected_init]: installed successfully
…
[ 9.086728] bcm2835-codec bcm2835-codec: Device registered as /dev/video10
[ 9.086755] bcm2835-codec bcm2835-codec: Loaded V4L2 decode
[ 9.091218] bcm2835-codec bcm2835-codec: Device registered as /dev/video11
[ 9.091250] bcm2835-codec bcm2835-codec: Loaded V4L2 encode
[ 9.100934] bcm2835-codec bcm2835-codec: Device registered as /dev/video12
[ 9.100979] bcm2835-codec bcm2835-codec: Loaded V4L2 isp
I wonder what I need to flag on before the custom image build to enable the /dev/videoX devices.
If only I had that then I would modify the config.txt and enable the /dev/video19 which is used for HEVC decode.