From patchwork Fri Jul 6 14:28:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10511847 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6EADA6024A for ; Fri, 6 Jul 2018 14:29:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EAA028680 for ; Fri, 6 Jul 2018 14:29:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 52CE72869F; Fri, 6 Jul 2018 14:29:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id F135F28680 for ; Fri, 6 Jul 2018 14:29:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=hAMRtmuNrsCDGHvoMh/dUKHvw2jnxnUQcvLO278sTY0=; b=i1u l6w8Zd0KEAhOJiyw+/FuJCHDa1kBds1zvPiqwQeahN2TdgWwjFgT/ggDFuPoUtd4Zcd12zGWxz1h3 GjAZXI6VgJKPrEqItUHDkSK55GXLOtwAenP0cDQYYe3iB2NJeba6lYRfz4uB5Qx/DPF/CjvF11Ioh kZJi6kvnTp2cN8mPDzEeYInY+w7FXlamIEZHH+v2dnnrmVqzWOLmsLJzWIUiyuPH53nT9AtxzIW67 QIf0W7mzDaAO5VZbrLfUaS48cPygG6qkprDw7Lp6A5JthLJkgaXhM5WQYAwTl6jSQ+4UZQ1WNklkx j863Bw9vuxcyDVbGVtmBEuOhnEQ8tPg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fbRjX-0004T8-VN; Fri, 06 Jul 2018 14:29:15 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fbRjU-0004Rw-0y for linux-arm-kernel@lists.infradead.org; Fri, 06 Jul 2018 14:29:13 +0000 Received: from wuerfel.lan ([46.223.138.35]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0MDCnY-1fKsnO38oO-00GcH9; Fri, 06 Jul 2018 16:28:50 +0200 From: Arnd Bergmann To: Maxime Ripard , David Airlie , Chen-Yu Tsai Subject: [PATCH] [RESEND] drm/sun4i: link in front-end code if needed Date: Fri, 6 Jul 2018 16:28:28 +0200 Message-Id: <20180706142847.2032381-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:fCaH8MbrLFLFzY6/9NThH6GI7c9wvj1lmRUnFVz5arfs/O0ZERD 0CnelIfcFumZX9Qh8D9k8AflLdgtG3CZxZf/nNBWJMWqqMsx2mNdtEM6Pe04RS/I5cT45PZ 4585G7Uz292oK49AEHFOGwp1zEnC4Z4kNwSF6CUVTxvxpuxkgj0wLZ/sjHkH2Dz0LE93InJ oMPaVKE89OGgQKOu9E9Kg== X-UI-Out-Filterresults: notjunk:1; V01:K0:UvFfUBKP+Fc=:fLa48AGu0FlVChJ/1G97mk jd80hOB54JVw7Hde6kjlGYNjCUNreeqXvZ5KEIHFWUNuAQhiOF8L9l4C832J3m0ZGtbwE2Fst ZzEWiRF1KGBOnKA0xiwPjSPX5HUL7Er2y2AXrZsByi/6sVLp6rJioCIpdXcb1KEQj+LBFKIgR RzXmzjdNlTD2YzIRU4GimMjgwy3ewUk6B3xGIHZysJ9GbmHtsFSd0CGDJnxKWmoC5oTMQ/Qwz JUBhIBKRzvQjQD5hFgsR5OgIuzuAm2br5JXgGiQv0pjMcPgRs8lJ+kaGFeT+8gwLwcBEc/2U4 EbaWK7oYtB9B7Z6B0M1eA1TuLFvcr3o/f3KwFdwPrN9yhOyq8IRIm7wWn0rvqFK1vTRuo1PS9 kZcNAn5G7nh5AVkAz5caYa+m7TI6+Z1TIShoqg941ce911l8fbspZRznnyu4Fd4GLIZU/F3zJ hOApEj0U/Mvw2iWvTmEWqDfO8HU4Fsj118UjEwsWq05UfzSqJ2DEr56VCIzP80mvttuMHhw9l QjfmWQDmRNu+Y32YuheKTUjkB5OjjSYo1LtwLupKqx/g0bcU4H0A+rBdypE5gTNy/xmx2m1wD 6e8kHwY4kjYncSmlN1cxXJvEUDto3k+URkiIRPcP2HQu6U9MMT5lEANK+2NP2YxKk6PEI+wgJ Qnrn39dGq+0jNCwYVvKU3+Y8i63lCC4zPm07ecQXewtwpeQBv+EchlwP3vu2U7/QTyrQ= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180706_072912_365037_BC7165D6 X-CRM114-Status: GOOD ( 11.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Jonathan Liu , Arnd Bergmann , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When the base sun4i DRM driver is built-in but the back-end is a loadable module, we run into a link error: drivers/gpu/drm/sun4i/sun4i_drv.o: In function `sun4i_drv_probe': sun4i_drv.c:(.text+0x60c): undefined reference to `sun4i_frontend_of_table' The dependency is a bit tricky, the best workaround I have come up with is to use a Makefile hack to to interpret both CONFIG_DRM_SUN4I_BACKEND=m and CONFIG_DRM_SUN4I_BACKEND=y as a directive to build the front-end the same way as the main module. Fixes: dd0421f47505 ("drm/sun4i: Add a driver for the display frontend") Link: https://lore.kernel.org/lkml/20180301091908.zcptz3ezqr2c6ly5@flea/ Signed-off-by: Arnd Bergmann --- I stumbled over this one again when I sent a related patch. --- drivers/gpu/drm/sun4i/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/Makefile b/drivers/gpu/drm/sun4i/Makefile index 3daed14941ca..11de3cd52dae 100644 --- a/drivers/gpu/drm/sun4i/Makefile +++ b/drivers/gpu/drm/sun4i/Makefile @@ -32,7 +32,10 @@ obj-$(CONFIG_DRM_SUN4I) += sun4i-tcon.o obj-$(CONFIG_DRM_SUN4I) += sun4i_tv.o obj-$(CONFIG_DRM_SUN4I) += sun6i_drc.o -obj-$(CONFIG_DRM_SUN4I_BACKEND) += sun4i-backend.o sun4i-frontend.o +obj-$(CONFIG_DRM_SUN4I_BACKEND) += sun4i-backend.o +ifdef CONFIG_DRM_SUN4I_BACKEND +obj-$(CONFIG_DRM_SUN4I) += sun4i-frontend.o +endif obj-$(CONFIG_DRM_SUN4I_HDMI) += sun4i-drm-hdmi.o obj-$(CONFIG_DRM_SUN6I_DSI) += sun6i-dsi.o obj-$(CONFIG_DRM_SUN8I_DW_HDMI) += sun8i-drm-hdmi.o