media: tc358746: fix locking issue
In tc358746_link_validate() an attempt is made to get the state lock of the subdev, but since this is already held by the calling function v4l2_subdev_link_validate(), this leads to a deadlock. Another problem is that this function queries the link frequency of the source device. Since some image sensors use the lock of the v4l2 control handler as a state lock, which is already held at this point, a deadlock can also occur here. Move the calculation of the FIFO size from tc358746_link_validate() to tc358746_apply_misc_config() to avoid the deadlocks mentioned. Signed-off-by:Matthias Fend <matthias.fend@emfend.at> Signed-off-by:
Hans Verkuil <hverkuil@xs4all.nl>
Loading
Please sign in to comment