All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Takashi Iwai <tiwai@suse.de>, Thomas Voegtle <tv@lio96.de>
Subject: [Intel-gfx] [PATCH] ALSA: hda: Release display power reference during shutdown/reboot
Date: Mon, 21 Jun 2021 20:44:15 +0300	[thread overview]
Message-ID: <20210621174415.1721198-1-imre.deak@intel.com> (raw)

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>
---
 sound/pci/hda/hda_intel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 7f8f11536a3dc..d0993c22c5e60 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2383,7 +2383,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 */
-- 
2.27.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

             reply	other threads:[~2021-06-21 17:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 17:44 Imre Deak [this message]
2021-06-21 18:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success for ALSA: hda: Release display power reference during shutdown/reboot Patchwork
2021-06-21 20:48 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2021-06-21 21:38 ` [Intel-gfx] [PATCH] " kernel test robot
2021-06-21 21:38   ` kernel test robot
2021-06-22 14:18 ` Takashi Iwai
2021-06-22 19:58   ` Imre Deak
2021-06-23  8:07     ` Takashi Iwai
2021-06-23 13:44       ` Imre Deak
2021-06-22 20:06 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for ALSA: hda: Release display power reference during shutdown/reboot (rev2) Patchwork
2021-06-23  9:04 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for ALSA: hda: Release display power reference during shutdown/reboot (rev3) Patchwork
2021-06-23  9:35 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-06-23 11:16 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210621174415.1721198-1-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tiwai@suse.de \
    --cc=tv@lio96.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.