]> 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)
commit336586d292a6c744938376e0bf9f95c14c06efb9
treed0838f8a6f48d67655e54335d5565fc9c7750ac6
parent6313d1a9550dc70bc2c7f8c8e01283c3431f6d26
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