Skip to content

Commit

Permalink
ALSA: hda: Release display power reference during shutdown/reboot
Browse files Browse the repository at this point in the history
Make sure the HDA driver's display power reference is released during
shutdown/reboot.

During the shutdown/reboot sequence the pci device core calls the
pm_runtime_resume handler for all devices before calling the driver's
shutdown callback and so the HDA driver's runtime resume callback will
acquire a display power reference (on HSW/BDW). This triggers a power
reference held WARN on HSW/BDW in the i915 driver's subsequent shutdown
handler, which expects all display power references to be released by
that time.

Since the HDA controller is stopped in the shutdown handler in any case,
let's follow here the same sequence as the one during runtime suspend.
This will also reset the HDA link and drop the display power reference,
getting rid of the above WARN.

Tested on HSW.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/3618
Reported-and-tested-by: Thomas Voegtle <tv@lio96.de>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Imre Deak <imre.deak@intel.com>
  • Loading branch information
ideak authored and intel-lab-lkp committed Jun 21, 2021
1 parent 6c0a207 commit 69033b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/pci/hda/hda_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -2385,7 +2385,7 @@ static void azx_shutdown(struct pci_dev *pci)
return;
chip = card->private_data;
if (chip && chip->running)
azx_stop_chip(chip);
__azx_runtime_suspend(chip);
}

/* PCI IDs */
Expand Down

0 comments on commit 69033b3

Please sign in to comment.