Commit 7d8fa0ee authored by Matthias Fend's avatar Matthias Fend Committed by Hans Verkuil
Browse files

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: default avatarMatthias Fend <matthias.fend@emfend.at>
Signed-off-by: default avatarHans Verkuil <hverkuil@xs4all.nl>
parent 78d7265e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment