From patchwork Tue May 20 09:15:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean Delvare X-Patchwork-Id: 4217211 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 02994BEEAB for ; Wed, 21 May 2014 14:17:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B27D5201FE for ; Wed, 21 May 2014 14:17:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 94C5B2018E for ; Wed, 21 May 2014 14:17:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C57B66EA59; Wed, 21 May 2014 07:17:54 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by gabe.freedesktop.org (Postfix) with ESMTP id 613E96E324 for ; Tue, 20 May 2014 02:15:30 -0700 (PDT) Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C82AAAC78; Tue, 20 May 2014 09:15:27 +0000 (UTC) Date: Tue, 20 May 2014 11:15:25 +0200 From: Jean Delvare To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/exynos: Fix PTN3460 dependency Message-ID: <20140520111525.3a62e25d@endymion.delvare> Organization: SUSE Linux X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; x86_64-suse-linux-gnu) MIME-Version: 1.0 X-Mailman-Approved-At: Wed, 21 May 2014 07:17:41 -0700 Cc: Kukjin Kim , Seung-Woo Kim , Alexander Graf , Kyungmin Park X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The following configuration options combination: CONFIG_DRM_EXYNOS_DP=y CONFIG_DRM_PTN3460=m currently leads to the following linker failure: drivers/built-in.o: In function `exynos_drm_attach_lcd_bridge': .../drivers/gpu/drm/exynos/exynos_dp_core.c:1004: undefined reference to `ptn3460_init' This is because ptn3460_init can't be implemented in a module while its caller is built into the kernel. So add the proper dependency in Kconfig so that the above can't happen. I moved DRM_PTN3460 earlier in Kconfig, next to the I2C helper module section, so that the user has a chance to select it before moving to the Exynos-specific section. IMHO the proper way to solve the problem would be to turn ptn3460 into a clean I2C driver, similar to the other I2C helper chip drivers. It's the only way to not sink into impossible-to-guess dependencies. Then ptn3460 could even be moved together with the other I2C helper chip drivers. Signed-off-by: Jean Delvare Cc: David Airlie Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Kukjin Kim Reviewed-by: Thierry Reding --- drivers/gpu/drm/Kconfig | 4 ++-- drivers/gpu/drm/exynos/Kconfig | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) --- linux-3.15-rc5.orig/drivers/gpu/drm/Kconfig 2014-04-14 09:42:29.689070224 +0200 +++ linux-3.15-rc5/drivers/gpu/drm/Kconfig 2014-05-19 14:47:02.872050099 +0200 @@ -83,6 +83,8 @@ config DRM_KMS_CMA_HELPER source "drivers/gpu/drm/i2c/Kconfig" +source "drivers/gpu/drm/bridge/Kconfig" + config DRM_TDFX tristate "3dfx Banshee/Voodoo3+" depends on DRM && PCI @@ -199,5 +201,3 @@ source "drivers/gpu/drm/msm/Kconfig" source "drivers/gpu/drm/tegra/Kconfig" source "drivers/gpu/drm/panel/Kconfig" - -source "drivers/gpu/drm/bridge/Kconfig" --- linux-3.15-rc5.orig/drivers/gpu/drm/exynos/Kconfig 2014-04-14 09:42:29.698070438 +0200 +++ linux-3.15-rc5/drivers/gpu/drm/exynos/Kconfig 2014-05-19 15:23:18.867919528 +0200 @@ -50,7 +50,7 @@ config DRM_EXYNOS_DSI config DRM_EXYNOS_DP bool "EXYNOS DRM DP driver support" - depends on DRM_EXYNOS && ARCH_EXYNOS + depends on DRM_EXYNOS && ARCH_EXYNOS && (DRM_PTN3460=n || DRM_PTN3460=y || DRM_PTN3460=DRM_EXYNOS) default DRM_EXYNOS help This enables support for DP device.