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: 9864901 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 388336038C for ; Wed, 26 Jul 2017 13:55:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BC2D28740 for ; Wed, 26 Jul 2017 13:55:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1037928769; Wed, 26 Jul 2017 13:55:35 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B7CD228740 for ; Wed, 26 Jul 2017 13:55:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751620AbdGZNzM (ORCPT ); Wed, 26 Jul 2017 09:55:12 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:56725 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751103AbdGZNys (ORCPT ); Wed, 26 Jul 2017 09:54:48 -0400 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 Cc: Arnd Bergmann , "Rafael J. Wysocki" , Len Brown , Lucas Stach , Russell King , Christian Gmeiner , David Airlie , Patrik Jakobsson , Daniel Vetter , Jani Nikula , Ben Skeggs , Darren Hart , Andy Shevchenko , Jens Frederich , Daniel Drake , Jon Nettleton , Greg Kroah-Hartman , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, etnaviv@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, nouveau@lists.freedesktop.org, platform-driver-x86@vger.kernel.org, devel@driverdev.osuosl.org Subject: [PATCH 3/3] drm/etnaviv: add thermal dependency 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:xfjjhtLsffM=:D3GdfRP0jeG139pIG/d8aR Ej/9XqVjwY3BXoP8LSWABaKVqXYPTGh89uYVapF95/iRFV+8GHwSyjxmbPC9P522BGVzioEpR 94Ehl24mYpq5wgneQpF2p4fTXXleazw0GaUt7DQ0BTAES/kGjMPlbtrwjqjs78MHjkqZrYFqG K0auPDQPwVwAgPQI+NclZMczWn3RKZSOAeCqsruCoWmQWaXsYFHiqtzuEBcen7+BICAndYTzb dNTqxN/fvnzYJNyTo0OYUCsNfc3sEgW3Kd9o11DeENKTo+dvBKuWqHWlZ5SOGdIUHmzobCv5C dG/nP1YWGvoGjfmugOJgeGUYIHsTx+eYyxgwB/teajStMWDY9WLVzfOyg0uqwfRvcAs5w0qD/ x+2G2pUaABMafjbwq8cahpdP/Zdwvas0aHBDmkSkLFCCwJjrwPEs/dtaEc/LPNj+t/5yjYmEK Cw0Peh+ekvEMK8wkwmRa163rCYea9MmwlCscmlRd8puBnW3Q5x7/8AOSbacEziDwAMBqR/uA1 chaF1s73lkL2oPEr/aqG8pnypBqP2OYYqmMIqvSlb9zZJqPXPXQCHfgZXuMg9qUJoL04YBr8H i99ckMdsuTVsEwYkIgDG9PnKi8IGcLa2MEgl/Z0KiULFoiloYcpHObKH/5ZhHnE/f030JN2gH f7tb2Ky4kgfIEFSyg7AEoVXBYSyr9WDnuWnmnDkPJloDfve0buBLfgddKwrFReHoemOe8EudQ i6oZHTxy4Zq9ucPmlmyTuDuu0n4MeU3mt3egtw== Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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.