From patchwork Mon Feb 22 21:08:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 102715 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp1478453lbl; Mon, 22 Feb 2016 13:13:06 -0800 (PST) X-Received: by 10.66.90.136 with SMTP id bw8mr41321356pab.52.1456175586697; Mon, 22 Feb 2016 13:13:06 -0800 (PST) Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [2610:10:20:722:a800:ff:fe36:1795]) by mx.google.com with ESMTP id z7si41950185par.88.2016.02.22.13.13.06; Mon, 22 Feb 2016 13:13:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 as permitted sender) client-ip=2610:10:20:722:a800:ff:fe36:1795; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 2610:10:20:722:a800:ff:fe36:1795 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 9CC9A6E2D2; Mon, 22 Feb 2016 21:13:05 +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 [217.72.192.74]) by gabe.freedesktop.org (Postfix) with ESMTPS id D65C46E2D2 for ; Mon, 22 Feb 2016 21:13:03 +0000 (UTC) Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue104) with ESMTPA (Nemesis) id 0MHpe9-1aWaD01xfx-003beL; Mon, 22 Feb 2016 22:12:59 +0100 From: Arnd Bergmann To: Rob Clark Subject: [PATCH 5/8] drm: msm: move DSI into separate module Date: Mon, 22 Feb 2016 22:08:39 +0100 Message-Id: <1456175331-714117-6-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:mDwr49MhM8QhueLy2lcezDwtzixS7vtL5IRIne/C1+eVADA+slg MVA2NiPONPkK8T6WSii9X2sTsFu5tL3pJ8egGEBjP/1EnDad+ATV1lrEVgSl3nXmryye382 Zkl4YqUTP5fK/ZzBgNj+V3wAE80ZFUgbuqqa9uIZ78LjYN58QmiBhZspY5Qp4C+FKTj8JVl +sQfLKXp+qpGCMe92wAfA== X-UI-Out-Filterresults: notjunk:1; V01:K0:iQyELN12HmA=:qB9XhvfbDMYr9taogLIHny JkUQ8hGRX3i1cfBVOjYPN6Hg867njTdOuzeZicesAgrQnjTqlNhVB2i1AQuo+1P/EtmBWMFLp r6R/9aDP8BD2pAef3OoT3Gqpa4VtCQSWeNbuHpBTpez9G9ZJFlLVUkDwgYHjnxC5xX0tfLbgS z17kebNY5OyThXyMcexfLWGIdImq46taE8Z9TTF2fXLloPPjsCB/oyw6keyk1JbPtaEnCP7Nh 7n5X5jb5xDuzbkK4Xu3wHVydjnXgQto8gNpfskm3n9Q//5QX2oe4SNiq34EASybTjkLKQIBMm su0TzFuEq6u0bxN6HTD+pi/FP1/adOMMpD7QngzGkRXU7UdDA8ll3DGP4e22E/9nQ+KQ0A13w FFjnS9kV8nl51PFnxgB7vp2Tp2MSxBFBSuRBkKWXRQNTTCbeKrYHZ0wZYnhHZluvNlKNRIzDQ 4DImNuDeKccY8LUOLDCocnGAbexXgFyzIUBmAWYVIE1AFL9lHRTRLIvD+WL+NtRJMtEUEiu+o L/SScMSxSN357Rd7Qi+yA2v0kLp3iKJIDTWw0AxI4Kao3Tbeisf66CkpUN7oZO5UO74P8kS6J Qvm/0W5BFIakG1lW1yzBUoS0pgFH4MoLiLDm7ycfg5/r6dNhK8WYwqQhdA70dr7BSGgxxsTZ9 civ+WVBon3qC0WI2uq+JmLrRoSQsANVAiSbnd3RCqJMlDBtffvUrF/B5ZczRqKkxUbUc= 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 DSI 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_dsi_register' This changes the DSI symbol to a 'tristate' so we can build it as a module, and exports the symbols as necessary. Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/msm/Makefile | 4 ++-- drivers/gpu/drm/msm/dsi/Kconfig | 7 ++++++- drivers/gpu/drm/msm/dsi/Makefile | 16 +++++++++------- drivers/gpu/drm/msm/dsi/dsi.c | 6 ++++-- drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h | 2 +- drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h | 2 +- drivers/gpu/drm/msm/msm_drv.h | 2 +- 7 files changed, 24 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/msm/Makefile b/drivers/gpu/drm/msm/Makefile index 6817e9390153..4b18a2c670b9 100644 --- a/drivers/gpu/drm/msm/Makefile +++ b/drivers/gpu/drm/msm/Makefile @@ -33,13 +33,13 @@ drm-msm-y := \ msm_rd.o \ msm_ringbuffer.o -drm-msm-$(CONFIG_DRM_MSM_DSI) += mdp/mdp4/mdp4_dsi_encoder.o \ +drm-msm-$(CONFIG_DRM_MSM_DSI_MODULE) += mdp/mdp4/mdp4_dsi_encoder.o \ mdp/mdp5/mdp5_cmd_encoder.o drm-msm-$(CONFIG_DRM_FBDEV_EMULATION) += msm_fbdev.o drm-msm-$(CONFIG_COMMON_CLK) += mdp/mdp4/mdp4_lvds_pll.o -obj-$(CONFIG_DRM_MSM_DSI) += dsi/ +obj-$(CONFIG_DRM_MSM_DSI_MODULE) += dsi/ obj-$(CONFIG_DRM_MSM_HDMI) += hdmi/ obj-$(CONFIG_DRM_MSM_EDP) += edp/ diff --git a/drivers/gpu/drm/msm/dsi/Kconfig b/drivers/gpu/drm/msm/dsi/Kconfig index 91dcf21bfc03..9cddaf0229f7 100644 --- a/drivers/gpu/drm/msm/dsi/Kconfig +++ b/drivers/gpu/drm/msm/dsi/Kconfig @@ -1,5 +1,5 @@ config DRM_MSM_DSI - bool "Enable DSI support in MSM DRM driver" + tristate "Enable DSI support in MSM DRM driver" depends on DRM_MSM select DRM_PANEL select DRM_MIPI_DSI @@ -8,6 +8,11 @@ config DRM_MSM_DSI Choose this option if you have a need for MIPI DSI connector support. +config DRM_MSM_DSI_MODULE + tristate + default y if DRM_MSM=y && DRM_MSM_DSI=m + default DRM_MSM_DSI + if DRM_MSM_DSI config DRM_MSM_DSI_PLL diff --git a/drivers/gpu/drm/msm/dsi/Makefile b/drivers/gpu/drm/msm/dsi/Makefile index 26c8fb689229..53d1cdc16748 100644 --- a/drivers/gpu/drm/msm/dsi/Makefile +++ b/drivers/gpu/drm/msm/dsi/Makefile @@ -1,13 +1,15 @@ ccflags-y := -Iinclude/drm -Idrivers/gpu/drm/msm -Idrivers/gpu/drm/msm/dsi -obj-y := dsi.o dsi_cfg.o dsi_host.o dsi_manager.o phy/dsi_phy.o +obj-$(CONFIG_DRM_MSM_DSI_MODULE) += drm-msm-dsi.o -obj-$(CONFIG_DRM_MSM_DSI_28NM_PHY) += phy/dsi_phy_28nm.o -obj-$(CONFIG_DRM_MSM_DSI_20NM_PHY) += phy/dsi_phy_20nm.o -obj-$(CONFIG_DRM_MSM_DSI_28NM_8960_PHY) += phy/dsi_phy_28nm_8960.o +drm-msm-dsi-y := dsi.o dsi_cfg.o dsi_host.o dsi_manager.o phy/dsi_phy.o + +drm-msm-dsi-$(CONFIG_DRM_MSM_DSI_28NM_PHY) += phy/dsi_phy_28nm.o +drm-msm-dsi-$(CONFIG_DRM_MSM_DSI_20NM_PHY) += phy/dsi_phy_20nm.o +drm-msm-dsi-$(CONFIG_DRM_MSM_DSI_28NM_8960_PHY) += phy/dsi_phy_28nm_8960.o ifeq ($(CONFIG_DRM_MSM_DSI_PLL),y) -obj-y += pll/dsi_pll.o -obj-$(CONFIG_DRM_MSM_DSI_28NM_PHY) += pll/dsi_pll_28nm.o -obj-$(CONFIG_DRM_MSM_DSI_28NM_8960_PHY) += pll/dsi_pll_28nm_8960.o +drm-msm-dsi-y += pll/dsi_pll.o +drm-msm-dsi-$(CONFIG_DRM_MSM_DSI_28NM_PHY) += pll/dsi_pll_28nm.o +drm-msm-dsi-$(CONFIG_DRM_MSM_DSI_28NM_8960_PHY) += pll/dsi_pll_28nm_8960.o endif diff --git a/drivers/gpu/drm/msm/dsi/dsi.c b/drivers/gpu/drm/msm/dsi/dsi.c index 6edcd6f57e70..8523a7cdc419 100644 --- a/drivers/gpu/drm/msm/dsi/dsi.c +++ b/drivers/gpu/drm/msm/dsi/dsi.c @@ -10,7 +10,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. */ - +#include #include "dsi.h" struct drm_encoder *msm_dsi_get_encoder(struct msm_dsi *msm_dsi) @@ -178,6 +178,7 @@ void __init msm_dsi_register(void) msm_dsi_phy_driver_register(); platform_driver_register(&dsi_driver); } +EXPORT_SYMBOL_GPL(msm_dsi_register); void __exit msm_dsi_unregister(void) { @@ -185,6 +186,7 @@ void __exit msm_dsi_unregister(void) msm_dsi_phy_driver_unregister(); platform_driver_unregister(&dsi_driver); } +EXPORT_SYMBOL_GPL(msm_dsi_unregister); int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev, struct drm_encoder *encoders[MSM_DSI_ENCODER_NUM]) @@ -262,4 +264,4 @@ fail: return ret; } - +EXPORT_SYMBOL_GPL(msm_dsi_modeset_init); diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h index b2828717be2a..3a9e7879d535 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h @@ -217,7 +217,7 @@ struct drm_encoder *mdp4_lcdc_encoder_init(struct drm_device *dev, struct drm_connector *mdp4_lvds_connector_init(struct drm_device *dev, struct device_node *panel_node, struct drm_encoder *encoder); -#ifdef CONFIG_DRM_MSM_DSI +#if IS_ENABLED(CONFIG_DRM_MSM_DSI) struct drm_encoder *mdp4_dsi_encoder_init(struct drm_device *dev); #else static inline struct drm_encoder *mdp4_dsi_encoder_init(struct drm_device *dev) diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h index 9a25898239d3..6a1325fd71aa 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h @@ -224,7 +224,7 @@ int mdp5_encoder_set_split_display(struct drm_encoder *encoder, int mdp5_encoder_get_linecount(struct drm_encoder *encoder); u32 mdp5_encoder_get_framecount(struct drm_encoder *encoder); -#ifdef CONFIG_DRM_MSM_DSI +#if IS_ENABLED(CONFIG_DRM_MSM_DSI) struct drm_encoder *mdp5_cmd_encoder_init(struct drm_device *dev, struct mdp5_interface *intf, struct mdp5_ctl *ctl); int mdp5_cmd_encoder_set_split_display(struct drm_encoder *encoder, diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index b8bd88b66c9c..86df81b46eb0 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -294,7 +294,7 @@ enum msm_dsi_encoder_id { MSM_DSI_CMD_ENCODER_ID = 1, MSM_DSI_ENCODER_NUM = 2 }; -#ifdef CONFIG_DRM_MSM_DSI +#if IS_ENABLED(CONFIG_DRM_MSM_DSI) void __init msm_dsi_register(void); void __exit msm_dsi_unregister(void); int msm_dsi_modeset_init(struct msm_dsi *msm_dsi, struct drm_device *dev,