[Bug 105269] [BAT] igt at pm_rpm@basic-* - fail - wait_for_suspended()
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Feb 27 14:36:21 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=105269
--- Comment #3 from Marta Löfstedt <marta.lofstedt at intel.com> ---
I believe something i weird on drm-tip.
commit 6d167e8d8eaeb7574583e47e207914d3089be0a4
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Wed Feb 14 11:34:21 2018 +0000
Revert "ALSA: hda: Make use of core codec functions to sync power state"
This reverts commit 3b5b899ca67db07a4c4825911072221f99e157e2.
References: https://bugs.freedesktop.org/show_bug.cgi?id=105069
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 5bc3a7468e17..e018ecbf78a8 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2702,6 +2702,32 @@ void snd_hda_codec_set_power_to_all(struct hda_codec
*codec, hda_nid_t fg,
}
EXPORT_SYMBOL_GPL(snd_hda_codec_set_power_to_all);
+/*
+ * wait until the state is reached, returns the current state
+ */
+static unsigned int hda_sync_power_state(struct hda_codec *codec,
+ hda_nid_t fg,
+ unsigned int power_state)
+{
+ unsigned long end_time = jiffies + msecs_to_jiffies(500);
+ unsigned int state, actual_state;
+
+ for (;;) {
+ state = snd_hda_codec_read(codec, fg, 0,
+ AC_VERB_GET_POWER_STATE, 0);
+ if (state & AC_PWRST_ERROR)
+ break;
+ actual_state = (state >> 4) & 0x0f;
+ if (actual_state == power_state)
+ break;
+ if (time_after_eq(jiffies, end_time))
+ break;
+ /* wait until the codec reachs to the target state */
+ msleep(1);
+ }
+ return state;
+}
+
/**
* snd_hda_codec_eapd_power_filter - A power filter callback for EAPD
* @codec: the HDA codec
@@ -2764,7 +2790,7 @@ static unsigned int hda_set_power_state(struct hda_codec
*codec,
state);
snd_hda_codec_set_power_to_all(codec, fg, power_state);
}
- state = snd_hda_sync_power_state(codec, fg, power_state);
+ state = hda_sync_power_state(codec, fg, power_state);
if (!(state & AC_PWRST_ERROR))
break;
}
However, when I open the sound/pci/hda/hda_codec.c there is no:
static unsigned int hda_sync_power_state(...) function and:
state = snd_hda_sync_power_state(codec, fg, power_state);
--
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20180227/f4688276/attachment.html>
More information about the intel-gfx-bugs
mailing list