From patchwork Fri Feb 23 13:06:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 10237623 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 8860560209 for ; Fri, 23 Feb 2018 13:11:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A224295B5 for ; Fri, 23 Feb 2018 13:11:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EBE3295B6; Fri, 23 Feb 2018 13:11:36 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 03377295B2 for ; Fri, 23 Feb 2018 13:11:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 41E596F0E7; Fri, 23 Feb 2018 13:11:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.135]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0C3476F0E7 for ; Fri, 23 Feb 2018 13:11:32 +0000 (UTC) Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0M62H4-1eW9m52pfm-00y71e; Fri, 23 Feb 2018 14:11:18 +0100 From: Arnd Bergmann To: Maxime Ripard , Chen-Yu Tsai Subject: [PATCH] drm/sun4i: link in front-end code if needed Date: Fri, 23 Feb 2018 14:06:52 +0100 Message-Id: <20180223131112.715992-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:ae3oP+fmoLgCueMJ06CwWph6/VZkJsVzsh+tpCfUPBug2+HVDrW kszn/k3eIsXa53WEbCAPiK+u/YUxV6dex9SayszXSbRT3TEAUGHVtMLauXEF1nLPPzAkjTL bkBCUoZEi9thpl+K4T4WV+iGtqhtsKC6TztjAtO/QtkOcWZr1Q40TiyTu+X4p7kgynA/KEJ pDOQ6CJLi+42b8T0Y5AkA== X-UI-Out-Filterresults: notjunk:1; V01:K0:TGs5xBvTHDw=:bcLf6l0hyyA62RgG0M38ko 48J+Qk1lNns7qwnx9GjzTPHkqghBw2oqhTgmzq/ZctWY16xI5LL1mgBJtaYiWxpPCCY3s1aUB xntKfuY/XpBcazyNBFIighnOPW23iMBjiyflCEZ7d7mf3fbuXIV9Gz/wRI/AysQGjDsfgb19x FBUPcH6FAyhMrJYiJ1B6eJ2Yo+x97/W9XnNFmmfKpe7txLvmS0Mkq9RPtYq7T683kAvUSmKcj 4+Ou9Lqzd5LckSfmLyzmNYOkxxoCeNARwuhJxwkcOsbXHk8jMUIhCzzQUsZh65ESQ1MxQW8JA Siyu5gQtlSxK1/RMR3JRLXh2dCnSW//ZTW3MXp7IPUGI9IsqFrtnUybaRXZB3Kim4aZuUIRLk /3eup7TxrvOdPfdErclG5l2Jixd6aWIN/0dG6Xo6mmfd5z/LJ9ga+lGp0NRoQtCYYflZv24cq mslpuAbblPNtanhxyf8RvYh8rqqB/xLcxeUdIp5cEhNtm78jxcm/Q5YCp6z6VaZFhIutAXOh2 P2SLtbvuBqERmAB8n/7Xidet2py7dIBSAD8X3Pkgem/6/kwZpfugpXWbDZWxx3sTfmNc+tP6X oY5OZk+kqUa2fkZRsMTHn8buvgOalQP76/oFRRe2quWQOAewYCCB8ix/FwHuuh/rdqphBKRAB LZU6CWifCf+GXYfhQ2JUmoDToICEeQqZGM5EPwT+vvlUILvk//6EFmxdcr6+CGMt8oGnzG6Zs 1lKU6gqEdbbPraEjBsvvKrP54WbfmKdzR+Qpgw== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Jernej Skrabec , Arnd Bergmann , David Airlie , Greg Kroah-Hartman , Jonathan Liu , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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") Signed-off-by: Arnd Bergmann --- 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 582607c0c488..db14e023256b 100644 --- a/drivers/gpu/drm/sun4i/Makefile +++ b/drivers/gpu/drm/sun4i/Makefile @@ -25,6 +25,9 @@ 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_SUN8I_MIXER) += sun8i-mixer.o