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: 108514 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp1279602qge; Fri, 21 Jul 2017 14:13:01 -0700 (PDT) X-Received: by 10.84.210.203 with SMTP id a69mr9461430pli.387.1500671581782; Fri, 21 Jul 2017 14:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1500671581; cv=none; d=google.com; s=arc-20160816; b=W9Y+4V9Ap48zzKlk+YUqzvXzMnyLy9VpADd5HRR0cHPcH2KKEpnmnzaQP004ORNEQ8 b8uzpGUwvK22U3pHjtiKlY6WK9d6zIpqSbQuM3p6ya6oyU32GWTuoSoZLlIELRIqj5ta DSI0iFJN96xur5I9V4hQMhi42gjeJZyk78W1pNCbpNc5ADR4ISYQ+rXwY36cZyZnNLSS EKAh9HHGLNAqoaI7KPEpwHibDe3f7sAAsBDCz9ZU4FBIECUf5MvzC4/ZDDdiEk49MVjM BrGbvhcJwcyHw0iQB4HwVH9cuCJo/k8Ki6Mjh9GwaTt601tZlmdsMozG17fFr8So7UMZ ivXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=juz/atauiGCb0M9zZjS2TSX1bSr2mV5+8IA23VTLmPo=; b=rS2kZSB9TBgzRpTtPI4XfC/KIn+T4G5o6WK187cZZp7tU/E3ISKv8ov5jTTElu/I/f NcnhoB3mFDYhC/lJpf4Ekq4JtVX60tLW5yZzAohU3sTszgEy6HuajMhqFrUYK/BoA7qj 9XZTyuBnUIEhSCqqar6Mrj6P7GbO1G3ihNY7E044cjkpQHhss62OuBvg1GGQbpsks7OO F3Yfv7oah6Sv1JQFVo6xd458RN0HgQV9+AtViTE2YFSxhRNZ8e4pQB6+YnZyftscYn6N oOSgLpZX1gRgIXjBS2qss+aD6FGQtED35WfbfE10iUeV5JmS8uXXASNLKVvumM833GNw ncbA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u59si3492703plb.513.2017.07.21.14.13.01; Fri, 21 Jul 2017 14:13:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754651AbdGUVM6 (ORCPT + 26 others); Fri, 21 Jul 2017 17:12:58 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:54252 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752048AbdGUVM5 (ORCPT ); Fri, 21 Jul 2017 17:12:57 -0400 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 Cc: Arnd Bergmann , Guenter Roeck , Sean Paul , robdclark@gmail.com, Jeffy Chen , Stephen Boyd , Chris Zhong , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] [RESEND] drm/rockchip: fix Kconfig dependencies Date: Fri, 21 Jul 2017 23:12:06 +0200 Message-Id: <20170721211214.3386387-1-arnd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PJDjW7VQCnAThIUGdnbA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.9.0 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