[PATCH 1/1] drm/sti: fix master bind bug for using component
Benjamin Gaignard
benjamin.gaignard at linaro.org
Wed Jul 15 06:17:00 PDT 2015
Thanks a lot Russell, I have now understand where was my mistake.
2015-07-15 12:42 GMT+02:00 Russell King - ARM Linux <linux at arm.linux.org.uk>:
> On Wed, Jul 15, 2015 at 12:19:01PM +0200, Benjamin Gaignard wrote:
>> The build order in Makefile hasn't been change so the bug doesn't occur...
>>
>> In addition of taking care of not changing build order in Makefile,
>> I would like to understand what is the expected behavior of component
>> framework when
>> master call component_bind_all() before any component_add() calls.
>>
>> Should component bind function be called in component_add() ?
>> Is up to component to detect that master is already bounded ?
>>
>> Russell can you tell us what to do in this case ?
>
> I don't follow, and you certainly should never get into the situation
> you're alluding to (where the master is already bound but a component
> is not.)
>
> The way this should work is:
>
> - master and components register themselves into the component helper
> in a random order.
> - when the master registers, it gives the component helper a set of
> matches which it uses to determine which components are required.
> - when the component helper determines that all components and the
> master have been registered, it calls the master bind function.
> - the master bind function is responsible for the classical subsystem
> initialisation, calling component_bind_all() to cause the individual
> components bind() method to be called.
>
> So, you should never _ever_ be in the situation where initcall ordering
> matters, or where the master is already bound but a component hasn't
> registered.
>
> --
> FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
> according to speedtest.net.
--
Benjamin Gaignard
Graphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
More information about the dri-devel
mailing list