From patchwork Wed Oct 27 13:27:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 516287 Delivered-To: patch@linaro.org Received: by 2002:ac0:c404:0:0:0:0:0 with SMTP id t4csp532992imj; Wed, 27 Oct 2021 06:28:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNzpxcOP1Hd2Rz/wot3sE0Cuj3A7CiXdcgv3clN1NiIEMX3WwAoHvVHxwrP6O2olWll4XK X-Received: by 2002:a05:6a00:1148:b0:47b:c0c6:75da with SMTP id b8-20020a056a00114800b0047bc0c675damr31313523pfm.61.1635341304807; Wed, 27 Oct 2021 06:28:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635341304; cv=none; d=google.com; s=arc-20160816; b=xXkCyLkLI8KEO3dVS61FHzKGR5UrJYYsv7FGIc1l3lkK3ZrmUTn41nKTaiFtIu3+yE dmGUuDyrISA5MqkvvRj7g7mbjpq2VJlUGPCExdexEd4yve2JewEicwcjmzaT5AwoOeK9 uSJYx91wTvymeFUHEebDUDy1Av/Bg/VMBZFZ3nAhmjJOkFXBs9IA5fovJBzVyY0DoZot hac/HcDXC1C698xLQaEvK9E2tjiCuauur0dB9jkrwhCk5VweeA8wdDb9ehrtWl9RMpJI iX/MMJCL6YY+nw/3YbjkdvAaEzCh3n2y917P3JUEGqF3UcAjjbT9iTzFv6FC9gsrw0bf YkUA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:delivered-to; bh=atV3jPcnEVsT86Xg/Zlq4dcaHHJ1Ri2g2ZLr/E6tGhM=; b=KFxIGVxEsxljHd+DVvG2fo11zymZvNXSciLTNo+uYs8riqnM0PRJLdZ6PNX35K5oPZ yLCv8QjpbGKGvHP6T0TdTaWwI4qpIeyY7mjkJXWk+4ppxALpmvmwB1QE/B4lurbWBrRm JZu8i2UOpyPY2a0N6XeBCjocEglCH/HJnLsT4YTh59Oz4gOSHtsIY0Ynz3+d+u3mAriG l1HRr/9BrRwoXXuDxmBquDROWFAp3BF6jL6S8l82VSuaNcxTx4bV80wrTUD7d1MKrwRX NBNQo14Qsp6qDL0A/iS311GZS5VizZmeMkFUnZuugdTWebakIf+WyYF1UcMzQC13IZeb +dlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gh6LrMhV; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id g130si30793095pgc.216.2021.10.27.06.28.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 06:28:24 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Gh6LrMhV; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 572D46E897; Wed, 27 Oct 2021 13:28:23 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id E56BF6E897; Wed, 27 Oct 2021 13:28:21 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A41A60462; Wed, 27 Oct 2021 13:28:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635341301; bh=PGO1sKMkFxhSgafCfuIdDyaWHOAra0sduE/qroUyhJA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Gh6LrMhVRb+w8cc6fASkt85HSUDcujVbPOdJf+kYKM4c10OkGaWKz0tej4i/v3gqL gqIpguIZ+CYCEkX8TMK1GyLQbICCXX8D3hVYu84Wn0s8UH3S16wO6eRz+4zepH+vZ+ yjfArY3xgIAwyH8kYC5jkIQ28ZeLXvkParFkxkxSzroPleW5KcOAvnt/V+vK6xwsrO 4k5WYVVKieMsJfrOe+vNpBAnsNhu7nEztCQqf/Q9FCiTcppHLm6f/7/iPdD4feBbeU m6EmfbImK972UruDY/qXwXB7qC9tmGF3gPJu4JWrykH2pXYQ4LAYB3ovC7PgfBauuc mL315UjXldK2g== From: Arnd Bergmann To: dri-devel@lists.freedesktop.org, Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter Cc: linux-fbdev@vger.kernel.org, intel-gfx@lists.freedesktop.org, Arnd Bergmann , Matthew Auld , Zhenyu Wang , Alex Williamson , Jason Gunthorpe , Daniele Ceraolo Spurio , linux-kernel@vger.kernel.org Subject: [PATCH 3/3] [v2] i915: fix backlight configuration issue Date: Wed, 27 Oct 2021 15:27:14 +0200 Message-Id: <20211027132732.3993279-3-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211027132732.3993279-1-arnd@kernel.org> References: <20211027132732.3993279-1-arnd@kernel.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Arnd Bergmann The i915 driver can use the backlight subsystem as an option, and usually selects it when CONFIG_ACPI is set. However it is possible to configure a kernel with modular backlight classdev support and a built-in i915 driver, which leads to a linker error: drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_register': intel_panel.c:(.text+0x2f58): undefined reference to `backlight_device_register' drivers/gpu/drm/i915/display/intel_panel.o: In function `intel_backlight_device_unregister': intel_panel.c:(.text+0x2fe4): undefined reference to `backlight_device_unregister' Change i915 to just 'depends on' for both BACKLIGHT_CLASS_DEVICE and ACPI_VIDEO, which avoids a lot of the problems. Link: https://lore.kernel.org/all/20200108140227.3976563-1-arnd@arndb.de/ Link: https://lore.kernel.org/all/20200417155553.675905-1-arnd@arndb.de/ Signed-off-by: Arnd Bergmann --- This change depends on cleaning up drivers/video/fbdev to no longer 'select' I2C and BACKLIGHT_CLASS_DEVICE, otherwise it causes dependency loops. --- drivers/gpu/drm/i915/Kconfig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 2.29.2 Acked-by: Jani Nikula diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig index 84b6fc70cbf5..f427e6d50d9b 100644 --- a/drivers/gpu/drm/i915/Kconfig +++ b/drivers/gpu/drm/i915/Kconfig @@ -3,6 +3,8 @@ config DRM_I915 tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" depends on DRM depends on X86 && PCI + depends on ACPI_VIDEO || !ACPI + depends on BACKLIGHT_CLASS_DEVICE || !BACKLIGHT_CLASS_DEVICE select INTEL_GTT select INTERVAL_TREE # we need shmfs for the swappable backing store, and in particular @@ -16,10 +18,6 @@ config DRM_I915 select IRQ_WORK # i915 depends on ACPI_VIDEO when ACPI is enabled # but for select to work, need to select ACPI_VIDEO's dependencies, ick - select BACKLIGHT_CLASS_DEVICE if ACPI - select INPUT if ACPI - select ACPI_VIDEO if ACPI - select ACPI_BUTTON if ACPI select SYNC_FILE select IOSF_MBI select CRC32