Just moved to
+Linux4Tegra release: R32.7.3
+JetPack release: 4.6.3
And the first open of the decoder device /dev/nvhost-nvdec now takes about 1 minute.
Ex:
// slow on the first call
int fd = v4l2_open("/dev/nvhost-nvdec" , O_NONBLOCK | O_RDWR);
The same behavior can be seen from the command line if you start nvdec to first time:
time echo on > /sys/devices/13e10000.host1x/15480000.nvdec/power/control
real 1m1.904s
user 0m0.000s
sys 0m0.000s
Has anyone else experienced this?
Where to start looking?
Thanks for your time!
DaneLLL
September 11, 2023, 5:13am
3
Hi,
We have two samples demonstrating hardware coding:
/usr/src/jetson_multimedia_api/samples/00_video_decode
/usr/src/jetson_multimedia_api/samples/unittest_samples/decoder_unit_sample
We don’t see this issue while running the samples. You may give it a try and see if the issue occurs.
Thanks Dane, i see the issue also with the sample codes, they both perform the same operation i described:
int fd = v4l2_open("/dev/nvhost-nvdec" , O_NONBLOCK | O_RDWR);
I’ve continued examining what happens and it appears that:
The NVDEC firmware is not loaded at bootup, load is triggered by the v4l2_open(…) call
The firmware load times out after 60s but the NVDEC is surprisingly funcitoning after that
To my understanding,
open(…) triggers driver to request the firmware “tegra18x/nvhost_nvdec_bl030_prod.fw”
kernel sends an event to udev asking for the firmware
udev appears to timeout on on ADD
udevadm monitor --property
KERNEL[30.980823] add /devices/13e10000.host1x/15480000.nvdec/firmware/tegra18x!nvhost_nvdec_bl030_prod.fw (firmware)
ACTION=add
DEVPATH=/devices/13e10000.host1x/15480000.nvdec/firmware/tegra18x!nvhost_nvdec_bl030_prod.fw
SUBSYSTEM=firmware
FIRMWARE=tegra18x/nvhost_nvdec_bl030_prod.fw
TIMEOUT=60
ASYNC=0
SEQNUM=3644
UDEV [30.981783] add /devices/13e10000.host1x/15480000.nvdec/firmware/tegra18x!nvhost_nvdec_bl030_prod.fw (firmware)
ACTION=add
DEVPATH=/devices/13e10000.host1x/15480000.nvdec/firmware/tegra18x!nvhost_nvdec_bl030_prod.fw
SUBSYSTEM=firmware
FIRMWARE=tegra18x/nvhost_nvdec_bl030_prod.fw
TIMEOUT=60
ASYNC=0
SEQNUM=3644
USEC_INITIALIZED=30981664
Above operation hangs for 60s (presumably hitting the timeout time).
DaneLLL
September 11, 2023, 8:47am
5
Hi,
Please check if you observe the issue while running default 00_video_decode or decoder_unit_sample. We would expect default samples work well. If it does not work in your setup, we would suggest re-flash system image and you can upgrade to Jetpack 4.6.4(r32.7.4)
Yes, the same issue is observed.
kayccc
September 25, 2023, 6:04am
7
Sorry for the late response, have you managed to get issue resolved or still need the support? Thanks
hey, yes thanks! It was unrelated to anything in vanilla L4T, so not a general issue.