From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S976138AbdDXRji (ORCPT ); Mon, 24 Apr 2017 13:39:38 -0400 Received: from mail-oi0-f68.google.com ([209.85.218.68]:33315 "EHLO mail-oi0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S972424AbdDXRj2 (ORCPT ); Mon, 24 Apr 2017 13:39:28 -0400 MIME-Version: 1.0 In-Reply-To: <1493030694.2891.10.camel@pengutronix.de> References: <20170419181209.537907-1-arnd@arndb.de> <1493030694.2891.10.camel@pengutronix.de> From: Arnd Bergmann Date: Mon, 24 Apr 2017 19:39:27 +0200 X-Google-Sender-Auth: OwzKSkyoMO8dYFFNsGIj1Nz7Akg Message-ID: Subject: Re: [PATCH] drm/etnaviv: add thermal dependency To: Lucas Stach Cc: 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 , ACPI Devel Maling List , Linux Kernel Mailing List , etnaviv@lists.freedesktop.org, dri-devel , platform-driver-x86@vger.kernel.org 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 Mon, Apr 24, 2017 at 12:44 PM, Lucas Stach wrote: > Am Mittwoch, den 19.04.2017, 20:11 +0200 schrieb Arnd Bergmann: >> 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 > > This patch mixes a few things, so the subject doesn't really fit. I'm > fine with taking the patch trough my tree, if I can get an ACK on the > ACPI part. Actually the ACPI part triggered a new warning that I haven't figured out completely yet. Please disregard my patch for the moment. I think we can just drop the dependency in ACPI_VIDEO, but I'm not entirely sure yet if we could hit a broken configuration with THERMAL=m and ACPI_VIDEO=y in that case. Unfortunately we cannot use the same trick in ACPI_VIDEO that I used for ETNAVIV, because of another circular dependency in ACPI. Arnd