Why drm-mipi-dsi is built-in only?
Hi,
is there any reason drm-mipi-dsi can't be a module? It's fixed as a built-in since its Kconfig is bool.
thanks,
Takashi
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines · Takashi Iwai
Hi,
is there any reason drm-mipi-dsi can't be a module? It's fixed as a built-in since its
Kconfigis bool.
Probably none except embedded folks eshew modules ;-) Submit patch, I'll apply.
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Cc Andrzej, Thierry
Quoted 8 lines · Daniel Vetter
Quoted 4 lines · Takashi Iwai
Hi,
is there any reason drm-mipi-dsi can't be a module? It's fixed as a built-in since its
Kconfigis bool.Probably none except embedded folks eshew modules ;-) Submit patch, I'll apply.
Possibly this?
postcore_initcall(mipi_dsi_bus_init);
BR,
Jani.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Jani Nikula
Cc Andrzej, Thierry
Quoted 3 lines · Daniel Vetter
Quoted 2 lines · Takashi Iwai
Hi,
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
is there any reason drm-mipi-dsi can't be a module? It's fixed as a built-in since its
Kconfigis bool.Probably none except embedded folks eshew modules ;-) Submit patch, I'll apply.
Possibly this?
postcore_initcall(mipi_dsi_bus_init);
If I remember correctly, the only reason for this is to have mipi_dsi bus registered before mipi_dsi drivers, which usually are registered at module initcall. But maybe bus registration can be performed at first mipi_dsi driver registration. This way we could modularize it.
Regards
Andrzej
Quoted 5 lines
BR,
Jani.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 11 lines · Andrzej Hajda
Quoted 10 lines · Jani Nikula
Cc Andrzej, Thierry
Quoted 7 lines · Daniel Vetter
Quoted 4 lines · Takashi Iwai
Hi,
is there any reason drm-mipi-dsi can't be a module? It's fixed as a built-in since its
Kconfigis bool.Probably none except embedded folks eshew modules ;-) Submit patch, I'll apply.
Quoted 8 lines
Quoted 3 lines
Possibly this?
postcore_initcall(mipi_dsi_bus_init);If I remember correctly, the only reason for this is to have
mipi_dsibus registered beforemipi_dsidrivers, which usually are registered at module initcall. But maybe bus registration can be performed at firstmipi_dsidriver registration. This way we could modularize it.
I think it should work fine if this was built as a module. The purpose for having this as postcore_initcall() is simply so that the bus is fully initialized before any driver gets registered with it. If this code is built as a module, symbol dependencies will make sure that the drm_mipi_dsi.ko module will be loaded before any users.
Two things are missing, though: 1) the drm_mipi_dsi.ko module would need to be reference counted so that the symbols stay around as long as there are any drivers (this might be covered by symbol dependencies already) and 2) there would need to be an exit function for the module to cleanup the bus.
Thierry
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 19 lines · Thierry Reding
Quoted 11 lines · Andrzej Hajda
Quoted 10 lines · Jani Nikula
Cc Andrzej, Thierry
Quoted 7 lines · Daniel Vetter
Quoted 4 lines · Takashi Iwai
Hi,
is there any reason drm-mipi-dsi can't be a module? It's fixed as a built-in since its
Kconfigis bool.Probably none except embedded folks eshew modules ;-) Submit patch, I'll apply.
Quoted 7 lines
Quoted 3 lines
Possibly this?
postcore_initcall(mipi_dsi_bus_init);If I remember correctly, the only reason for this is to have
mipi_dsibus registered beforemipi_dsidrivers, which usually are registered at module initcall. But maybe bus registration can be performed at firstmipi_dsidriver registration. This way we could modularize it.
Quoted 5 lines
I think it should work fine if this was built as a module. The purpose for having this as
postcore_initcall()is simply so that the bus is fully initialized before any driver gets registered with it. If this code is built as a module, symbol dependencies will make sure that the drm_mipi_dsi.ko module will be loaded before any users.
If you change initcall of mipi_dsi to module and then you compile it as built-in, only link order will guard correct initialization sequence. As for now panels are linked after mipi-dsi, so it should be OK, even if little bit hacky.
Regards
Andrzej
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 26 lines · Andrzej Hajda
Quoted 19 lines · Thierry Reding
Quoted 11 lines · Andrzej Hajda
Quoted 10 lines · Jani Nikula
Cc Andrzej, Thierry
Quoted 7 lines · Daniel Vetter
Quoted 4 lines · Takashi Iwai
Hi,
is there any reason drm-mipi-dsi can't be a module? It's fixed as a built-in since its
Kconfigis bool.Probably none except embedded folks eshew modules ;-) Submit patch, I'll apply.
Quoted 7 lines
Quoted 3 lines
Possibly this?
postcore_initcall(mipi_dsi_bus_init);If I remember correctly, the only reason for this is to have
mipi_dsibus registered beforemipi_dsidrivers, which usually are registered at module initcall. But maybe bus registration can be performed at firstmipi_dsidriver registration. This way we could modularize it.Quoted 5 lines
I think it should work fine if this was built as a module. The purpose for having this as
postcore_initcall()is simply so that the bus is fully initialized before any driver gets registered with it. If this code is built as a module, symbol dependencies will make sure that the drm_mipi_dsi.ko module will be loaded before any users.
Quoted 4 lines
If you change initcall of
mipi_dsito module and then you compile it as built-in, only link order will guard correct initialization sequence. As for now panels are linked after mipi-dsi, so it should be OK, even if little bit hacky.
I wasn't suggesting that we turn the postcore_initcall() into module_init(). postcore_initcall() works just fine for modules (it's automatically replaced by a module_init() if the code is built as a module) and it will still do the right thing with regard to ordering when built-in.
Thierry
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 33 lines · Thierry Reding
Quoted 26 lines · Andrzej Hajda
Quoted 19 lines · Thierry Reding
Quoted 11 lines · Andrzej Hajda
Quoted 10 lines · Jani Nikula
Cc Andrzej, Thierry
Quoted 7 lines · Daniel Vetter
Quoted 4 lines · Takashi Iwai
Hi,
is there any reason drm-mipi-dsi can't be a module? It's fixed as a built-in since its
Kconfigis bool.Probably none except embedded folks eshew modules ;-) Submit patch, I'll apply.
Quoted 7 lines
Quoted 3 lines
Possibly this?
postcore_initcall(mipi_dsi_bus_init);If I remember correctly, the only reason for this is to have
mipi_dsibus registered beforemipi_dsidrivers, which usually are registered at module initcall. But maybe bus registration can be performed at firstmipi_dsidriver registration. This way we could modularize it.Quoted 5 lines
I think it should work fine if this was built as a module. The purpose for having this as
postcore_initcall()is simply so that the bus is fully initialized before any driver gets registered with it. If this code is built as a module, symbol dependencies will make sure that the drm_mipi_dsi.ko module will be loaded before any users.Quoted 4 lines
If you change initcall of
mipi_dsito module and then you compile it as built-in, only link order will guard correct initialization sequence. As for now panels are linked after mipi-dsi, so it should be OK, even if little bit hacky.
Quoted 5 lines
I wasn't suggesting that we turn the
postcore_initcall()intomodule_init().postcore_initcall()works just fine for modules (it's automatically replaced by amodule_init()if the code is built as a module) and it will still do the right thing with regard to ordering when built-in.
Right, I already tested the code, just building as a module without any other changes. And it worked.
About the rest, what Thierry suggested:
Quoted 3 lines
Two things are missing, though: 1) the drm_mipi_dsi.ko module would need to be reference counted so that the symbols stay around as long as there are any drivers (this might be covered by symbol dependencies already)
Yeah, the symbol dependency should cover it enough.
Quoted 2 lines
and 2) there would need to be an exit function for the module to cleanup the bus.
So only this one is missing. I'm going to cook this as well and submit patches later.
thanks,
Takashi
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel