]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
media: staging: tegra-vde: Power-cycle hardware on probe
authorDmitry Osipenko <digetx@gmail.com>
Wed, 24 Jun 2020 15:08:47 +0000 (17:08 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sun, 19 Jul 2020 05:42:30 +0000 (07:42 +0200)
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>
drivers/staging/media/tegra-vde/vde.c

index 3dcf5eab6b182fb768b815942d67727a1a47401f..a3c24d96d5b9a38bcd21763676ee665e23325970 100644 (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: