]> git.baikalelectronics.ru Git - kernel.git/commit
OMAPDSS: DSI: improve wait_for_bit_change
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 13 Oct 2011 16:06:49 +0000 (19:06 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 2 Dec 2011 06:54:19 +0000 (08:54 +0200)
commit1d72cf1c52b9a2d135fee0a891798d8b50250648
tree15e69db9224b26d797fa360593862ec382dbc467
parent15905a0db5382f8a6b794e846a1e9ce9060af499
OMAPDSS: DSI: improve wait_for_bit_change

We sometimes get timeout when disabling the DSI interface with video
mode. It looks like the disable will stall until the current frame has
been finished, and this can take multiple milliseconds.

wait_for_bit_change() currently uses a busyloop to wait for a bit to
change. This is used in multiple places. The problem is, we don't have
clear understanding how long particular operations can take, so the
function needs to support longer waits.

Improve wait_for_bit_change() to first busy loop for 100 times to see if
the bit changes almost right away. If the bit hasn't changed, move to a
loop with a sleep of 1ms, and poll for 500ms.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dsi.c