Before the pci_driver->probe() is called, the pci subsystem calls runtime_forbib() and runtime_get_sync() on this pci dev, so only call runtime_put_autosuspend() is not enough to enable the runtime_pm on this device.
For controllers with vgaswitcheroo feature, the pci/quirks.c will call runtime_allow() for this dev, then the controllers could enter rt_idle/suspend/resume, but for non-vgaswitcheroo controllers like Intel hda controllers, the runtime_pm is not enabled even it calls put_autosuspend(). Need to call runtime_allow() for those controllers in the hda driver.
Signed-off-by: Hui Wang hui.wang@canonical.com --- sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 8519051a426e..779705bef88b 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -2356,6 +2356,8 @@ static int azx_probe_continue(struct azx *chip)
if (azx_has_pm_runtime(chip)) { pm_runtime_use_autosuspend(&pci->dev); + if (!use_vga_switcheroo(chip)) + pm_runtime_allow(&pci->dev); pm_runtime_put_autosuspend(&pci->dev); }