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 13:47:10 +0200 Message-ID: <20160802114709.GC4726@ulmo.ba.sec> References: <20160722165527.GH25486@phenom.ffwll.local> <87fuqotwrl.fsf@intel.com> <579F8F47.2080305@samsung.com> <20160802083623.GA4726@ulmo.ba.sec> <57A07A2A.7010500@samsung.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1980261410==" Return-path: Received: from hqemgate14.nvidia.com (hqemgate14.nvidia.com [216.228.121.143]) by gabe.freedesktop.org (Postfix) with ESMTPS id 53FC16E557 for ; Tue, 2 Aug 2016 11:47:21 +0000 (UTC) In-Reply-To: <57A07A2A.7010500@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 --===============1980261410== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Clx92ZfkiYIKRjnr" Content-Disposition: inline --Clx92ZfkiYIKRjnr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Aug 02, 2016 at 12:47:06PM +0200, Andrzej Hajda wrote: > On 08/02/2016 10:36 AM, Thierry Reding wrote: > > 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); > >> 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. >=20 > If you change initcall of mipi_dsi to module and then you compile > it as built-in, only link order will guard correct initialization sequenc= e. > 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 --Clx92ZfkiYIKRjnr Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJXoIg8AAoJEN0jrNd/PrOh+hMP/RqNiwXzJYnzmCFVn/+mVH33 e/3CwGk8NTWXjgOA2drxflK4QS1J3Xvd8ivDgHwekCceMRa78QH8JqEQwM4GMVox I0zUbW26Sa8mK3QDQNPWZiRm1K2Cic3NMADdbFTvmBqvBk/Jv+4aEzg7pp39aMmu O9xTq4bjMKRGRK6TYZCLOka/JN/eggDMcPAmLItGVVY+bfygxtERN/7I15khlDH6 RWuSNhLe9H2yQiZ91BtyMKa/f5h7D9n1gqT6538Oa4a3fNbCKEzA36m6wyxy36tz 1rFTb5LIlNJ2bTevzrabtm0B6lr9sv69wnXLfgC+Ecrk6cwjApO47nWEHe7kBVnw n6CmOfYtXjsMMGo643vCg3yp01JOE5/c86eMEtYDEIVazuFOI++A7dmVwBgSCyD6 nmSkHKAX9Ekif+xqCuaVlh/MlTyxw46jXsYS8z6uV3Z+XFF5AQ4wp0vg4mT+FR1R gwIU/RTaEkl4judU7KWMMAROQn1NWGRtC/WNSaaNV7c4VZxTo0TRqeW3qKvJyGix PABKGB8QB4Pl5VXoL7Y5Z4plBTj4jKYLo3PLPZhQb73EOH9W7Wsk32+mIEyfLf0A t0iHvyF5JHU4CnPGySPUXBx9RqtrA4qo99A0eJn+mkroym3ySscz2JUYmIyFdoc4 Mh0Kd1XyKGAgvaFc8wnA =0k+T -----END PGP SIGNATURE----- --Clx92ZfkiYIKRjnr-- --===============1980261410== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============1980261410==--