From patchwork Wed Apr 19 18:11:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9688597 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 BFBD5602C9 for ; Wed, 19 Apr 2017 18:12:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B72BA282E2 for ; Wed, 19 Apr 2017 18:12:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ABACB2843B; Wed, 19 Apr 2017 18:12:27 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham 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 597BC282E2 for ; Wed, 19 Apr 2017 18:12:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 82B3F6E2D8; Wed, 19 Apr 2017 18:12:26 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1FFC06E2D8 for ; Wed, 19 Apr 2017 18:12:23 +0000 (UTC) Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue003 [212.227.15.129]) with ESMTPA (Nemesis) id 0MEJGG-1cpsW01Paa-00FQlZ; Wed, 19 Apr 2017 20:12:08 +0200 From: Arnd Bergmann To: Lucas Stach , David Airlie Subject: [PATCH] drm/etnaviv: add thermal dependency Date: Wed, 19 Apr 2017 20:11:16 +0200 Message-Id: <20170419181209.537907-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:LGqBExYSnhicBHRlsTAvBNJQahfqCYlLZYAYDxLEQ9vmw3A1ltD aij7wbFCtVCvVmNjyC84o/FwQWFuYZZWbSGLWbk8SGmk8deLFkc0s3oX8ADGjH+3n3wJfGV vmFtTG8HFdAZ0LnqthIEKhZM1WxVp+E2qq31ec+mWIV6kKYGO6LKKA98HDgS3kN9y+oWlSU MzAtnULANvrxGZF3qTD/w== X-UI-Out-Filterresults: notjunk:1; V01:K0:ife9pfDM6xU=:0D07fWOzo2HbtpiRVVOmqK bND8c3HrLbmB3QCl1naOt3CPQ3TG7ebbRvvvpqiFaVJ7fQRlC0rDDmu7XYizh6H3LVMMGVPsD SHS4piOFJhEtQ9OGQFm7SCBj4M7YchBb8ak/2QAWHc4lTUUwCmpMWqQU2MD2OWEWTF2TfrhNg IgK2yUA7bMh2Tm/hNoAUaBpbcr2ZrXasoampZLxS9TB/sw5WBkh3ck1ET1vNpFPFgoEhtf7Zv kUVCK2DjfL16gl19VwXZGKIPDvGwQTsLMkoSxaVvgVdWS2yauY9Y0qKM1zvNf5FzPEYF0Kwck 6TnEZPsuDUJ5uw5NVfKDG+nN+dYUq+kEe0bDyHSqTJxPytUo2W3nRtBbRjT5ONSPMGYdCVVoy lLLtGuzctGxgZKoyEtoOsloUT3NBEK11KyeWuPUY5VnMuiwAyxgzoZvygZ9gtCoUfsioS0AyP 3hp6MyfMBzWRybnzT+ZkObVkKCDgT4S/ywhqd4JUlS2XZ9XZGkzo5TEzL2Jnkb7XH/Sj6PAfl fOjYol1C7gSEuUiCQIZ1x/P0neokGNlx0SO/uYGC4sMj285GlDsy8npejCqEm9U6uyEx1JisS owl9eApSEzzaq9y7aSPZ/ai8KgJ95rCepOF7hT1DG2LiXtxkXiXHgL1Kz8WDR1EdVsN07hlJL PZA7jRCOPSmZDlA3X78Bb2neSnOIWcmFlbwM8TTwyG47DdqMCsEsTeUgEdJJmgtUBPHY= Cc: Arnd Bergmann , linux-pm@vger.kernel.org, Sujith Thomas , Daniel Vetter , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, etnaviv@lists.freedesktop.org, Eduardo Valentin , linux-acpi@vger.kernel.org, Russell King , Darren Hart , Zhang Rui , platform-driver-x86@vger.kernel.org, Andy Shevchenko , Len Brown X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Acked-by: Andy Shevchenko Acked-by: Eduardo Valentin --- 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 03cc4e74096b..252399efa8b3 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -184,7 +184,7 @@ config ACPI_VIDEO tristate "Video" depends on X86 && BACKLIGHT_CLASS_DEVICE depends on INPUT - select THERMAL + depends on THERMAL help This driver implements the ACPI Extensions For Display Adapters for integrated graphics devices on motherboard, as specified in 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 e229ea317b9c..76ced87efde5 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -544,7 +544,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.