Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1896684imm; Fri, 7 Sep 2018 07:47:49 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbqPSYXPmvwNrGI5+aAJS5raJ20g0Ba+dP9yURV/d6w+RVezkJhGt1unI9uiMRge/RTseJR X-Received: by 2002:a63:9f19:: with SMTP id g25-v6mr8803372pge.39.1536331669213; Fri, 07 Sep 2018 07:47:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536331669; cv=none; d=google.com; s=arc-20160816; b=QzAh9aILD8XrCzOvsictiRbA3dBz/lZ82E53xGdwVSY3aZOmnt/o5BfJNK0lA759hb eCEvPp2oZpaxORMb8LaBpnZtiVRH6Ib/icWwbAQZUGySt2o5MpHlvckg3yxgRn/NZKA7 Q0UrFNFr4LloVFMBMdj61FlyWCBROgcXHp5fgRWb2IxNLBkkZUptI+kY/LCqBB4dgHI2 rN3hnQPhIdSeEgaXIggtxBUXdGyJy47VblXIW0StSuCc2WnObWI5GRN8BnSaAq+Lxhv4 9mpenNNFz0d7KpJOKVMNp3KWHJqeyUN32mq5eICVAGxf5bA/Bd4OJ4iO1wx4pz2ec+s6 kMIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=hVFUkyg6meSueZhToRxtC4sUiQ54v3CK7K3eCSvq58Y=; b=BMwVDLcZFurEHBHRVGcEPQNU6pyAEJVCR6+k3omDFQQvHWOADEB4/PC58+jdcJMD6d OJzjy5qxJuaB3dym1bSyyq3gry9hbLluUqeMVKGPmmjdzyKbrnhIE7nXQruQ5hDsYsXe uZIqn9RK/qrV823IqnTwA2T13mrzuck7ZCQDXpFLI3p44/wZVk5a15XPmNgg8u6GeHBR VhxOxAC6m26TeZR26QIL6NlQvYZKRELOkOjcpTTSvuMsx79WBdelpcfKwFBzaQrRVEUn O8I+FwYpIJgUcmWv7kwq5NNs+8PrT0DfGmrsXJZESELuNh5h1a1gKOZ8sPUnqSOXMoGw jIsQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b2-v6si9533716plm.202.2018.09.07.07.47.33; Fri, 07 Sep 2018 07:47:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728258AbeIGQXc (ORCPT + 99 others); Fri, 7 Sep 2018 12:23:32 -0400 Received: from mail.bootlin.com ([62.4.15.54]:39798 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbeIGQXb (ORCPT ); Fri, 7 Sep 2018 12:23:31 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id BABE020726; Fri, 7 Sep 2018 13:42:56 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (AAubervilliers-681-1-30-219.w90-88.abo.wanadoo.fr [90.88.15.219]) by mail.bootlin.com (Postfix) with ESMTPSA id 806A120701; Fri, 7 Sep 2018 13:42:56 +0200 (CEST) Date: Fri, 7 Sep 2018 13:42:55 +0200 From: Maxime Ripard To: Arnd Bergmann Cc: Jonathan Hunter , Chen-Yu Tsai , dri-devel , Linux ARM , Linux Kernel Mailing List , Jernej Skrabec Subject: Re: [PATCH] [v3] drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m Message-ID: <20180907114255.7j7r6wzolnz5qkk7@flea> References: <20180711144403.1022829-1-arnd@arndb.de> <105cb1cf-577a-043a-9b50-248a37090bdd@nvidia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="4zkbdfg7sppywb2m" Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --4zkbdfg7sppywb2m Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 07, 2018 at 01:26:30PM +0200, Arnd Bergmann wrote: > On Fri, Sep 7, 2018 at 11:41 AM Jon Hunter wrote: > > > > > > On 11/07/18 15:43, Arnd Bergmann wrote: > > > Having DRM_SUN4I built-in but DRM_SUN8I_MIXER as a loadable module re= sults 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-hdm= i.ko] undefined! > > > ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-drm.ko]= undefined! > > > > > > This solves the problem by adding a silent symbol for the tcon_top mo= dule, > > > building it as a separate module in exactly the cases that we need it, > > > but in a way that it is reachable by the other modules. > > > > > > Fixes: 57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possib= le crtcs") > > > Fixes: ef0cf6441fbb ("drm/sun4i: Add support for traversing graph wit= h TCON TOP") > > > Signed-off-by: Arnd Bergmann > > I am seeing the following on today's -next (20180907) as well the last > > few -next versions for that matter ... > > > > ERROR: "sun8i_tcon_top_de_config" [drivers/gpu/drm/sun4i/sun4i-tcon.ko]= undefined! > > ERROR: "sun8i_tcon_top_set_hdmi_src" [drivers/gpu/drm/sun4i/sun4i-tcon.= ko] undefined! > > ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-tcon.ko] = undefined! > > > > Seems like this issue has cropped up again as Arnd's fix is present. I > > am seeing this on ARM64 builds. >=20 > I have not started build testing on linux-next since the merge window, but > looking at the changes that got queued up, I find commits cf77d79b4e29 > ("drm/sun4i: tcon: Add another way for matching mixers with tcon") and > 0305189afb32 ("drm/sun4i: tcon: Add support for R40 TCON") that both > introduced a reference to the tcon_top file from sun4i_tcon.c. >=20 > More IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) checks in > the caller like I did in my patch would help, or alternatively one could > decide to give up and just always include the TCON_TOP. Sorry for the breakage. Can you test: ----8<---- diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/drivers/gpu/drm/sun4i/sun= 4i_tcon.c index 4834c90b4912..c78cd35a1294 100644 --- a/drivers/gpu/drm/sun4i/sun4i_tcon.c +++ b/drivers/gpu/drm/sun4i/sun4i_tcon.c @@ -974,7 +974,8 @@ static bool sun4i_tcon_connected_to_tcon_top(struct dev= ice_node *node) =20 remote =3D of_graph_get_remote_node(node, 0, -1); if (remote) { - ret =3D !!of_match_node(sun8i_tcon_top_of_table, remote); + ret =3D !!(IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && + of_match_node(sun8i_tcon_top_of_table, remote)); of_node_put(remote); } =20 @@ -1402,13 +1403,20 @@ static int sun8i_r40_tcon_tv_set_mux(struct sun4i_t= con *tcon, if (!pdev) return -EINVAL; =20 - if (encoder->encoder_type =3D=3D DRM_MODE_ENCODER_TMDS) { + if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP) && + encoder->encoder_type =3D=3D DRM_MODE_ENCODER_TMDS) { ret =3D sun8i_tcon_top_set_hdmi_src(&pdev->dev, id); if (ret) return ret; } =20 - return sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); + if (IS_ENABLED(CONFIG_DRM_SUN8I_TCON_TOP)) { + ret =3D sun8i_tcon_top_de_config(&pdev->dev, tcon->id, id); + if (ret) + return ret; + } + + return 0; } =20 static const struct sun4i_tcon_quirks sun4i_a10_quirks =3D { ----8<---- Thanks! Maxime --=20 Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --4zkbdfg7sppywb2m Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAluSZD4ACgkQ0rTAlCFN r3Q6YQ//Yw5kuFRiog0m6febtwKIWUZc3Q3Yal+Xk+HgIw3yH03lRluKYwj8cY92 EYooUSv8eErK+8Z7DHYvTyMHWcZ6PVIAEq0sWRmlwac4PlJRhWGHAbbH1OozAG+i RARz9LE/0Qmwnj648KxVqmF07ttApht4ECJRp8RCrogrC5HKyOtCTb/y3iVdwsMz SjcUJbRC3oN+0qTOrbV3H0bGUbRwvb4SXI4X8USzwIXEcXUbiq03YioE+TDL8oz8 qkV8RiHPwD0NCGSAtVFmRXbyyv59zGiLWymuJXVvl8caoZm7XLBdnqyrAu07lk93 Y4jnYPyOtxOkQ4eGBcJgF+AAwR7njPgbhbkR4dONrd+lm6UCr5Q5rSJWjvJLijYc cWb+zjra7OOP33BnX1zJYaT17SzXRbfHH1xPURuCxxpYNn95fOdM2PbWE1Y6Ea98 fZpNFSb76zrVLcOSe3tY+abd6B8BU9WnFK5Prf/5YD2fTYTLJiYO1hksm0Qyv+Jt YZ+gsU+VGKuCsk+OsFp2lYfS6cUbVB30vtfjqqtDQBic73LilcKUxbqSSm+jJVtX 94TmcgcXooXZXe03vFqbnynp2Nuee0ETInH8rtd8cWtGKq1ZvDP5facBO+ldj6kK bmZaPwx92XHRJsZ+eNrtaohmnJSNEIyJWKs3iiE5T/mYMOxVBYc= =H2q2 -----END PGP SIGNATURE----- --4zkbdfg7sppywb2m--