From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: Why drm-mipi-dsi is built-in only? Date: Tue, 2 Aug 2016 10:36:24 +0200 Message-ID: <20160802083623.GA4726@ulmo.ba.sec> References: <20160722165527.GH25486@phenom.ffwll.local> <87fuqotwrl.fsf@intel.com> <579F8F47.2080305@samsung.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1360383774==" Return-path: Received: from hqemgate15.nvidia.com (hqemgate15.nvidia.com [216.228.121.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id BBA586E408 for ; Tue, 2 Aug 2016 08:36:37 +0000 (UTC) In-Reply-To: <579F8F47.2080305@samsung.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Andrzej Hajda Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1360383774== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 01, 2016 at 08:04:55PM +0200, Andrzej Hajda wrote: > On 08/01/2016 03:59 PM, Jani Nikula wrote: > > Cc Andrzej, Thierry > > > > On Fri, 22 Jul 2016, Daniel Vetter wrote: > >> On Fri, Jul 22, 2016 at 04:30:24PM +0200, Takashi Iwai wrote: > >>> 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. > >> Probably none except embedded folks eshew modules ;-) Submit patch, I'= ll > >> apply. > > Possibly this? > > > > postcore_initcall(mipi_dsi_bus_init); >=20 > 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. 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 --0F1p//8PRICkK4MW Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJXoFuEAAoJEN0jrNd/PrOhQN8QAJra8jPcV2xc3HLIgrLV9kUS xzSQ/ai9SA/8KJxBMRhLA/zbeI/diuVqdCWHz2sG5/e4Tu9ljDLCXC3JA5n1LHf6 OQAjn/aXYAgwLE8JaQJySEb9UAoVGm+3S62EO3MmyT8ZExm2ig+OS1M6fVK5Czg2 IMfAt1/h20EodelA970MFej+mbIcY0cXvJZGA3fVJuDq+8yxjgLzEKFJd0L4Gpi6 qM50EqcVz+UWhm47Xh9FlHXhR6QWN9O5wRaawcZPxCHjud95tKP+tqz8Ndoy8aHx giQj2XQu7Exk8f8B3VzgL+9nFJbbQZHIHhYAZLQVUmYugiriSuQpDBOhfRsF3jex 3PWyeitoemKBb9Bxfh8SMVYKRfQzacVwaPmit28bZder9tF81fO2k1XjbJ86HJFz EuZO3bFpi6vm8K30oOzj1xUb+n0V806ytCujUH+qbcdOIQt8CfAs0hlT+E6qJITN 2wzRjs0xoUYz273YwJM6ixf2tEUTXMCBJAwdKf2sV6q7GyDfnYOoPniZY/VAgqdn 7NRFz+2CLstrjD1RcDAq2pbAG7lhMT5TZq1eeDWGWHtnFZ1fjrj8FMnnrj2ryDvE HRfqwP4CayTwYzRzL+LuJ3Q0yFGuUMWTfbH6o4j8nWUocycJ6xgiDeMg+Kvkvzel X6wNPRHcdgLrPQxe4y3o =lW+P -----END PGP SIGNATURE----- --0F1p//8PRICkK4MW-- --===============1360383774== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1360383774==--