media: staging: tegra-vde: Power-cycle hardware on probe

VDE partition is left turned ON after bootloader on most devices, hence
let's ensure that it's turned OFF in order to lower power leakage while
hardware is idling by turning it ON and OFF during of the driver's probe.

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Dmitry Osipenko 2020-06-24 17:08:47 +02:00 committed by Mauro Carvalho Chehab
parent 8f0c714ad9
commit ebeacb1f61
1 changed files with 8 additions and 0 deletions

View File

@ -1064,6 +1064,14 @@ static int tegra_vde_probe(struct platform_device *pdev)
pm_runtime_use_autosuspend(dev);
pm_runtime_set_autosuspend_delay(dev, 300);
/*
* VDE partition may be left ON after bootloader, hence let's
* power-cycle it in order to put hardware into a predictable lower
* power state.
*/
pm_runtime_get_sync(dev);
pm_runtime_put(dev);
return 0;
err_deinit_iommu: