From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@vger.kernel.org,
David Henningsson <david.henningsson@canonical.com>,
Takashi Iwai <tiwai@suse.de>
Subject: [PATCH 3.13 08/10] ALSA: hda - Explicitly keep codec powered up in hdmi_present_sense
Date: Mon, 27 Jan 2014 12:17:11 -0800 [thread overview]
Message-ID: <20140127201535.937672648@linuxfoundation.org> (raw)
In-Reply-To: <20140127201535.350372282@linuxfoundation.org>
3.13-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Henningsson <david.henningsson@canonical.com>
commit da4a7a3926d09c13ae052ede67feb7285e01e3f5 upstream.
This should help us avoid the following mutex deadlock:
[] mutex_lock+0x2a/0x50
[] hdmi_present_sense+0x53/0x3a0 [snd_hda_codec_hdmi]
[] generic_hdmi_resume+0x5a/0x70 [snd_hda_codec_hdmi]
[] hda_call_codec_resume+0xec/0x1d0 [snd_hda_codec]
[] snd_hda_power_save+0x1e4/0x280 [snd_hda_codec]
[] codec_exec_verb+0x5f/0x290 [snd_hda_codec]
[] snd_hda_codec_read+0x5b/0x90 [snd_hda_codec]
[] snd_hdmi_get_eld_size+0x1e/0x20 [snd_hda_codec_hdmi]
[] snd_hdmi_get_eld+0x2c/0xd0 [snd_hda_codec_hdmi]
[] hdmi_present_sense+0x9a/0x3a0 [snd_hda_codec_hdmi]
[] hdmi_repoll_eld+0x34/0x50 [snd_hda_codec_hdmi]
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Fixes: cbbaa603a03c ('ALSA: hda - Fix possible races in HDMI driver')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/hda/patch_hdmi.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -1496,11 +1496,14 @@ static bool hdmi_present_sense(struct hd
* specification worked this way. Hence, we just ignore the data in
* the unsolicited response to avoid custom WARs.
*/
- int present = snd_hda_pin_sense(codec, pin_nid);
+ int present;
bool update_eld = false;
bool eld_changed = false;
bool ret;
+ snd_hda_power_up(codec);
+ present = snd_hda_pin_sense(codec, pin_nid);
+
mutex_lock(&per_pin->lock);
pin_eld->monitor_present = !!(present & AC_PINSENSE_PRESENCE);
if (pin_eld->monitor_present)
@@ -1573,6 +1576,7 @@ static bool hdmi_present_sense(struct hd
jack->block_report = !ret;
mutex_unlock(&per_pin->lock);
+ snd_hda_power_down(codec);
return ret;
}
next prev parent reply other threads:[~2014-01-27 20:17 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-27 20:17 [PATCH 3.13 00/10] 3.13.1-stable review Greg Kroah-Hartman
2014-01-27 20:17 ` [PATCH 3.13 01/10] GFS2: Increase i_writecount during gfs2_setattr_chown Greg Kroah-Hartman
2014-01-27 20:17 ` [PATCH 3.13 02/10] staging: comedi: fix result of memdup_user for user chanlist Greg Kroah-Hartman
2014-01-27 20:17 ` [PATCH 3.13 03/10] staging: comedi: addi_apci_1032: fix subdevice type/flags bug Greg Kroah-Hartman
2014-01-27 20:17 ` [PATCH 3.13 04/10] staging: comedi: adl_pci9111: fix incorrect irq passed to request_irq() Greg Kroah-Hartman
2014-01-27 20:17 ` [PATCH 3.13 05/10] mm: Make {,set}page_address() static inline if WANT_PAGE_VIRTUAL Greg Kroah-Hartman
2014-01-27 20:17 ` [PATCH 3.13 06/10] serial: amba-pl011: use port lock to guard control register access Greg Kroah-Hartman
2014-01-27 20:17 ` [PATCH 3.13 07/10] extcon: gpio: Request gpio pin before modifying its state Greg Kroah-Hartman
2014-01-27 20:17 ` Greg Kroah-Hartman [this message]
2014-01-27 20:17 ` [PATCH 3.13 09/10] md/raid5: fix long-standing problem with bitmap handling on write failure Greg Kroah-Hartman
2014-01-27 20:17 ` [PATCH 3.13 10/10] md/raid5: close recently introduced race in stripe_head management Greg Kroah-Hartman
2014-01-28 17:41 ` [PATCH 3.13 00/10] 3.13.1-stable review Shuah Khan
2014-01-29 13:05 ` Greg Kroah-Hartman
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=20140127201535.937672648@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=david.henningsson@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).