From patchwork Mon Feb 22 21:08:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102714 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1478617lbl; Mon, 22 Feb 2016 13:13:34 -0800 (PST) X-Received: by 10.66.124.201 with SMTP id mk9mr27974444pab.152.1456175614008; Mon, 22 Feb 2016 13:13:34 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTP id q28si42027442pfi.178.2016.02.22.13.13.33; Mon, 22 Feb 2016 13:13:33 -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 9AD796E2D4; Mon, 22 Feb 2016 21:13:32 +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.17.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6346A6E2D4 for ; Mon, 22 Feb 2016 21:13:31 +0000 (UTC) Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0LjJuR-1ZwyU21OkJ-00dUQt; Mon, 22 Feb 2016 22:13:29 +0100 From: Arnd Bergmann To: Rob Clark Subject: [PATCH 6/8] drm: msm: move EDP into separate module Date: Mon, 22 Feb 2016 22:08:40 +0100 Message-Id: <1456175331-714117-7-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1456175331-714117-1-git-send-email-arnd@arndb.de> References: <1456175331-714117-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:aWQ5lJy6XwPaZvxHiqc2gk/SFdaFCQ+ZLHoUNu1NqGSB+WSd4i6 XSTtElY8Ahe2D/Ujs6REfp1tTK/vywpCCH0WVobXV3POVNqayE6PnGPGMMa2/yIZP0v5tea 9C7oa6GW2yhcsJlh/RNqX3pMUaJKDkHRJ1YpjEQvWKHyAEXizvKBCeVzU4ijloc7zkSzZkw e7mt+XQcWtffJFnzbw/1A== X-UI-Out-Filterresults: notjunk:1; V01:K0:xw+pyFZvWQ8=:R2YCgjrYlPGqcnOr79qkY8 XLYdqIOr55AhTmH4y8Td7p0jcwEEr8bbecjwuVjJDkt01OWSqF6uijATQ0wtCo1ad4k7wZatf WloKQ919Fp3TjCPuw9LTcEIYxhS1UF0/mMmzwUvOs+u+NK0cD4EcDS6z7+LjcZyjwHdusEv88 rKyP+uEojVQNlKtUiqpQofa9OWnaUd3P/PiDCQi/AgMrfVrfuPGOdtuExB8dkI1Gi6zqRdYrR PMskY9yfByKjiG1CQcjQGSzdbhswgk9MEzmXVLoOeBYHKenkFxZVfrYY/fk62N2e2ZbWyhPJX jbw3lZ4Lz5Twj7zytaP7XI1WbME0AhNoyMytl1HiCG/6dtsiyplGey8Ssnz5ze+wv7XEqA4v3 3BoeOpOXr+FcL/M7INc4HH36FZx7AhwLW5uvIV94CO20E0ukwI6Hfs2aUyq6tFE8WhGUg7ZzI av7AmjWfA8hsbLRHCGNvjjjDtq1bkQw3kv6p0r4JkOSXq00RWvZ7do98E6LXnlM3bbNUF4NQT R3krg0AVnbDlui7TdKcqLBMXBGGhET9xubCW+0G3J3HwInv8GyLuK4di7H9qN5fAUlM0K9ttE 5BEHIulpVFhPDaUdgeAzxAdesBSN4HTSK832Das2ppEir8CIR8fBMtucDgghapZOxJP6Ma7On ovkoglQ3WkWr2WszRiQ7MfsDkGkw/Pp1310FDga1rCXLrqSiiHN8SGpXsXMcWhU3rNf0= Cc: dri-devel@lists.freedesktop.org, Arnd Bergmann , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Moving around the Makefile for EDP caused a link error with the main driver referring to a builtin module that has no exported symbols: drivers/gpu/built-in.o: In function `msm_drm_register': :(.init.text+0x654): undefined reference to `msm_edp_register' This changes the EDP symbol to a 'tristate' so we can build it as a module, and exports the symbols as necessary. Fixes: 75a5cfa5739f ("drm/msm/edp: Create separate Makefile/Kconfig") --- drivers/gpu/drm/msm/Makefile | 2 +- drivers/gpu/drm/msm/edp/Kconfig | 7 ++++++- drivers/gpu/drm/msm/edp/Makefile | 4 +++- drivers/gpu/drm/msm/edp/edp.c | 4 ++++ drivers/gpu/drm/msm/msm_drv.h | 2 +- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile index 4b18a2c670b9..e67bdaa14635 100644 --- a/drivers/gpu/drm/msm/Makefile +++ b/drivers/gpu/drm/msm/Makefile @@ -41,7 +41,7 @@ drm-msm-$(CONFIG_COMMON_CLK) += mdp/mdp4/mdp4_lvds_pll.o obj-$(CONFIG_DRM_MSM_DSI_MODULE) += dsi/ obj-$(CONFIG_DRM_MSM_HDMI) += hdmi/ -obj-$(CONFIG_DRM_MSM_EDP) += edp/ +obj-$(CONFIG_DRM_MSM_EDP_MODULE) += edp/ obj-$(CONFIG_DRM_MSM) += drm-msm.o drm_msm_helper.o diff --git a/drivers/gpu/drm/msm/edp/Kconfig b/drivers/gpu/drm/msm/edp/Kconfig index 576d8c2fd713..b4cecabebc1d 100644 --- a/drivers/gpu/drm/msm/edp/Kconfig +++ b/drivers/gpu/drm/msm/edp/Kconfig @@ -1,7 +1,12 @@ config DRM_MSM_EDP - bool "Enable EDP support in MSM DRM driver" + tristate "Enable EDP support in MSM DRM driver" depends on DRM_MSM default y help Choose this option if you have a need for Embedded Display Port encoder support. + +config DRM_MSM_EDP_MODULE + tristate + default y if DRM_MSM=y && DRM_MSM_EDP=m + default DRM_MSM_EDP diff --git a/drivers/gpu/drm/msm/edp/Makefile b/drivers/gpu/drm/msm/edp/Makefile index e623d59d1706..37c45037f76f 100644 --- a/drivers/gpu/drm/msm/edp/Makefile +++ b/drivers/gpu/drm/msm/edp/Makefile @@ -1,3 +1,5 @@ ccflags-y := -Iinclude/drm -Idrivers/gpu/drm/msm -obj-y := edp.o edp_aux.o edp_bridge.o edp_connector.o edp_ctrl.o edp_phy.o +obj-$(CONFIG_DRM_MSM_EDP_MODULE) := drm-msm-edp.o + +drm-msm-edp-y := edp.o edp_aux.o edp_bridge.o edp_connector.o edp_ctrl.o edp_phy.o diff --git a/drivers/gpu/drm/msm/edp/edp.c b/drivers/gpu/drm/msm/edp/edp.c index 0940e84b2821..48645d0d649a 100644 --- a/drivers/gpu/drm/msm/edp/edp.c +++ b/drivers/gpu/drm/msm/edp/edp.c @@ -11,6 +11,7 @@ * GNU General Public License for more details. */ +#include #include #include "edp.h" @@ -136,12 +137,14 @@ void __init msm_edp_register(void) DBG(""); platform_driver_register(&edp_driver); } +EXPORT_SYMBOL_GPL(msm_edp_register); void __exit msm_edp_unregister(void) { DBG(""); platform_driver_unregister(&edp_driver); } +EXPORT_SYMBOL_GPL(msm_edp_unregister); /* Second part of initialization, the drm/kms level modeset_init */ int msm_edp_modeset_init(struct msm_edp *edp, struct drm_device *dev, @@ -206,3 +209,4 @@ fail: return ret; } +EXPORT_SYMBOL_GPL(msm_edp_modeset_init); diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index 86df81b46eb0..8786738a6832 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -266,7 +266,7 @@ static inline void __exit msm_hdmi_unregister(void) #endif struct msm_edp; -#ifdef CONFIG_DRM_MSM_EDP +#if IS_ENABLED(CONFIG_DRM_MSM_EDP) void __init msm_edp_register(void); void __exit msm_edp_unregister(void); int msm_edp_modeset_init(struct msm_edp *edp, struct drm_device *dev,