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 <[email protected]>
Cc: Takashi Iwai <[email protected]>
Cc: Imre Deak <[email protected]>
---
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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to