From patchwork Fri Jul 21 21:12:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9857699 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 9D540600F5 for ; Fri, 21 Jul 2017 21:18:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 871BD205AB for ; Fri, 21 Jul 2017 21:18:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7B7AA28552; Fri, 21 Jul 2017 21:18:29 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM 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 091BC205AB for ; Fri, 21 Jul 2017 21:18:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 04FEB6E8F6; Fri, 21 Jul 2017 21:18:28 +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.187]) by gabe.freedesktop.org (Postfix) with ESMTPS id 65B206E8F6 for ; Fri, 21 Jul 2017 21:18:25 +0000 (UTC) Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0MYa6I-1d3EBe1WSo-00VPzW; Fri, 21 Jul 2017 23:12:16 +0200 From: Arnd Bergmann To: Mark Yao , David Airlie , Heiko Stuebner Subject: [PATCH] [RESEND] drm/rockchip: fix Kconfig dependencies Date: Fri, 21 Jul 2017 23:12:06 +0200 Message-Id: <20170721211214.3386387-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:d4B1/7bGJwWyOK3R8zgBe1nETAgm053gP9+DXavRNHbJ8fzoDQX fNPcQkae5mvM9gm0IVMKKkbd8bRGg8BT+fkX03Gok6eKfhU7HU0D/h+Fy8d0kRE39gFpMDB pra6/dDTtus8qKRv+R87w7Cnz4KR4EYndb2VquA/WUD4n7B9BsKBw9gkcbegbyT6Hwu+fEF 7TWh+SzW2ewgDTKX4rgfA== X-UI-Out-Filterresults: notjunk:1; V01:K0:VwwZX1piRjw=:u7e2A+zhlWP82zR96BjKll yO1dfC7p/g7ubdPZ/Ubca7kC4AlK6WR3Qb8cXu8ZWmLPCnHoMzzPz5SvAmhV+3EEc9zYIlJZa izYqR5zgab3OiRjBJuhaSJfiz1DugBEtOklI2vncUyE+i4b7DVo/5A8PjxOHpoZUJB2XxMyHM SAbVHNtB2VaIEUn3fddU+J4KxCdVGoK2HvQGFI0cuvnFTdanNRqDdDbO0cvkTRBoNkj0Z3efm xE+zvcpI6a9+ld2SexR5m+LqdbO8DMQMuysRSaD/pFabFAiSUnkABdEY3f5zDlilOmSvTydHN PLVmtjFKDPRpmV2j6hrBhjlK4s0lVZ+sy0eIGgGF4GQZwQn3JHODmq7BX03cbcPzUSNAKy54Y X/NhkkafZUaesagyRrffw5iKYeBG5VCX+3kL9dtWOhpw84emjG3DoBM4CxbwRy+xIun2EdCqo a+4739mBj9nX6fn5Ii+FgRQKtvS1LbWZmeORyMOejVXoO9ZG+hFNLMkSe/mBBR+kTlj65IfHN CXqQCMkuSjJ4ei3G2qUiVuRHAiNFv8lBmPWkfGSHr1HBPB55KqA1UbLiURRk2O7XLaT2k79fP caqUcqj5McmDRgrEO4dCI1mx/6wKNXrsMSdgDKTYnoimVTehhhd8+Uw3gjFCEo4AcJDmVjfXk L8YBfjQVYG9g2/A13EY6nWQKlQKj/sFIsj/NntFUUvWrKfUioCENlwsdlKvUQEW0qDirvepzf 8KgtBc7fuW5TAqNnUHIxbxq5RwTYKJZCoL84Og== Cc: Jeffy Chen , Arnd Bergmann , linux-rockchip@lists.infradead.org, Stephen Boyd , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Chris Zhong , Guenter Roeck , linux-arm-kernel@lists.infradead.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" X-Virus-Scanned: ClamAV using ClamSMTP A bug that I had fixed earlier just came back, with CONFIG_EXTCON=m, the rockchip drm driver will fail to link: drivers/gpu/drm/rockchip/cdn-dp-core.o: In function `cdn_dp_get_port_lanes': cdn-dp-core.c:(.text.cdn_dp_get_port_lanes+0x30): undefined reference to `extcon_get_state' cdn-dp-core.c:(.text.cdn_dp_get_port_lanes+0x6c): undefined reference to `extcon_get_property' drivers/gpu/drm/rockchip/cdn-dp-core.o: In function `cdn_dp_check_sink_connection': cdn-dp-core.c:(.text.cdn_dp_check_sink_connection+0x80): undefined reference to `extcon_get_state' drivers/gpu/drm/rockchip/cdn-dp-core.o: In function `cdn_dp_enable': cdn-dp-core.c:(.text.cdn_dp_enable+0x748): undefined reference to `extcon_get_property' The problem is that that the sub-drivers are now all linked into the main rockchip drm module, which breaks all the Kconfig dependencies that are specified in the options for those sub-drivers. This clarifies the dependency to ensure that we can only turn on the DP driver when EXTCON is reachable. As the 'select' statements can now cause additional options to become built-in when they should be loadable modules, I'm moving those into the main driver config option. The dependency on DRM_ROCKCHIP can be reduced into a single 'if' statement here for brevity, but this has no functional effect. Fixes: b6705157b2db ("drm/rockchip: add extcon dependency for DP") Fixes: 8820b68bd378 ("drm/rockchip: Refactor the component match logic.") Link: https://patchwork.kernel.org/patch/9648761/ Acked-by: Guenter Roeck Tested-by: Jeffy Chen Signed-off-by: Arnd Bergmann --- Originally submitted on March 28, got two positive replies, but the patch was never applied in mainline. --- drivers/gpu/drm/rockchip/Kconfig | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/rockchip/Kconfig b/drivers/gpu/drm/rockchip/Kconfig index 50c41c0a50ef..dcc539ba85d6 100644 --- a/drivers/gpu/drm/rockchip/Kconfig +++ b/drivers/gpu/drm/rockchip/Kconfig @@ -5,6 +5,10 @@ config DRM_ROCKCHIP select DRM_KMS_HELPER select DRM_PANEL select VIDEOMODE_HELPERS + select DRM_ANALOGIX_DP if ROCKCHIP_ANALOGIX_DP + select DRM_DW_HDMI if ROCKCHIP_DW_HDMI + select DRM_MIPI_DSI if ROCKCHIP_DW_MIPI_DSI + select SND_SOC_HDMI_CODEC if ROCKCHIP_CDN_DP && SND_SOC help Choose this option if you have a Rockchip soc chipset. This driver provides kernel mode setting and buffer @@ -12,10 +16,10 @@ config DRM_ROCKCHIP 2D or 3D acceleration; acceleration is performed by other IP found on the SoC. +if DRM_ROCKCHIP + config ROCKCHIP_ANALOGIX_DP bool "Rockchip specific extensions for Analogix DP driver" - depends on DRM_ROCKCHIP - select DRM_ANALOGIX_DP help This selects support for Rockchip SoC specific extensions for the Analogix Core DP driver. If you want to enable DP @@ -23,9 +27,7 @@ config ROCKCHIP_ANALOGIX_DP config ROCKCHIP_CDN_DP bool "Rockchip cdn DP" - depends on DRM_ROCKCHIP - depends on EXTCON - select SND_SOC_HDMI_CODEC if SND_SOC + depends on EXTCON=y || (EXTCON=m && DRM_ROCKCHIP=m) help This selects support for Rockchip SoC specific extensions for the cdn DP driver. If you want to enable Dp on @@ -34,8 +36,6 @@ config ROCKCHIP_CDN_DP config ROCKCHIP_DW_HDMI bool "Rockchip specific extensions for Synopsys DW HDMI" - depends on DRM_ROCKCHIP - select DRM_DW_HDMI help This selects support for Rockchip SoC specific extensions for the Synopsys DesignWare HDMI driver. If you want to @@ -44,8 +44,6 @@ config ROCKCHIP_DW_HDMI config ROCKCHIP_DW_MIPI_DSI bool "Rockchip specific extensions for Synopsys DW MIPI DSI" - depends on DRM_ROCKCHIP - select DRM_MIPI_DSI help This selects support for Rockchip SoC specific extensions for the Synopsys DesignWare HDMI driver. If you want to @@ -54,8 +52,9 @@ config ROCKCHIP_DW_MIPI_DSI config ROCKCHIP_INNO_HDMI bool "Rockchip specific extensions for Innosilicon HDMI" - depends on DRM_ROCKCHIP help This selects support for Rockchip SoC specific extensions for the Innosilicon HDMI driver. If you want to enable HDMI on RK3036 based SoC, you should select this option. + +endif