From patchwork Tue Mar 28 10:16:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9648761 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 1765A601D7 for ; Tue, 28 Mar 2017 10:17:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE0912236A for ; Tue, 28 Mar 2017 10:17:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCF73282E2; Tue, 28 Mar 2017 10:17:50 +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=-1.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 60F8F2236A for ; Tue, 28 Mar 2017 10:17:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject: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=Bbej1M8pvXTHkekdgTHBi3V9uhRTznoaqfmwPYjXoEE=; b=XJg piO4rSaI0VbBAdvEMyChtf4LqHGbzJRAvo/VGHevdMpngRCJecumsd0k/tiDrpM8+4l0j4nuSEXVs gXvX8RPP7d88B3UA+7SF/w1UHEISuDTUl45Zw2R8ymNOcmApqAwYdblxcWUDK2AYjsNOfZ4K+fVxC NFzRK9wPBILsXsNBSZQAXaKnsenSJLuTJeHWcq4XD2Jd4CLo/CJYE/16ed2ak+ekHZ5ITa1EgfVUs nZjfC3G5fLI/XVj4iOzH3BpO3Twxp91NjzdQbKFQhl6QGUAlOTHDcVugGvIhaETwSiMJATyWs6k8z +dBcWKL2tFw+Ax1n81DmVHz66X49vUA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1csoCD-0003va-Gz; Tue, 28 Mar 2017 10:17:49 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1csoC4-0003pd-Ez; Tue, 28 Mar 2017 10:17:46 +0000 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0MPMdk-1coOKc2qUC-004TFa; Tue, 28 Mar 2017 12:17:02 +0200 From: Arnd Bergmann To: Mark Yao , David Airlie , Heiko Stuebner Subject: [PATCH] drm/rockchip: fix Kconfig dependencies Date: Tue, 28 Mar 2017 12:16:40 +0200 Message-Id: <20170328101654.73624-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:4dgjW2uvBg6jLU5dtXWs92QZGwHxYMYIe3FwZgjILDZqc8bdjg+ R2qGiVi8fjQpLYJNmMBfKAlTZTonDEDRvMHvPp9ikFPgIhc2dKuxtwMRLDGRqagmYk/JqXG OEF04+YWBj52w9yl6J1QcQt9PfSm9xC/YgSH4BsrG/fn4gdU5mm7a+JMaj0IP3eH6PU0yRg 8H12N+MK76H2jYnF2elBQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:OlIFqyobi9o=:ymkwK3aM+lVn7Lw34KWOJ9 QxfW56jaPtFQPhPO2R9EhAJZ5UWfENl0pX17ElHNAskmWUrrSMnqjII7RTBzPY+UVIojnzUDA CnS72lTnziyd/Yc0tPvFIlKU6i73R5uF8X6y745MfO63lCwkS6JmlhTIflK2nzdb9RuwZBOgA tZb7OGyGFRyWAcCD5oX/d4PPZgcdG1aVYQyEZHuqJ3vEqjSwebJAQoye4mX5giMsZL4xhv/Ea nzRx/dTfhLuCY4As3h2TUWHcqMBwqhzEFjT7GU5+aTbwrCxf8ysmCpAhqnzch0eNx6evt8Kz7 FCahJML6nK4bu+yYinKeP+gqEiarpCU77iw8rk9fKktMldG6ui3mZJJN4PBv+UKHLSijR32DZ nZtymUmaxypQBeTFAoBz4HBEzzwqwo/MdqTg4b2LAcROEw+P6g/c+tdVTEwxVl4RcktTgjzTQ 4OXyIxniHncJilxKiV9lg25U0YG52K2il+S94ko8UOMGtgsbNfsTHdWsnn7P2AAKeN1rli35Q ioroOwami6v6fcQvctU03qoS5Ag6exSXzwEZKS/EvFwG+9X36CE2fbMbOZ70GpuJPxYp4tlTJ JHuyl/bMG9FPOH/bKtutYOO5L9kUFQQdHNuZ/lYAk7gzc8OEmNtvTcrgloz8U4IadIIEXqXlZ iyVSMyFSMflx2AT+ttDvJ2UE/v039y8pGRuOD+v6oXInOehE34WzwbhPXOqjjnSXqaSs= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170328_031740_971055_44DD64E9 X-CRM114-Status: GOOD ( 14.33 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Stephen Boyd , Arnd Bergmann , Tobias Jakobi , Daniel Vetter , Jeffy Chen , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Chris Zhong , Sean Paul , Yakir Yang , Guenter Roeck , linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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.") Signed-off-by: Arnd Bergmann Acked-by: Guenter Roeck Tested-by: Jeffy Chen --- 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