media: venus: Fix occasionally failures to suspend
authorStanimir Varbanov <stanimir.varbanov@linaro.org>
Tue, 17 Sep 2019 12:02:26 +0000 (09:02 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Dec 2019 15:34:54 +0000 (16:34 +0100)
commitf0d45d442855fae85630b14db096d6dd0ec26cad
tree1e3645902e71aa0c1b2307da9014d6a30e8ff739
parent697353c7e16924e8330582c0833efb6288b9bc1f
media: venus: Fix occasionally failures to suspend

[ Upstream commit 8dbebb2bd01e6f36e9a215dcde99ace70408f2c8 ]

Failure to suspend (venus_suspend_3xx) happens when the system
is fresh booted and loading venus driver. This happens once and
after reload the venus driver modules the problem disrepair.

Fix the failure by skipping the check for WFI and IDLE bits if
PC_READY is on in control status register.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/platform/qcom/venus/hfi_venus.c