]> git.baikalelectronics.ru Git - kernel.git/commit
media: am437x-vpfe: Wait for end of frame before tear-down
authorBenoit Parrot <bparrot@ti.com>
Fri, 20 Sep 2019 17:05:45 +0000 (14:05 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 1 Oct 2019 19:10:03 +0000 (16:10 -0300)
commit7f322d1507e2879127f8b97bbe068e7deaf5d69d
treed0838f8a6f48d67655e54335d5565fc9c7750ac6
parentd3b108f8c0770a6fa2f0c5c0a2db5d7e19d08743
media: am437x-vpfe: Wait for end of frame before tear-down

We were originally attempting to stop all processing as soon
as possible, but the in-progress DMA operation cannot be canceled.
This led to the module being in a busy state and prevented proper
power management functionality.

The existing implementation would attempt to clean things up by waiting
up to 50ms. However when receiving video frame at 15fps or lower,
it meant an inter frame arrival rate of 66.6 ms or higher.
In such cases upon tear down the following message could be seen:
omap_hwmod: vpfe0: _wait_target_disable failed

This patch fixes this issue by adding a stopping state where
we would wait for the next Vsync before disabling the hardware.

Signed-off-by: Benoit Parrot <bparrot@ti.com>
Acked-by: Lad Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/platform/am437x/am437x-vpfe.c
drivers/media/platform/am437x/am437x-vpfe.h