All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Cc: Takashi Iwai <tiwai@suse.de>
Subject: [PATCH] snd/hda: Balance hda->need_i915_power across runtime_suspend
Date: Tue,  9 Apr 2019 22:27:41 +0100	[thread overview]
Message-ID: <20190409212741.28593-1-chris@chris-wilson.co.uk> (raw)

In runtime_resume, we release the local display_power wakeref if we can
rely on i915 providing a wakeref along the component. On suspend
therefore, we should only release the display_power if we kept it from
runtime_resume.

Fixes: e454ff8e89b6 ("ALSA: hda/intel: Drop superfluous AZX_DCAPS_I915_POWERWELL checks")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Imre Deak <imre.deak@intel.com>
---
This appears to fix the glk-dsi as it performs a pm_runtime_suspend in
the middle of azx_probe_contime(). Hopefully.
---
 sound/pci/hda/hda_intel.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 2ec91085fa3e..a9faf95c88b5 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -941,10 +941,14 @@ static bool azx_is_pm_ready(struct snd_card *card)
 
 static void __azx_runtime_suspend(struct azx *chip)
 {
+	struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
+
 	azx_stop_chip(chip);
 	azx_enter_link_reset(chip);
 	azx_clear_irq_pending(chip);
-	display_power(chip, false);
+
+	if (hda->need_i915_power)
+		display_power(chip, false);
 }
 
 static void __azx_runtime_resume(struct azx *chip, bool from_rt)
-- 
2.20.1

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

             reply	other threads:[~2019-04-09 21:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-09 21:27 Chris Wilson [this message]
2019-04-09 21:35 ` [PATCH] snd/hda: Balance hda->need_i915_power across runtime_suspend Takashi Iwai
2019-04-09 22:53   ` Chris Wilson
2019-04-10  5:29     ` Takashi Iwai
2019-04-10  7:59       ` Chris Wilson
2019-04-10  8:04         ` Takashi Iwai
2019-04-09 22:25 ` ✗ Fi.CI.BAT: failure for " Patchwork
2019-04-10  5:37 ` ✗ Fi.CI.BAT: failure for snd/hda: Balance hda->need_i915_power across runtime_suspend (rev2) 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=20190409212741.28593-1-chris@chris-wilson.co.uk \
    --to=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tiwai@suse.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.