[Intel-gfx] [RFC] i915: make the probe asynchronous

Takashi Iwai tiwai at suse.de
Tue Aug 14 09:39:48 UTC 2018


On Tue, 14 Aug 2018 11:34:07 +0200,
Daniel Vetter wrote:
> 
> On Tue, Aug 14, 2018 at 02:54:31PM +0800, Feng Tang wrote:
> > Hi Jani, Daniel
> > 
> > Could you help to comment? thanks,
> > 
> > - Feng
> > 
> > On Thu, Jul 12, 2018 at 03:51:34PM +0800, Feng Tang wrote:
> > > Hi Daniel,
> > > 
> > > On Thu, Jul 12, 2018 at 08:54:34AM +0200, Daniel Vetter wrote:
> > > > On Thu, Jul 12, 2018 at 09:29:01AM +0800, Feng Tang wrote:
> > > > > On Tue, Jun 26, 2018 at 10:29:16AM +0800, Feng Tang wrote:
> > > > > > On Mon, Jun 25, 2018 at 05:36:32PM +0200, Daniel Vetter wrote:
> > > > >  
> > > > > > Hi Daneil/Jani/Takashi,
> > > > > > 
> > > > > > When I was testing this patch from Takashi, I further checked the kernel
> > > > > > module code, and found that: we may need NOT to add any new codes to
> > > > > > prepare for i915's async probe feature!
> > > > > > 
> > > > > > Say when i915 module is being loader due to HDA's request_module() call,
> > > > > > in the callchain, do_init_module() has such code:
> > > > > > 
> > > > > >     if (!mod->async_probe_requested && (current->flags & PF_USED_ASYNC))
> > > > > >                 async_synchronize_full();
> > > > > > 
> > > > > > This will garantee the asynced probe is done before it returns.
> > > > > > 
> > > > > > I have just tested and this seems to be enough. If I am not wrong, then
> > > > > > we can take the i915 async patch directly. What do you think?
> > > > > 
> > > > > Ping for comments, thanks!
> > > > 
> > > > Ram (who's working on the hdcp2 code) just learned the hard way that if
> > > > i915 registration gets delayed then audio fails to load. So if you want to
> > > > make i915 fully async, then you _must_ fix the audio load stuff.
> > > 
> > > Thanks for sharing this info, this is a real concern. I just did a quick
> > > search of intel-gfx mail list archive, but failed to find the details :(
> 
> Sorry this wa all irc discussions around the hdcp2 patches from
> Ramalingam. There's hacks in his latest patch series to work around the
> audio issues.
> 
> > > > The above code just shows that if you're loading things with
> > > > request_module(), then there's not actually any async probing going on.
> > > > Which kinda defeats the point.
> > > > 
> > > > So yeah, I still think we need to fix this properly, or it's pointless.
> > > 
> > > Agree, this has to be fixed. Can we just do as the hdac_i915.c to explicitly
> > > claim this dependency by using the similar request_module("i915"), as there
> > > may be similar dependency on i915 in the future.
> 
> Erm, the entire point of this discussion was the request_module() doesn't
> work. request_module() does _not_ make dependencies explicit at all.

FYI, the upcoming 4.19 will have the completion in audio side binding,
so this problem should be solved there.


thanks,

Takashi


More information about the Intel-gfx mailing list