All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Jones <davej@redhat.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: xingchao.wang@linux.intel.com, tiwai@suse.de,
	liam.r.girdwood@intel.com, david.henningsson@canonical.com,
	daniel.vetter@ffwll.ch,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: ALSA: hda - Add power-welll support for haswell HDA
Date: Mon, 29 Jul 2013 16:12:08 -0400	[thread overview]
Message-ID: <20130729201208.GA21037@redhat.com> (raw)
In-Reply-To: <20130709233626.3E8F4660AF6@gitolite.kernel.org>

On Tue, Jul 09, 2013 at 11:36:26PM +0000, Linux Kernel wrote:
 > Gitweb:     http://git.kernel.org/linus/;a=commit;h=99a2008d0b32d72dfc2a54e7be1eb698dd2e3bd6
 > Commit:     99a2008d0b32d72dfc2a54e7be1eb698dd2e3bd6
 > Parent:     5c90680e42b08a1e4a6800ca02e75ad201f8037f
 > Author:     Wang Xingchao <xingchao.wang@linux.intel.com>
 > AuthorDate: Thu May 30 22:07:10 2013 +0800
 > Committer:  Daniel Vetter <daniel.vetter@ffwll.ch>
 > CommitDate: Thu Jun 6 17:31:56 2013 +0200
 > 
 >     ALSA: hda - Add power-welll support for haswell HDA
 >     
 >     For Intel Haswell chip, HDA controller and codec have
 >     power well dependency from GPU side. This patch added support
 >     to request/release power well in audio driver. Power save
 >     feature should be enabled to get runtime power saving.
 >     
 >     There's deadlock when request_module(i915) in azx_probe.
 >     It looks like:
 >     device_lock(audio pci device) -> azx_probe -> module_request
 >     (or symbol_request) -> modprobe (userspace) -> i915 init ->
 >     drm_pci_init -> pci_register_driver -> bus_add_driver -> driver_attach ->
 >     which in turn tries all locks on pci bus, and when it tries the one on the
 >     audio device, it will deadlock.
 >     
 >     This patch introduce a work to store remaining probe stuff, and let
 >     request_module run in safe work context.

That deadlock sounds nasty, but..

 > +#ifdef CONFIG_SND_HDA_I915
 > +		probe_now = false;
 > +		schedule_work(&chip->probe_work);
 > +#else
 > +		snd_printk(KERN_ERR SFX "Haswell must build in CONFIG_SND_HDA_I915\n");
 > +#endif

runtime surprises like this are also a pain. There has to be a way in Kconfig
to express this (through addition of a new option). Though having to build this
in for distro kernels is also unfortunate. This means we'll also have to build-in
all the ALSA stuff even for users who never use it.

	Dave


       reply	other threads:[~2013-07-29 20:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20130709233626.3E8F4660AF6@gitolite.kernel.org>
2013-07-29 20:12 ` Dave Jones [this message]
2013-07-30  6:08   ` ALSA: hda - Add power-welll support for haswell HDA Takashi Iwai

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=20130729201208.GA21037@redhat.com \
    --to=davej@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=david.henningsson@canonical.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tiwai@suse.de \
    --cc=torvalds@linux-foundation.org \
    --cc=xingchao.wang@linux.intel.com \
    /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.