Correction: it’s the VIDIOC_TRY_FMT and VIDIOC_S_FMT ioctls which are failing. Initialization of the stream number is missing in __tegra_channel_try_format and __tegra_channel_set_format.
We are using the V4L2 API on our custom hardware. The kernel was also compiled with custom configuration options.
following upstream commit bb15c827, V4L2 core no longer automatically resets this field to zero for single-stream subdevices.
a nonzero uninitialized value therefore causes validation to return -EINVAL before the sensor callback is called.
let’s give it a try with zero-initializing the structure in both functions, i.e. struct v4l2_subdev_format fmt = { 0 };