I‘m using our cutom board using Xavier NX in R3273 to test lt6911uxe chip to realize HDMI2MIPI.
When I build the driver as module and insmod it, using ioctl to test has no problem. But when I build the driver into kernel, and there is something wrong with ioctl on subdev. But it’s ok using video0 to stream in both usage.
When use VIDIOC_SUBDEV_G_FMT, I get err info said “Inappropriate ioctl for device”
I’m very confused about it and share this issue with you. Hope I can get some help, thanks!
here is the dmesg of two different usage of the driver moudule.txt (58.5 KB) kernel.txt (58.2 KB)
Hi, Jerry
here is the test result v4l2-examine.txt (4.0 KB)
And I’m not sure this would help because in my situation devcie /dev/video0 works fine in both usage, the problem is about the /dev/v4l-subdev
Yes, I can use gsteamer to get the hdmi-in video with no problem. Ths issue is our program will firstly use VIDIOC_SUBDEV_G_FMT to get video resolution from sub device node (/dev/v4l-subdev1) and it will get error in this stage if I build this driver inside kernel rather than build as module
our board’s L4T version is
R32(release), REVISION: 7.3, GCID:31982016, BOARD: t186ref, EABI: aarch64,
By the way, this driver works fine in our another board using NANO in the same L4T version. And I’m comfirmed that the kernel config is not changed between NANO and Xavier NX’s kernel.
I know nano and xavier nx boot in different flow, but I noticed that in xavier nx, the driver probed in a early time than nano.(in nano driver probed at about 6s after kernel boot, and in xavier nx it’s about 3s).
Is this will affect v4l2 subdev function?
this is helpful information. since you did not seen this with loadable kernel module as well, it may due to driver isn’t ready to cause such issue.
you may try adding some delay in kernel side for loading the driver later to workaround this.
I add 1s and 2s delay in driver init stage, but it still not fix the problem.
Here is the dmesg of nano and xavier nx, and I found a differences between them
This is xavier nx build-in driver probe, and subdev uih,lt6911uxe bound is beforesubdev 15a00000.nvcsi
[ 5.949900] tegra194-vi5 15c10000.vi: using default number of vi channels, 36
[ 5.952757] tegra194-vi5 15c10000.vi: initialized
[ 5.957116] tegra194-vi5 15c10000.vi: subdev uih,lt6911uxe 8-002b bound
[ 5.957135] tegra194-vi5 15c10000.vi: subdev 15a00000.nvcsi--1 bound
And this is in xavier nx, insmod the driver module, subdev uih,lt6911uxe bound is aftersubdev 15a00000.nvcsi