All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: alsa-devel@alsa-project.org
Subject: Re: [PATCH 2/2] ALSA: hda - Bind with i915 only when Intel graphics is present
Date: Thu, 31 Mar 2016 14:58:06 +0200	[thread overview]
Message-ID: <s5hd1qag5y9.wl-tiwai@suse.de> (raw)
In-Reply-To: <20160331125640.GO4329@intel.com>

On Thu, 31 Mar 2016 14:56:40 +0200,
Ville Syrjälä wrote:
> 
> On Wed, Mar 30, 2016 at 05:46:02PM +0200, Takashi Iwai wrote:
> > On Skylake and onwards, the HD-audio controller driver needs to bind
> > with i915 for having the control of power well audio domain before
> > actually probing the codec.  This leads to the load of i915 driver
> > from the audio driver side.  But, there are systems that have no Intel
> > graphics but Nvidia or AMD GPU, although they still use HD-audio bus
> > for the onboard audio codecs.  On these, loading the i915 driver is
> > nothing but a useless memory and CPU consumption.
> > 
> > A simple way to avoid it is just to look for the Intel graphics PCI
> > entry beforehand, and try to bind with i915 only when such an entry is
> > found.  Currently, it assumes the PCI display class.  If another class
> > appears, this needs to be extended (although it's very unlikely).
> > 
> > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > ---
> >  sound/hda/hdac_i915.c | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> > 
> > diff --git a/sound/hda/hdac_i915.c b/sound/hda/hdac_i915.c
> > index c62a9f830b84..3c8e6d93d4df 100644
> > --- a/sound/hda/hdac_i915.c
> > +++ b/sound/hda/hdac_i915.c
> > @@ -298,6 +298,17 @@ int snd_hdac_i915_register_notifier(const struct i915_audio_component_audio_ops
> >  }
> >  EXPORT_SYMBOL_GPL(snd_hdac_i915_register_notifier);
> >  
> > +/* check whether intel graphics is present */
> > +static bool i915_gfx_present(void)
> > +{
> > +	static struct pci_device_id ids[] = {
> > +		{ PCI_DEVICE_CLASS(PCI_BASE_CLASS_DISPLAY << 16, 0xff0000) },
> > +		{}
> > +	};
> > +	return pci_dev_present(ids);
> > +}
> 
> Should this be checking for at least the Intel vendor ID? External GPUs
> should be display class devices too, no?

Doh, yes, of course.  This has been slipped while refactoring.


thanks,

Takashi
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  reply	other threads:[~2016-03-31 12:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 15:46 [PATCH 1/2] ALSA: hda - Enable i915 binding for gen3/4 HDMI/DP Takashi Iwai
2016-03-30 15:46 ` [PATCH 2/2] ALSA: hda - Bind with i915 only when Intel graphics is present Takashi Iwai
2016-03-31 12:56   ` Ville Syrjälä
2016-03-31 12:58     ` Takashi Iwai [this message]
2016-03-31 12:30 ` [PATCH 1/2] ALSA: hda - Enable i915 binding for gen3/4 HDMI/DP Ville Syrjälä
2016-03-31 12:45   ` Takashi Iwai
2016-04-01 17:53     ` Ville Syrjälä
2016-04-01 20:21       ` 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=s5hd1qag5y9.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=ville.syrjala@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.