Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: imre.deak@intel.com, "Chris Wilson" <chris@chris-wilson.co.uk>,
	intel-gfx@lists.freedesktop.org,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Takashi Iwai <tiwai@suse.de>, "Shi, Yang A" <yang.a.shi@intel.com>
Subject: Re: [PATCH] drm/i915: Request driver probe from an async task
Date: Fri, 27 Apr 2018 11:04:13 +0300	[thread overview]
Message-ID: <8736zhulc2.fsf@intel.com> (raw)
In-Reply-To: <20180426125618.GF30377@ideak-desk.fi.intel.com>

On Thu, 26 Apr 2018, Imre Deak <imre.deak@intel.com> wrote:
> On Thu, Apr 26, 2018 at 03:41:57PM +0300, David Weinehall wrote:
>> On Fri, Mar 23, 2018 at 08:30:48AM +0000, Chris Wilson wrote:
>> > As we are careful not to register external interfaces before the
>> > internals are brought up, we are not dependent upon a synchronous
>> > probing and can allow ourselves to be probed from a secondary thread
>> > during system bootup. We already do relegate some configuration to
>> > asynchronous tasks (such as setting up the fbdev), now do the entire
>> > probe.
>> > 
>> > References: https://bugs.freedesktop.org/show_bug.cgi?id=105622
>> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
>> 
>> LGTM, and still seems to apply cleanly.
>> 
>> Reviewed-by: David Weinehall <david.weinehall@linux.intel.com>
>
> One problem with this is that atm in snd_hdac_i915_init()
> request_module() is expected to return only once the i915 probe function
> has run. With async probing this won't be any more the case.
>
> +Takashi

As I wrote to Yang (Cc'd) in the context of another patch, one approach
that takes care of this would be adding a completion in hdac_i915.c,
waiting for it with a timeout below request_module("i915") in
snd_hdac_i915_init(), and completing it in
hdac_component_master_bind(). How long the timeout should be is anyone's
guess...

BR,
Jani.

>
>> 
>> > Cc: Imre Deak <imre.deak@intel.com>
>> > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
>> > Cc: David Weinehall <david.weinehall@linux.intel.com>
>> > ---
>> >  drivers/gpu/drm/i915/i915_pci.c | 1 +
>> >  1 file changed, 1 insertion(+)
>> > 
>> > diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
>> > index 4364922e935d..be7b03d48229 100644
>> > --- a/drivers/gpu/drm/i915/i915_pci.c
>> > +++ b/drivers/gpu/drm/i915/i915_pci.c
>> > @@ -726,6 +726,7 @@ static struct pci_driver i915_pci_driver = {
>> >  	.probe = i915_pci_probe,
>> >  	.remove = i915_pci_remove,
>> >  	.driver.pm = &i915_pm_ops,
>> > +	.driver.probe_type = PROBE_PREFER_ASYNCHRONOUS,
>> >  };
>> >  
>> >  static int __init i915_init(void)
>> > -- 
>> > 2.16.2
>> > 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-04-27  8:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23  8:30 [PATCH] drm/i915: Request driver probe from an async task Chris Wilson
2018-03-23  9:05 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-03-23 10:29 ` ✓ Fi.CI.BAT: success " Patchwork
2018-03-23 11:02 ` [PATCH] " Chris Wilson
2018-03-23 11:22 ` ✗ Fi.CI.IGT: failure for " Patchwork
2018-04-26 12:41 ` [PATCH] " David Weinehall
2018-04-26 12:55   ` Chris Wilson
2018-04-26 12:56   ` Imre Deak
2018-04-27  8:04     ` Jani Nikula [this message]
2018-04-28  8:16       ` 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=8736zhulc2.fsf@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=tiwai@suse.de \
    --cc=ville.syrjala@linux.intel.com \
    --cc=yang.a.shi@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox