From patchwork Wed Jul 26 13:53:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9864963 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 1EDAB602B1 for ; Wed, 26 Jul 2017 14:01:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF46128770 for ; Wed, 26 Jul 2017 14:01:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3E0928788; Wed, 26 Jul 2017 14:01:19 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable 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 A8F9528770 for ; Wed, 26 Jul 2017 14:01:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 290BC6E91B; Wed, 26 Jul 2017 14:01:19 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org X-Greylist: delayed 437 seconds by postgrey-1.35 at gabe; Wed, 26 Jul 2017 14:01:16 UTC Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.133]) by gabe.freedesktop.org (Postfix) with ESMTPS id BF6866E7C7; Wed, 26 Jul 2017 14:01:16 +0000 (UTC) Received: from wuerfel.lan ([5.56.224.194]) by mrelayeu.kundenserver.de (mreue005 [212.227.15.129]) with ESMTPA (Nemesis) id 0M7Fcg-1dp7c70MZ4-00x7G6; Wed, 26 Jul 2017 15:53:29 +0200 From: Arnd Bergmann To: dri-devel@lists.freedesktop.org Date: Wed, 26 Jul 2017 15:53:12 +0200 Message-Id: <20170726135312.2214309-4-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170726135312.2214309-1-arnd@arndb.de> References: <20170726135312.2214309-1-arnd@arndb.de> X-Provags-ID: V03:K0:DJLHfH0OhJ/9nr08FuELt9dFqMr+CS6YXqOYeMCsBO/ZBsMHlSt +rzguhqfJuPXImZ5obSxmIcHe0PFJL17fzk9qyIo7uNpC/6GSKmSPVGQB+8woc2OJEfaKWB ROEouin1VY1Jq24skxnvvF3Ov6sUgJZeMO+g0VvA/mkoRAzDN/KhGb6/UPn3svtudqX7rkK mwatI+OKha5Yu7yl90oIQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:+DkeU3jFrUg=:cWWAhWIsP6kj+yQ5eZJMDV aDQedI9QYN16frckW2fZGGyZe5NnpNDZyCYEHxb36UwW/3SeWalQzp2m94uvTgD8ntVDiHe/m p5GfbtldzzJSpPunc7wrPBIlVc3LtBxNgFVCE7wBLdln3qCfLzovBkDB9E/RxezykjBQD66U8 fBEl65qZaR1P5uUZdaY8nFtx+lFpGEkVaEaW51RhDn5zZxjxwKQt833zc4VAUGKVWb7cQncIj I0zBnWalzLVsUl6GPwblg65W7VFaLitnhD2ZopcpAeljzfzhRfRCtuIPJg6hf+T496jjCs/lH /+vbPlOxgVPA082bhr8Qj4vWpbqvQkPdAheol+Um4yoJ6tlkrkX8v0uyvdXPMU51bDoS9j+XP ijwi+Swk1FGfrjYfKtfQfbrtK2P4wGO38v9yS62gXlIIkj7Bo1XhHgu1zo3qQ1CBYSu79Y43E H82qW+l7JGhc1ZbyS8QjjD3xy7lK8XO6DEadwEaZ8m1P2xZ9tVgwttHx/q4jP0r2HBfzbukUk Y3Ys1Q1NgCvjK492bYEhaIEcWX5MBUC9mebxF7vHMLGppj4h2PqOd0QqtNYsDhuPFlHgqAOHL PqcB1aLV/OyHsCupmhjsCsD6Pr20tmcpLHvJNrlBPCPUMVkf6cJn3Y1lMweIA3A3bsyaBZliS yjS7ezU8tdlnis4NuAFJcwJVB0ewIhS8/etAYyUYMKarmj0tCY7tUI3Pa3GwrR0ritdbhT6sJ YdxVhf2cOmK9CE3LSo1vEpVZkPaozrZzDIWaUw== Cc: David Airlie , nouveau@lists.freedesktop.org, Jon Nettleton , platform-driver-x86@vger.kernel.org, Daniel Vetter , devel@driverdev.osuosl.org, Daniel Drake , Jens Frederich , linux-acpi@vger.kernel.org, Ben Skeggs , Russell King , Darren Hart , Len Brown , Arnd Bergmann , intel-gfx@lists.freedesktop.org, etnaviv@lists.freedesktop.org, Greg Kroah-Hartman , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Andy Shevchenko , Lucas Stach Subject: [Intel-gfx] [PATCH 3/3] drm/etnaviv: add thermal dependency X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP When CONFIG_THERMAL is enabled as a loadable module, and etnaviv is built-in, we get a link error: drivers/gpu/drm/etnaviv/etnaviv_gpu.o: In function `etnaviv_gpu_bind': etnaviv_gpu.c:(.text.etnaviv_gpu_bind+0x34): undefined reference to `thermal_of_cooling_device_register' etnaviv_gpu.c:(.text.etnaviv_gpu_bind+0xe0): undefined reference to `thermal_cooling_device_unregister' drivers/gpu/drm/etnaviv/etnaviv_gpu.o: In function `etnaviv_gpu_unbind': etnaviv_gpu.c:(.text.etnaviv_gpu_unbind+0xf0): undefined reference to `thermal_cooling_device_unregister' This adds a Kconfig dependency to prevent etnaviv from being built-in with CONFIG_THERMAL=m, while still allowing the valid configurations. Unfortunately, simply adding the dependency here breaks Kconfig through a dependency loop involving lots of symbols all the way until ACPI_VIDEO, which is the only video driver that explicitly selects 'THERMAL'. Turning this into a 'depends on' addresses the problem. For completeness, I'm also removing the redundant 'select THERMAL' from INTEL_MENLOW, so no other driver uses that statement. Fixes: bcdfb5e56dc5 ("drm/etnaviv: add etnaviv cooling device") Signed-off-by: Arnd Bergmann --- v2: spend more thought on ACPI_VIDEO dependencies, as we need another patch before this. --- drivers/acpi/Kconfig | 2 +- drivers/gpu/drm/etnaviv/Kconfig | 1 + drivers/platform/x86/Kconfig | 1 - 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index a8f5a40e2914..1282b2936164 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -184,7 +184,7 @@ config ACPI_VIDEO tristate "Video" depends on X86 depends on INPUT - select THERMAL + depends on THERMAL select BACKLIGHT_CLASS_DEVICE select BACKLIGHT_LCD_SUPPORT default y diff --git a/drivers/gpu/drm/etnaviv/Kconfig b/drivers/gpu/drm/etnaviv/Kconfig index 71cee4e9fefb..1d6c744e7924 100644 --- a/drivers/gpu/drm/etnaviv/Kconfig +++ b/drivers/gpu/drm/etnaviv/Kconfig @@ -3,6 +3,7 @@ config DRM_ETNAVIV tristate "ETNAVIV (DRM support for Vivante GPU IP cores)" depends on DRM depends on ARCH_MXC || ARCH_DOVE || (ARM && COMPILE_TEST) + depends on THERMAL || THERMAL=n depends on MMU select SHMEM select SYNC_FILE diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index 2d9fb46a8d11..d9238e9ff54a 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -532,7 +532,6 @@ config SENSORS_HDAPS config INTEL_MENLOW tristate "Thermal Management driver for Intel menlow platform" depends on ACPI_THERMAL - select THERMAL ---help--- ACPI thermal management enhancement driver on Intel Menlow platform.