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: 108763 Delivered-To: patch@linaro.org Received: by 10.140.101.44 with SMTP id t41csp829086qge; Wed, 26 Jul 2017 06:55:17 -0700 (PDT) X-Received: by 10.99.172.17 with SMTP id v17mr953921pge.196.1501077317836; Wed, 26 Jul 2017 06:55:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501077317; cv=none; d=google.com; s=arc-20160816; b=FOPTUB2wMFoYN8CyzwvF3ZU4xDle9QZKbUuqNBeeMe3q83QBcG617h/rkOmDfIHQPO NpzdzYPo533MEaeSjEspY+t24WlkgZABzumYqrQ4w+nwgPOo1NBdjVpecJtWEbg1pIGG YsQQRX5DKjOkqqt0dhb4blmYBSB8fnzHk/dQvYTdP18xmTnLP9y1IK5EcwfK16ETd3/M g6pUu/IjnbYPXLUail+2vwrAsUMV9+Z2pXSq3pXSmknKL7RxDQdNJiVwUHiPQ82cyxBS vaN4uQBs5WuBa/VuEIIAwcokz29t+qOmxTIydhPcNshe3EZreYXDET72DFP8b7rct9kG gX+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=64sDmCi9oSXgua9FczSK6owHVZu2CFBQNBWoUaBj8Gg=; b=H0lFCgr8g9cFi5GQuJ9n9hkblMWQL6UALfRL6J6n4eQiiM5MJczql/oWSDEuFiAYH5 K51+v1SkRcUXElMpJs5hkxDpaZBm4lExbucF+MtBqHkKlAdaEWoPNZC90hb3LIo9uXZj CZkpwjTFEn2h5hnlfc0I1pX4tOkEgn95P4w01fORFh8nckOuyHyFDZOEpU/1/R+Nr/WJ o6wddgIfk2PaZfhxrX55SqlnkqvK08IcKCLQ9RroPaC/2PzU6pRJnygurdHh8l/j1gju 10RBV0DH+bP0AEFJzmQZpHL56SFE2jsEccY4CEJyQKR2zWY74/ILOLBeqIl6/ndTq5V3 O0bg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b9si10183008plk.260.2017.07.26.06.55.17; Wed, 26 Jul 2017 06:55:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751651AbdGZNzO (ORCPT + 26 others); Wed, 26 Jul 2017 09:55:14 -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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.9.0 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.