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: 129361 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp588880lja; Fri, 23 Feb 2018 05:11:36 -0800 (PST) X-Google-Smtp-Source: AH8x22581bqPaNn/Bawa9OLxPVOh4kgCPgEUi0yHgXdNYo5RVDkse0L6PLi1VCffKBvnK1Vx8K4h X-Received: by 2002:a17:902:8c93:: with SMTP id t19-v6mr892267plo.304.1519391496419; Fri, 23 Feb 2018 05:11:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519391496; cv=none; d=google.com; s=arc-20160816; b=b/SFUxqMUJkvclqoWuEizhIZWcHggR3qiBekdwj27vFNPCDcHSQRtJhECS1DHCSfTW foGjCzqW+fmjRp70AVyCZTyo5FJPuTk1NIdsEUC0YYE7wvgFfHZovnJRlYql+OKIeOO1 bASpP/2u0r6uGhWD7RUbD1+mUmyaoG+45I12DgI6BjxziXmAgK31tpdeOwmgT5D95bTU StJt72Wfpnp8rGuoCL7OqubzF68/9dKoBy245i9MANyYoVvizcuD1QppS0U+54yZ1esm 3d0UKTFGr5uJU9lCGVR9m2E7IQTwEl2yRRSZBTPiSOidK0Hov7e0BTEp5w9LZLTAvpdR q6yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=TUUjAfI8//Wjl7nFYIbUdKL4BEBxIM7057Z132H4XKE=; b=joGQd6BjqUfFhublI0gemRcTc1MtMLcBXFNg4zAKzY449cZkEYjqE9Pwsu6zeoE5aR wTijMpeUkpB6scOpzCxIhqSn2StdDAoH+yurZ6rVGIQCbpZ9mC0ny80wa0z1+iK6vY9T hqnz4PxX/VWPgHUvwOlAHCnWtGn+sv9M8YZmMnd8meNxggaBUxzYQ793U5mFOwQjYcif 8n76ALFh5hBlDYiDjk8xCs9Z3FxedL9tuv65BwCcJp6bUTQ13XiQKQYMAioiCcuKijuU c2Jx5ueyOuE02b+frTWcm/h4xXC5R8XFQyLjDi755uJjzfnu/5+mClshtozh3/IKweLc 8/bw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id c12-v6si1787847plo.278.2018.02.23.05.11.36 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 23 Feb 2018 05:11:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org 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" 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