I’ve got an odd error with the V4L2 driver on the TX2 kernel. It didn’t exist on the TX1 kernel, so I wonder if there is a break in the V4L2 implementation that’s been introduced between 3.6 and 4.4? The issue is that I get a kernel panic when setting a standard V4L2 control that is created in the same way that it was in the 3.6 driver, and seemingly the same as the other camera drivers.
I was getting this previously when setting the EDID since that call was setting the integer control. I removed that control call which fixed it, but now I’m getting the same error through a direct ioctl call.
The control is created as follows:
state->detect_tx_5v_ctrl = v4l2_ctrl_new_std(&state->hdl, NULL,
V4L2_CID_DV_RX_POWER_PRESENT, 0, 1, 0, 0);
I’ve added print statements around it to determine if the memory is being freed, but it doesn’t seem to be. Could it be memory corruption from some other bug in the driver, or do you think this is a fault in the kernel?
I thought about that and tried it. It makes no difference. The issue is occurring due to the mutex handle being null for some reason. I’ve been talking to the maintainer of the V4L driver in the Kernel and he currently believes the issue may be within the NVidia driver rather than within the camera driver or V4L source.
I’m currently building some kernels with debug messages to try and determine precisely what it is that’s failing.
I have added some debugging statements to try and pin down where the issue is. The pointers that are pertinent are as follows:
At the time the fault occurs:
The “master” control (as defined by ctrl->cluster[0]) is at ffffffc1f42a8900.
The handler within this control is at ffffffc1f61319b8.
The mutex within the handler is at ffff00c1f61319b8.
At the time the control is created the handle to the control is returned as ffffffc1f42a8700.
The related Oops for this information is as follows: