From: Pan Xiuli Date: Mon, 22 Jul 2019 14:13:42 +0000 (-0500) Subject: ASoC: SOF: pci: mark last_busy value at runtime PM init X-Git-Tag: v5.2.19~266 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1a53850754a9548117d791d67f1f546bd376853f;p=thirdparty%2Fkernel%2Fstable.git ASoC: SOF: pci: mark last_busy value at runtime PM init [ Upstream commit f1b1b9b136827915624136624ff54aba5890a15b ] If last_busy value is not set at runtime PM enable, the device will be suspend immediately after usage counter is 0. Set the last_busy value to make sure delay is working at first boot up. Signed-off-by: Pan Xiuli Signed-off-by: Ranjani Sridharan Signed-off-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20190722141402.7194-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- diff --git a/sound/soc/sof/sof-pci-dev.c b/sound/soc/sof/sof-pci-dev.c index b778dffb2d25c..49daf1390dac0 100644 --- a/sound/soc/sof/sof-pci-dev.c +++ b/sound/soc/sof/sof-pci-dev.c @@ -203,6 +203,9 @@ static void sof_pci_probe_complete(struct device *dev) */ pm_runtime_allow(dev); + /* mark last_busy for pm_runtime to make sure not suspend immediately */ + pm_runtime_mark_last_busy(dev); + /* follow recommendation in pci-driver.c to decrement usage counter */ pm_runtime_put_noidle(dev); }