From patchwork Mon Jun 5 12:00:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13267263 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 712FFC7EE23 for ; Mon, 5 Jun 2023 12:01:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=O44RS3C2iOO+LCNqKTw4flW+pp8ztDqFX0R1yg3tCyA=; b=4ykzBY9meBNsAL gfbbwNcs1MMoKSzj+Cph+JaLR3PsyZ3DntMeIlOWNn/LyCkvJZkEOO8+0AoYMCNrFueX014THIHKk hdfrcmDvR41yAE9q2MJET4RfZEnWlFqoqgj0JYCvRbEjZ3O0b2RDV1UPXsfbzH2O7IFl9bEyS0ipb wOtFeEdAXMd8Ac++zGXHCe6oYFkYlY8lZV/BylRGla1X1joMSQJtSezzRwL0RC3HbRcb+6l4wbtxe vKM3MHrdPFGpqFt+lKS1BFE5tjTznPQDqwJI7iboOPVudJK3ft1dMqjnxqnL4C7W/8ZQgHJQp0qXR beUjtEoSkF6hZ+o+P2hg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q68tF-00FMc4-2V; Mon, 05 Jun 2023 12:00:49 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q68tC-00FMbF-19 for linux-arm-kernel@lists.infradead.org; Mon, 05 Jun 2023 12:00:47 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1393C62312; Mon, 5 Jun 2023 12:00:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D69A9C433EF; Mon, 5 Jun 2023 12:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685966443; bh=kfbk3hOkmnywwFv/S2NyjZP/fcC6qc/lEB2wv6BgwAE=; h=From:To:Cc:Subject:Date:From; b=dcm1pLPbRliA4HEfxQpwnenvf9MqT032BiTxY+XIDpjKUGeff6fxkYTJGsp4eA/V9 X7fD2FsynBFmB3QGCksv9t79IUelYCxsvZcv47pG7YyMQTjFKLB4Cxb9KY5RHVradX 8s21MHKxkRvRapw3oNylYJbIaSYEaKLelMWiq9cpFjQTJx7cJu8WXv0vA2Frl1Lxy0 ea4XIjE35D9Uchqs9X37ZOmf9DKh6geL2UxXX3MTxHxB0SZRYs1SF8NYG9ZoRDktxx saM7ZRmuQsNIOaqeEVg5CSADg6W1YVhx7UZgi7R8T7KL5XMtWvAaSopKRkBKRh0OVi dEWDehpOkE10A== From: Masahiro Yamada To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, Liu Ying , Masahiro Yamada , Laurent Pinchart , Daniel Vetter , David Airlie , Fabio Estevam , NXP Linux Team , Nick Terrell , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 1/2] drm/bridge: imx: fix mixed module-builtin object Date: Mon, 5 Jun 2023 21:00:20 +0900 Message-Id: <20230605120021.1774711-1-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230605_050046_495777_30B270C5 X-CRM114-Status: GOOD ( 14.11 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org With CONFIG_DRM_IMX8QM_LDB=m and CONFIG_DRM_IMX8QXP_LDB=y (or vice versa), imx-ldb-helper.o is linked to a module and also to vmlinux even though the expected CFLAGS are different between builtins and modules. This is the same situation as fixed by commit 637a642f5ca5 ("zstd: Fixing mixed module-builtin objects"). Split imx-ldb-helper.c into a separate module. Signed-off-by: Masahiro Yamada Reviewed-by: Laurent Pinchart Reviewed-by: Liu Ying --- Changes in v3: - Remove MODULE_ALIAS() Changes in v2: - Add a separate module instead of making the functions static inline drivers/gpu/drm/bridge/imx/Kconfig | 5 +++++ drivers/gpu/drm/bridge/imx/Makefile | 5 +++-- drivers/gpu/drm/bridge/imx/imx-ldb-helper.c | 17 +++++++++++++++++ 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/bridge/imx/Kconfig b/drivers/gpu/drm/bridge/imx/Kconfig index 608f47f41bcd..9fae28db6aa7 100644 --- a/drivers/gpu/drm/bridge/imx/Kconfig +++ b/drivers/gpu/drm/bridge/imx/Kconfig @@ -1,9 +1,13 @@ if ARCH_MXC || COMPILE_TEST +config DRM_IMX_LDB_HELPER + tristate + config DRM_IMX8QM_LDB tristate "Freescale i.MX8QM LVDS display bridge" depends on OF depends on COMMON_CLK + select DRM_IMX_LDB_HELPER select DRM_KMS_HELPER help Choose this to enable the internal LVDS Display Bridge(LDB) found in @@ -13,6 +17,7 @@ config DRM_IMX8QXP_LDB tristate "Freescale i.MX8QXP LVDS display bridge" depends on OF depends on COMMON_CLK + select DRM_IMX_LDB_HELPER select DRM_KMS_HELPER help Choose this to enable the internal LVDS Display Bridge(LDB) found in diff --git a/drivers/gpu/drm/bridge/imx/Makefile b/drivers/gpu/drm/bridge/imx/Makefile index aa90ec8d5433..5fc821278693 100644 --- a/drivers/gpu/drm/bridge/imx/Makefile +++ b/drivers/gpu/drm/bridge/imx/Makefile @@ -1,7 +1,8 @@ -imx8qm-ldb-objs := imx-ldb-helper.o imx8qm-ldb-drv.o +obj-$(CONFIG_DRM_IMX_LDB_HELPER) += imx-ldb-helper.o +imx8qm-ldb-objs := imx8qm-ldb-drv.o obj-$(CONFIG_DRM_IMX8QM_LDB) += imx8qm-ldb.o -imx8qxp-ldb-objs := imx-ldb-helper.o imx8qxp-ldb-drv.o +imx8qxp-ldb-objs := imx8qxp-ldb-drv.o obj-$(CONFIG_DRM_IMX8QXP_LDB) += imx8qxp-ldb.o obj-$(CONFIG_DRM_IMX8QXP_PIXEL_COMBINER) += imx8qxp-pixel-combiner.o diff --git a/drivers/gpu/drm/bridge/imx/imx-ldb-helper.c b/drivers/gpu/drm/bridge/imx/imx-ldb-helper.c index 7338b84bc83d..6967325cd8ee 100644 --- a/drivers/gpu/drm/bridge/imx/imx-ldb-helper.c +++ b/drivers/gpu/drm/bridge/imx/imx-ldb-helper.c @@ -4,8 +4,10 @@ * Copyright 2019,2020,2022 NXP */ +#include #include #include +#include #include #include @@ -19,12 +21,14 @@ bool ldb_channel_is_single_link(struct ldb_channel *ldb_ch) { return ldb_ch->link_type == LDB_CH_SINGLE_LINK; } +EXPORT_SYMBOL_GPL(ldb_channel_is_single_link); bool ldb_channel_is_split_link(struct ldb_channel *ldb_ch) { return ldb_ch->link_type == LDB_CH_DUAL_LINK_EVEN_ODD_PIXELS || ldb_ch->link_type == LDB_CH_DUAL_LINK_ODD_EVEN_PIXELS; } +EXPORT_SYMBOL_GPL(ldb_channel_is_split_link); int ldb_bridge_atomic_check_helper(struct drm_bridge *bridge, struct drm_bridge_state *bridge_state, @@ -38,6 +42,7 @@ int ldb_bridge_atomic_check_helper(struct drm_bridge *bridge, return 0; } +EXPORT_SYMBOL_GPL(ldb_bridge_atomic_check_helper); void ldb_bridge_mode_set_helper(struct drm_bridge *bridge, const struct drm_display_mode *mode, @@ -69,6 +74,7 @@ void ldb_bridge_mode_set_helper(struct drm_bridge *bridge, break; } } +EXPORT_SYMBOL_GPL(ldb_bridge_mode_set_helper); void ldb_bridge_enable_helper(struct drm_bridge *bridge) { @@ -81,6 +87,7 @@ void ldb_bridge_enable_helper(struct drm_bridge *bridge) */ regmap_write(ldb->regmap, ldb->ctrl_reg, ldb->ldb_ctrl); } +EXPORT_SYMBOL_GPL(ldb_bridge_enable_helper); void ldb_bridge_disable_helper(struct drm_bridge *bridge) { @@ -95,6 +102,7 @@ void ldb_bridge_disable_helper(struct drm_bridge *bridge) regmap_write(ldb->regmap, ldb->ctrl_reg, ldb->ldb_ctrl); } +EXPORT_SYMBOL_GPL(ldb_bridge_disable_helper); int ldb_bridge_attach_helper(struct drm_bridge *bridge, enum drm_bridge_attach_flags flags) @@ -117,6 +125,7 @@ int ldb_bridge_attach_helper(struct drm_bridge *bridge, ldb_ch->next_bridge, bridge, DRM_BRIDGE_ATTACH_NO_CONNECTOR); } +EXPORT_SYMBOL_GPL(ldb_bridge_attach_helper); int ldb_init_helper(struct ldb *ldb) { @@ -157,6 +166,7 @@ int ldb_init_helper(struct ldb *ldb) return 0; } +EXPORT_SYMBOL_GPL(ldb_init_helper); int ldb_find_next_bridge_helper(struct ldb *ldb) { @@ -184,6 +194,7 @@ int ldb_find_next_bridge_helper(struct ldb *ldb) return 0; } +EXPORT_SYMBOL_GPL(ldb_find_next_bridge_helper); void ldb_add_bridge_helper(struct ldb *ldb, const struct drm_bridge_funcs *bridge_funcs) @@ -204,6 +215,7 @@ void ldb_add_bridge_helper(struct ldb *ldb, drm_bridge_add(&ldb_ch->bridge); } } +EXPORT_SYMBOL_GPL(ldb_add_bridge_helper); void ldb_remove_bridge_helper(struct ldb *ldb) { @@ -219,3 +231,8 @@ void ldb_remove_bridge_helper(struct ldb *ldb) drm_bridge_remove(&ldb_ch->bridge); } } +EXPORT_SYMBOL_GPL(ldb_remove_bridge_helper); + +MODULE_DESCRIPTION("i.MX8 LVDS Display Bridge(LDB)/Pixel Mapper bridge helper"); +MODULE_AUTHOR("Liu Ying "); +MODULE_LICENSE("GPL"); From patchwork Mon Jun 5 12:00:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 13267264 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6FFF5C77B73 for ; Mon, 5 Jun 2023 12:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=jwqGvLmIiFeLBrD1WN20cpZxE976rlmHDmpGkatGBmU=; b=QuViMuoM2oHBvB E9rZpBkP7Rn/M0MJq5W/rTHX8Tcipp5q9pzwq0xSkJx5HgAgky/faWSD6YzCXGLUEV+/oxLi/L2zm QnHeqUgkEPUx4q6SUqsGePq/uzD/3gr+3HN7BEf9dVcc8fHXkTZarKnsIG8FMtfsRkh4NYBSd9fgj jrpQk2e92npEhkXQuL8Ik5jpqVbyboUImonrkzHkEOXMeu5XSK/VKfG7g8TJ+wzdBIeQDGVNVt25t Hp2gqxW9HXhUAt5mcA0YS7SfHa0tWQ6rvBwN5KmNLdFkiIoNRxLmHOCuVpPaJ2ELDu0ps90VTgu6X qjTpnvz+vxJn1Jg9YKaA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q68tI-00FMdM-1E; Mon, 05 Jun 2023 12:00:52 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q68tG-00FMc8-0M for linux-arm-kernel@lists.infradead.org; Mon, 05 Jun 2023 12:00:51 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 96F9262305; Mon, 5 Jun 2023 12:00:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 796E7C433D2; Mon, 5 Jun 2023 12:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1685966449; bh=XPB0BbK3vhUlsT1QahX5H2dgsnI0TVn8UcxJ28yK8I0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sP0DdDfHi1HRVVjEKZgxYPsYymQBaH5AIJSIAzHxkK0x7LOYzT9Ks45Q+HatDzAlI GK3QxNoCVE2RrWseXFe1+yAvua1cJ9Ad9v6hARlwdkwWlbVyLQ6LfLRdviC7zevwvk +wiedI7I+HxWILXZWvwz1WSndqbFg1HC1l8AVIk4rz8ox7vQ8aojD69WiqEnL8rZPJ GGT0SvUtLVyp5WHCOXkWpvrYceZ6oVQQgPsweMw6orS06G4Kt5W7B4zvOg0SkV64bD cRAzjIQiqqIqyZBj4Hov9GEpIVQl7IMNWoeUrBDpiqHF9A+Xbr5wGfbi4eefXmsF4v vIG3Z5ZhtpuXw== From: Masahiro Yamada To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , dri-devel@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, Liu Ying , Masahiro Yamada , Laurent Pinchart , Daniel Vetter , David Airlie , Fabio Estevam , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 2/2] drm/bridge: imx: turn imx8{qm,qxp}-ldb into single-object modules Date: Mon, 5 Jun 2023 21:00:21 +0900 Message-Id: <20230605120021.1774711-2-masahiroy@kernel.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230605120021.1774711-1-masahiroy@kernel.org> References: <20230605120021.1774711-1-masahiroy@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230605_050050_188722_A06D7680 X-CRM114-Status: GOOD ( 10.06 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org With the previous fix, these modules are built from a single C file. Rename the source files so they match the module names. Signed-off-by: Masahiro Yamada Reviewed-by: Laurent Pinchart Reviewed-by: Liu Ying --- (no changes since v1) drivers/gpu/drm/bridge/imx/Makefile | 4 ---- drivers/gpu/drm/bridge/imx/{imx8qm-ldb-drv.c => imx8qm-ldb.c} | 0 .../gpu/drm/bridge/imx/{imx8qxp-ldb-drv.c => imx8qxp-ldb.c} | 0 3 files changed, 4 deletions(-) rename drivers/gpu/drm/bridge/imx/{imx8qm-ldb-drv.c => imx8qm-ldb.c} (100%) rename drivers/gpu/drm/bridge/imx/{imx8qxp-ldb-drv.c => imx8qxp-ldb.c} (100%) diff --git a/drivers/gpu/drm/bridge/imx/Makefile b/drivers/gpu/drm/bridge/imx/Makefile index 5fc821278693..8e2ebf3399a1 100644 --- a/drivers/gpu/drm/bridge/imx/Makefile +++ b/drivers/gpu/drm/bridge/imx/Makefile @@ -1,10 +1,6 @@ obj-$(CONFIG_DRM_IMX_LDB_HELPER) += imx-ldb-helper.o -imx8qm-ldb-objs := imx8qm-ldb-drv.o obj-$(CONFIG_DRM_IMX8QM_LDB) += imx8qm-ldb.o - -imx8qxp-ldb-objs := imx8qxp-ldb-drv.o obj-$(CONFIG_DRM_IMX8QXP_LDB) += imx8qxp-ldb.o - obj-$(CONFIG_DRM_IMX8QXP_PIXEL_COMBINER) += imx8qxp-pixel-combiner.o obj-$(CONFIG_DRM_IMX8QXP_PIXEL_LINK) += imx8qxp-pixel-link.o obj-$(CONFIG_DRM_IMX8QXP_PIXEL_LINK_TO_DPI) += imx8qxp-pxl2dpi.o diff --git a/drivers/gpu/drm/bridge/imx/imx8qm-ldb-drv.c b/drivers/gpu/drm/bridge/imx/imx8qm-ldb.c similarity index 100% rename from drivers/gpu/drm/bridge/imx/imx8qm-ldb-drv.c rename to drivers/gpu/drm/bridge/imx/imx8qm-ldb.c diff --git a/drivers/gpu/drm/bridge/imx/imx8qxp-ldb-drv.c b/drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c similarity index 100% rename from drivers/gpu/drm/bridge/imx/imx8qxp-ldb-drv.c rename to drivers/gpu/drm/bridge/imx/imx8qxp-ldb.c