From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m Date: Mon, 9 Jul 2018 11:15:24 +0200 Message-ID: <20180709091524.sfamfdmbmwclmegj@flea> References: <20180706124628.3192421-1-arnd@arndb.de> <20180709080724.3ekqb45fsjubvhcm@flea> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0209174881==" Return-path: Received: from mail.bootlin.com (mail.bootlin.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 965BD89D46 for ; Mon, 9 Jul 2018 09:15:35 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Chen-Yu Tsai Cc: Jernej Skrabec , Arnd Bergmann , David Airlie , Jonathan Liu , dri-devel , linux-kernel , Hans Verkuil , linux-arm-kernel List-Id: dri-devel@lists.freedesktop.org --===============0209174881== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="nn7mxiiqrcm4ucny" Content-Disposition: inline --nn7mxiiqrcm4ucny Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 09, 2018 at 04:58:48PM +0800, Chen-Yu Tsai wrote: > On Mon, Jul 9, 2018 at 4:07 PM, Maxime Ripard = wrote: > > On Fri, Jul 06, 2018 at 02:45:53PM +0200, Arnd Bergmann wrote: > >> Having DRM_SUN4I built-in but DRM_SUN8I_MIXER as a loadable module res= ults in > >> a link error, as we try to access a symbol from the sun8i_tcon_top.ko = module: > >> > >> ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun8i-drm-hdmi= =2Eko] undefined! > >> ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-drm.ko] = undefined! > >> > >> This solves the problem by making DRM_SUN8I_MIXER a 'bool' symbol, bui= lding > >> the sun8i_tcon_top module the same way as the core sun4i-drm module wh= enever > >> DRM_SUN8I_MIXER is enabled, or not building it at all otherwise. > >> > >> Alternatively, we could always build sun8i_tcon_top.ko along with sun4= -drm.ko > >> and detach it from the mixer module, I could not tell which way is more > >> appropriate here. > > > > If that's easily doable, then yeah, that would be the preferred option > > I guess. Jernej? Chen-Yu? Any opinion on this? >=20 > Yeah, that definitely works for me. Having TCON TOP being part of the core > sun4i-drm makes more sense. The TCON code will likely call into it later = on > when Jernej adds the encoder muxing code. >=20 > I wonder if we shouldn't just build the whole display engine code, exclud= ing > downstream encoders (HDMI, DSI, TV) into one module. That would also fix = the > issue that DRM_SUN4I_BACKEND has to be built-in if DRM_SUN4I is built-in. > That might be overkill though, given that one day we should be able to get > rid of the frontend check. We can't really do that (or at least without rewriting a significant part of the driver), since we can have only one module_init/module_exit function per module, and we have one per-hardware block. Maxime --=20 Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com --nn7mxiiqrcm4ucny Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAltDJ6sACgkQ0rTAlCFN r3Spzw/6AzvWYsrj3XxWxJ3Xpp0zKlGm7+i4599pTE2aC7pUbh/0WqjGBG1OWA9u kZ2xBHI4GWSPF7HoXco50OPm0Hv31jsEXxdRtXXKh5rxDbUuA8/mYfSeS7saSJ0k Yp+U9roNZYCm+0eYNwcojsJ0Q9jEPaDdZ1XYLJXYZ+mlB7VJVU4NoHGc7VpdgPOQ gn4dc+GBDD4mXyhAqwdYevltl4r98m06GSdTcWmqgJMyMIowqI7KDJX+igFgxS3L hnULm9ktShMS4hDe7FuP/soqMr0axrxgWMiaPMGgYCXjEVL8Y7mhhRJdckyEioRU aW5B6rBFAAzVgQ5xE55arJx8uiELUvFmQ1k5NbQsSMgHHqrNAVsSRx1gzadH6vUp WTcaQc2DZoA+b3oHfgm0+Rr4/oOpuWcWLGujpWLkEpNeMw33PuQPDOXtEvDHWZW6 2ovuwMHTygK14lScUSv8GbiTlG1vKzsW33gwWy6D/gZq8BGyVogKgTZzzaCNSydx oCgqqsYueA5umswZ6t4UYZeGdP+vYhd2jTSjRzr9Yu94JSWT8Pxcl9b5lkNBucrj ZotpaPK66hIYjkjy695lsZDlDxxC0KmwKAc4rkFT/OvPkBZsF+6FydTgv0XovMkW GW6gUI0xUXJAJBVCn0CjpNCq6n3g9flTGr2L2NJ4S2AJyQNnAsc= =i7Df -----END PGP SIGNATURE----- --nn7mxiiqrcm4ucny-- --===============0209174881== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0209174881==--