summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2014-01-02 09:07:29 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-02-28 14:31:02 -0300
commit6a859e09c40f09fd77411ca46d8b6ca1c08444fe (patch)
treeee0c8a997565476603fd0cb7e5367e89b130dabc /drivers/media/platform/omap
parentce0ede2c06202dace68a2f0401ebaafdaa2720d2 (diff)
downloadlinux-stable-6a859e09c40f09fd77411ca46d8b6ca1c08444fe.tar.gz
linux-stable-6a859e09c40f09fd77411ca46d8b6ca1c08444fe.tar.bz2
linux-stable-6a859e09c40f09fd77411ca46d8b6ca1c08444fe.zip
[media] omap_vout: avoid sleep_on race
sleep_on and its variants are broken and going away soon. This changes the omap vout driver to use wait_event_interruptible_timeout instead, which fixes potential race where the dma is complete before we schedule. [hans.verkuil@cisco.com: replaced interruptible_sleep_on_timeout by wait_event_interruptible_timeout in the commit msg, obvious typo] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Mauro Carvalho Chehab <m.chehab@samsung.com> Cc: linux-media@vger.kernel.org Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/omap')
-rw-r--r--drivers/media/platform/omap/omap_vout_vrfb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/platform/omap/omap_vout_vrfb.c b/drivers/media/platform/omap/omap_vout_vrfb.c
index cf1c437a8687..62e7e5783ce8 100644
--- a/drivers/media/platform/omap/omap_vout_vrfb.c
+++ b/drivers/media/platform/omap/omap_vout_vrfb.c
@@ -270,7 +270,8 @@ int omap_vout_prepare_vrfb(struct omap_vout_device *vout,
omap_dma_set_global_params(DMA_DEFAULT_ARB_RATE, 0x20, 0);
omap_start_dma(tx->dma_ch);
- interruptible_sleep_on_timeout(&tx->wait, VRFB_TX_TIMEOUT);
+ wait_event_interruptible_timeout(tx->wait, tx->tx_status == 1,
+ VRFB_TX_TIMEOUT);
if (tx->tx_status == 0) {
omap_stop_dma(tx->dma_ch);