OSDN Git Service

media: ti-vpe: cal: improve wait for stop-state
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Wed, 25 Mar 2020 12:15:09 +0000 (13:15 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Tue, 14 Apr 2020 10:51:47 +0000 (12:51 +0200)
commit355357457a5880ddeb776e0f61bbb74f49dc5f4c
treecdef3c0e2913583f706fa7828c4355b2c1819d17
parentc17013918a217cea51ecc4925953d640b0dc8858
media: ti-vpe: cal: improve wait for stop-state

Sometimes there is a timeout when waiting for the Stop-State.  Testing
shows that sometimes we need to wait more than what the current code
does. It is not clear how long this wait can be, but it is based on how
quickly the sensor provides a valid clock, and how quickly CAL syncs to
it.

Change the code to make it more obvious how long we'll wait, and set a
wider range for usleep_range. Increase the timeout to 750ms.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/ti-vpe/cal.c