From patchwork Tue Nov 8 13:56:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9417519 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 C78586022E for ; Tue, 8 Nov 2016 13:57:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9CCA288A1 for ; Tue, 8 Nov 2016 13:57:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD0ED2889D; Tue, 8 Nov 2016 13:57:34 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 42D042889D for ; Tue, 8 Nov 2016 13:57:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 68DA16E052; Tue, 8 Nov 2016 13:57:33 +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.17.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6106D6E052 for ; Tue, 8 Nov 2016 13:57:31 +0000 (UTC) Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0Lj2j8-1ch19p3mWc-00dDtE; Tue, 08 Nov 2016 14:57:24 +0100 From: Arnd Bergmann To: Ben Skeggs Subject: [PATCH] drm/nouveau: fix LEDS_CLASS=m configuration Date: Tue, 8 Nov 2016 14:56:52 +0100 Message-Id: <20161108135721.2142330-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:Np/0evxXOLesHti+GmA56zOBy8P01hYrHTMNU7fMWXktXtiy/x7 llFpXERuKiC45UQmaJPGqnqZYxIs6PoiDmpvTDoJBAKxxIp1ZnBijM38w8Jq8+UuRGCplA+ jc5XlW1KSBFsAXc3JmnGtKE3ZC1GGKHtsOy++2Pj02wJ9NbJwe4gqX5oXTF5NwpP28n/NPq TBxNNYB1oEVa8O/Gyg97w== X-UI-Out-Filterresults: notjunk:1; V01:K0:FzOtlmKIi80=:/YkuIQX1KwOLPL1IK3RxvM gzc0RtA2EjuILJff5q1v94ixiH6nTLEZlTl/909weHZR5IUjOX7t0xASxBizw1UIKq3BEJzss KTGO1OThqfnUH/ZvwRB5YXM4I8cYjFwVn5ZWlbkJj9zrPHUADepnxsOK/WWVrVvqwiUxzAHhq rEqkuLNE6JogpBs3oAjcC7NImU5sB8YK1WFuAgA/CECHgpzR9DmEyWCaIxJtIwccz+y01SPtM a4vvfkCYaVzZ5bJ+69ieqI62Bww/QCJ7gPaQETfk3mrUcKkbVhnJB1ar3vXTeSq/9X+n5VisY kjVDIWESPWw/4O8trhHUSYaYFgMTXxdOha+yEwXQWGMva5SfXnQRcrL+ggDFH2MWj26jPnKlZ wv3PPI1i0MLJj9sMm+3xzSqdYfzxrYOztDaAuHGqaBn+xMAYsCj6RxaRTcqi/lkaTZGDNtjPV X42uYagysWoQqdrIIM5/SCQE+mY4BfhMX4WSQs1Q/fmHcYsIocFzWjqWT+IVFv2gXaVxFtaTI VhDp6Gq1bmCXRjQyLnZYBtF+GNzlddT5JRuYZBFAke37aQdr/h+rUtAlJpmq7vdlT8isnZh1q 3XBr6cZ1pzelIlBtID7QtZ96QJeVI0lncCTtO6ZhSC37AMZAv5nb7vbHuhj80amL6VHEJ27fy U/hzCigBgl2RD7LL71sp4xg/imI8Ut29XP2NsHdHLRHK8T7gVWo36jQvF/ibg9Ij0/WY= Cc: Arnd Bergmann , nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org 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 The newly introduced LED handling for nouveau fails to link when the driver is built-in but the LED subsystem is a loadable module: drivers/gpu/drm/nouveau/nouveau.o: In function `nouveau_do_suspend': tvnv17.c:(.text.nouveau_do_suspend+0x10): undefined reference to `nouveau_led_suspend' drivers/gpu/drm/nouveau/nouveau.o: In function `nouveau_do_resume': tvnv17.c:(.text.nouveau_do_resume+0xf0): undefined reference to `nouveau_led_resume' drivers/gpu/drm/nouveau/nouveau.o: In function `nouveau_drm_unload': tvnv17.c:(.text.nouveau_drm_unload+0x34): undefined reference to `nouveau_led_fini' drivers/gpu/drm/nouveau/nouveau.o: In function `nouveau_drm_load': tvnv17.c:(.text.nouveau_drm_load+0x7d0): undefined reference to `nouveau_led_init' This adds a separate Kconfig symbol for the LED support that correctly tracks the dependencies. Fixes: 8d021d71b324 ("drm/nouveau/drm/nouveau: add a LED driver for the NVIDIA logo") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/nouveau/Kbuild | 2 +- drivers/gpu/drm/nouveau/Kconfig | 8 ++++++++ drivers/gpu/drm/nouveau/nouveau_led.h | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/Kbuild b/drivers/gpu/drm/nouveau/Kbuild index fde6e3656636..5e00e911daa6 100644 --- a/drivers/gpu/drm/nouveau/Kbuild +++ b/drivers/gpu/drm/nouveau/Kbuild @@ -22,7 +22,7 @@ nouveau-$(CONFIG_DEBUG_FS) += nouveau_debugfs.o nouveau-y += nouveau_drm.o nouveau-y += nouveau_hwmon.o nouveau-$(CONFIG_COMPAT) += nouveau_ioc32.o -nouveau-$(CONFIG_LEDS_CLASS) += nouveau_led.o +nouveau-$(CONFIG_DRM_NOUVEAU_LED) += nouveau_led.o nouveau-y += nouveau_nvif.o nouveau-$(CONFIG_NOUVEAU_PLATFORM_DRIVER) += nouveau_platform.o nouveau-y += nouveau_usif.o # userspace <-> nvif diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index 78631fb61adf..715cd6f4dc31 100644 --- a/drivers/gpu/drm/nouveau/Kconfig +++ b/drivers/gpu/drm/nouveau/Kconfig @@ -46,6 +46,14 @@ config NOUVEAU_DEBUG The paranoia and spam levels will add a lot of extra checks which may potentially slow down driver operation. +config DRM_NOUVEAU_LED + bool "Support for logo LED" + depends on DRM_NOUVEAU && LEDS_CLASS + depends on !(DRM_NOUVEAU=y && LEDS_CLASS=m) + help + Say Y here to enabling controlling the brightness of the + LED behind NVIDIA logo on certain Titan cards. + config NOUVEAU_DEBUG_DEFAULT int "Default debug level" depends on DRM_NOUVEAU diff --git a/drivers/gpu/drm/nouveau/nouveau_led.h b/drivers/gpu/drm/nouveau/nouveau_led.h index 187ecdb82002..9c9bb6ac938e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_led.h +++ b/drivers/gpu/drm/nouveau/nouveau_led.h @@ -42,7 +42,7 @@ nouveau_led(struct drm_device *dev) } /* nouveau_led.c */ -#if IS_ENABLED(CONFIG_LEDS_CLASS) +#if IS_ENABLED(CONFIG_DRM_NOUVEAU_LED) int nouveau_led_init(struct drm_device *dev); void nouveau_led_suspend(struct drm_device *dev); void nouveau_led_resume(struct drm_device *dev);