From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031041AbdDSS67 (ORCPT ); Wed, 19 Apr 2017 14:58:59 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:33440 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968934AbdDSS64 (ORCPT ); Wed, 19 Apr 2017 14:58:56 -0400 MIME-Version: 1.0 In-Reply-To: <20170419181209.537907-1-arnd@arndb.de> References: <20170419181209.537907-1-arnd@arndb.de> From: Andy Shevchenko Date: Wed, 19 Apr 2017 21:58:54 +0300 Message-ID: Subject: Re: [PATCH] drm/etnaviv: add thermal dependency To: Arnd Bergmann Cc: Lucas Stach , David Airlie , Zhang Rui , Eduardo Valentin , "linux-pm@vger.kernel.org" , Sujith Thomas , "Rafael J. Wysocki" , Len Brown , Russell King , Christian Gmeiner , Darren Hart , Andy Shevchenko , Daniel Vetter , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , etnaviv@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Platform Driver Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 19, 2017 at 9:11 PM, Arnd Bergmann wrote: > 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. > For PDx86 part: Acked-by: Andy Shevchenko > Fixes: bcdfb5e56dc5 ("drm/etnaviv: add etnaviv cooling device") > Signed-off-by: Arnd Bergmann > --- > 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. > -- > 2.9.0 > -- With Best Regards, Andy Shevchenko