Skip to content

Commit b6fd774

Browse files
vsyrjalatiwai
authored andcommitted
ALSA: hda/hdmi: Disable silent stream on GLK
The silent stream stuff recurses back into i915 audio component .get_power() from the .pin_eld_notify() hook. On GLK this will deadlock as i915 may already be holding the relevant modeset locks during .pin_eld_notify() and the GLK audio vs. CDCLK workaround will try to grab the same locks from .get_power(). Until someone comes up with a better fix just disable the silent stream support on GLK. Cc: stable@vger.kernel.org Cc: Harsha Priya <harshapriya.n@intel.com> Cc: Emmanuel Jillela <emmanuel.jillela@intel.com> Cc: Kai Vehmanen <kai.vehmanen@linux.intel.com> Cc: Takashi Iwai <tiwai@suse.de> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2623 Fixes: 951894c ("ALSA: hda/hdmi: Add Intel silent stream support") Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com> Link: https://lore.kernel.org/r/20211222145350.24342-1-ville.syrjala@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent 065807d commit b6fd774

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

sound/pci/hda/patch_hdmi.c

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2947,7 +2947,8 @@ static int parse_intel_hdmi(struct hda_codec *codec)
29472947

29482948
/* Intel Haswell and onwards; audio component with eld notifier */
29492949
static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid,
2950-
const int *port_map, int port_num, int dev_num)
2950+
const int *port_map, int port_num, int dev_num,
2951+
bool send_silent_stream)
29512952
{
29522953
struct hdmi_spec *spec;
29532954
int err;
@@ -2980,20 +2981,26 @@ static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid,
29802981
* Enable silent stream feature, if it is enabled via
29812982
* module param or Kconfig option
29822983
*/
2983-
if (enable_silent_stream)
2984+
if (send_silent_stream)
29842985
spec->send_silent_stream = true;
29852986

29862987
return parse_intel_hdmi(codec);
29872988
}
29882989

29892990
static int patch_i915_hsw_hdmi(struct hda_codec *codec)
29902991
{
2991-
return intel_hsw_common_init(codec, 0x08, NULL, 0, 3);
2992+
return intel_hsw_common_init(codec, 0x08, NULL, 0, 3,
2993+
enable_silent_stream);
29922994
}
29932995

29942996
static int patch_i915_glk_hdmi(struct hda_codec *codec)
29952997
{
2996-
return intel_hsw_common_init(codec, 0x0b, NULL, 0, 3);
2998+
/*
2999+
* Silent stream calls audio component .get_power() from
3000+
* .pin_eld_notify(). On GLK this will deadlock in i915 due
3001+
* to the audio vs. CDCLK workaround.
3002+
*/
3003+
return intel_hsw_common_init(codec, 0x0b, NULL, 0, 3, false);
29973004
}
29983005

29993006
static int patch_i915_icl_hdmi(struct hda_codec *codec)
@@ -3004,7 +3011,8 @@ static int patch_i915_icl_hdmi(struct hda_codec *codec)
30043011
*/
30053012
static const int map[] = {0x0, 0x4, 0x6, 0x8, 0xa, 0xb};
30063013

3007-
return intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map), 3);
3014+
return intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map), 3,
3015+
enable_silent_stream);
30083016
}
30093017

30103018
static int patch_i915_tgl_hdmi(struct hda_codec *codec)
@@ -3016,7 +3024,8 @@ static int patch_i915_tgl_hdmi(struct hda_codec *codec)
30163024
static const int map[] = {0x4, 0x6, 0x8, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf};
30173025
int ret;
30183026

3019-
ret = intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map), 4);
3027+
ret = intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map), 4,
3028+
enable_silent_stream);
30203029
if (!ret) {
30213030
struct hdmi_spec *spec = codec->spec;
30223031

0 commit comments

Comments
 (0)