public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: imre.deak@intel.com
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	alsa-devel@alsa-project.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915/hda: Add audio component stub
Date: Mon, 25 Apr 2016 14:46:54 +0200	[thread overview]
Message-ID: <s5heg9tlutd.wl-tiwai@suse.de> (raw)
In-Reply-To: <1460032245.5001.11.camel@intel.com>

On Thu, 07 Apr 2016 14:30:45 +0200,
Imre Deak wrote:
> 
> On to, 2016-04-07 at 14:55 +0300, Ville Syrjälä wrote:
> > On Thu, Apr 07, 2016 at 12:57:22PM +0200, Takashi Iwai wrote:
> > > From: Imre Deak <imre.deak@intel.com>
> > > 
> > > User may pass nomodeset or i915.modeset=0 option to disable i915
> > > KMS
> > > explicitly.  Although this itself works fine, it breaks the weak
> > > dependency the HD-audio driver requires, and it's the reason the
> > > delayed component binding isn't implemented in HD-audio.  Since
> > > i915
> > > doesn't notify its disablement, HD-audio would be blocked
> > > unnecessarily endlessly, waiting for the bind with i915.
> > > 
> > > This patch introduces a stub audio component binding when i915
> > > driver
> > > is loaded with KMS off like the boot options above.  Then i915
> > > driver
> > > still registers the slave component but with the new "disabled" ops
> > > flag, so that the master component (HD-audio) can know clearly the
> > > slave state.
> > > 
> > > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > > Signed-off-by: Takashi Iwai <tiwai@suse.de>
> > > ---
> > >  drivers/gpu/drm/i915/i915_drv.c    | 34 +++++++++++++--------
> > >  drivers/gpu/drm/i915/intel_audio.c | 61
> > > ++++++++++++++++++++++++++++++++++++++
> > >  drivers/gpu/drm/i915/intel_drv.h   |  2 ++
> > >  include/drm/i915_component.h       |  5 ++++
> > >  4 files changed, 90 insertions(+), 12 deletions(-)
> > > 
> > > diff --git a/drivers/gpu/drm/i915/i915_drv.c
> > > b/drivers/gpu/drm/i915/i915_drv.c
> > > index 20e82008b8b6..21c6bac5468e 100644
> > > --- a/drivers/gpu/drm/i915/i915_drv.c
> > > +++ b/drivers/gpu/drm/i915/i915_drv.c
> > > @@ -950,6 +950,19 @@ static int i915_pci_probe(struct pci_dev
> > > *pdev, const struct pci_device_id *ent)
> > >  	struct intel_device_info *intel_info =
> > >  		(struct intel_device_info *) ent->driver_data;
> > >  
> > > +	if (!(driver.driver_features & DRIVER_MODESET)) {
> > > +		/*
> > > +		 * Notify the HDA driver so that it doesn't block
> > > waiting for
> > > +		 * i915 to become ready.
> > > +		 */
> > > +		i915_audio_component_stub_init(&pdev->dev);
> > > +
> > > +		/* Silently fail loading to not upset userspace.
> > > */
> > > +		DRM_DEBUG_DRIVER("KMS and UMS disabled.\n");
> > > +
> > > +		return 0;
> > > +	}
> > > +
> > 
> > Moving this here means we're actually going to bind to the device
> > even
> > w/o DRIVER_MODESET. Hopefully the fact that we don't register with
> > any
> > subsystems would make that OK. But since we need the actual device
> > for
> > the component stuff, I guess this is the only way.
> 
> Yes, the need for the device was the reason I moved this here. An
> alternative would be to add a miscdevice. I wanted to keep things
> simple and didn't see any problem of keeping the device bound, so chose
> this way.
> 
> One other thing I was thinking about is to also bind the stub component
> if the real probing failed to make things more consistent and avoid the
> longish timeout on the HDA side. This would also get messier with the
> miscdevice approach, since the probe error is not propagated to the
> caller of pci_register_driver(). If people don't see a problem with
> this I could add this in the next version.

Is a newer version already available?


thanks,

Takashi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-04-25 12:46 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-07 10:57 [PATCH 0/3] More robust i915 / audio binding Takashi Iwai
2016-04-07 10:57 ` [PATCH 1/3] drm/i915/hda: Add audio component stub Takashi Iwai
2016-04-07 11:55   ` Ville Syrjälä
2016-04-07 12:30     ` Imre Deak
2016-04-25 12:46       ` Takashi Iwai [this message]
2016-05-12 18:06   ` [PATCH v2 " Imre Deak
2016-05-13  7:48     ` Takashi Iwai
2016-05-13  9:50       ` Imre Deak
2016-05-13 10:04         ` Takashi Iwai
2016-05-13 10:44           ` Imre Deak
2016-05-17  7:20     ` Daniel Vetter
2016-05-17  7:37       ` Takashi Iwai
2016-05-17  9:42         ` Daniel Vetter
2016-05-17  9:59           ` Takashi Iwai
2016-05-17 10:22             ` Imre Deak
2016-05-17 11:10               ` Daniel Vetter
2016-05-17 12:11                 ` Imre Deak
2016-05-17 12:34                   ` Daniel Vetter
2016-05-17 12:37                     ` Daniel Vetter
2016-05-17 12:39                       ` Daniel Vetter
2016-05-17 12:53                         ` Takashi Iwai
2016-05-17 13:57                           ` Takashi Iwai
2016-05-17 13:59                             ` Daniel Vetter
2016-05-17 15:03                               ` Takashi Iwai
2016-05-17 12:51                       ` Takashi Iwai
2016-05-17 12:47                     ` Takashi Iwai
2016-05-17 12:56                       ` Daniel Vetter
2016-05-17 13:20                         ` Takashi Iwai
2016-05-17 16:18                           ` Daniel Vetter
2016-05-17 16:23                             ` Daniel Vetter
2016-05-17 18:19                               ` Takashi Iwai
2016-05-17 21:11                                 ` Daniel Vetter
2016-05-18  9:06                                   ` Takashi Iwai
2016-05-17 17:24                             ` Takashi Iwai
2016-05-17  9:10       ` Imre Deak
2016-04-07 10:57 ` [PATCH 2/3] ALSA: hda - Immediately fail if the i915 audio component is disabled Takashi Iwai
2016-04-07 10:57 ` [PATCH 3/3] ALSA: hda - Support deferred i915 audio component binding Takashi Iwai
2016-04-07 14:09 ` ✗ Fi.CI.BAT: failure for More robust i915 / audio binding Patchwork
2016-05-12 18:49 ` ✗ Ro.CI.BAT: failure for More robust i915 / audio binding (rev2) Patchwork

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=s5heg9tlutd.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=daniel.vetter@intel.com \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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