From patchwork Wed Oct 27 13:27:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 516285 Delivered-To: patch@linaro.org Received: by 2002:ac0:c404:0:0:0:0:0 with SMTP id t4csp532226imj; Wed, 27 Oct 2021 06:27:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyR/Ke4ApCguMdcmRzoazQwiXKKpzcmArGS0tVBFK4yEhb4n015i2cQIZSDgbz8Z2t1WdQV X-Received: by 2002:a63:9516:: with SMTP id p22mr20305879pgd.297.1635341262420; Wed, 27 Oct 2021 06:27:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635341262; cv=none; d=google.com; s=arc-20160816; b=l6NI2qaYcaF9iDwrQOlFlRH+lv++KnsQZll/kpbSAxNqTHCHX5p1qDdBHZhJ0C/kLa dI5nkFAk/yXwimiNWt0U3oIfuJnHBHGjuP36Gw9T2gKjhI2/+G3QYc42xVkYC16y0u8M bFszdfgCJKf3rpawtzyv4OW265WZzijyiHXd3k3wvHkvvfuULHwgmU3y/U09N8hKqBkE SEYGZQ6gQlOGUk843hEu66WNt/r87nFBAOikVqxDzs+GjWu0ti08vj1IqtE0f7vqqqaB CSHZwj/WXjHvoecPlyB+SqZJ3dN2bHYVyxsXtDq7zSLGPIUfs7I+2/cxgyHDRyZLj6gq QiyQ== 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:message-id:date:subject:cc:to:from:dkim-signature :delivered-to; bh=RhJhq3c6w1DBPxPlyG4J/wbdgK7vZMgIu6QAEp2xWdA=; b=QoSGRPIE/WpvBHOu4EOaS8IIRuzjhOvT/Q6gaObhooPN0Vj9Re1XACmHZYrAsnsU7w 1hYwW++ApHVyeZvqgW9q5T8CtXiAMFjgdYULAmSJEblztnw6EBWN/1CkW8pLYkrItP8q jNBKkbC87sELBxM3il9MirPQW1ZNQFPmCcyjfNyZVaGugZwb53oyOUJyjXlpifZW7Pnk Of7G12ecC/XqklWropSS6gJpLWK2NzLucnN4UUEUz7q+Nl8VhlNmMHIZ1MIE7ut94Bme 2IwIj9b+TCkMyBCWqzE+mrJhHEOKBmrGZemNdgSwxgm3MH6GPrDfy1t7vLYbvczUG+if 3WIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tx4BDkkY; 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 u10si4329088pfi.289.2021.10.27.06.27.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 06:27:42 -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=tx4BDkkY; 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 CBD8689EA6; Wed, 27 Oct 2021 13:27:40 +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 DC0D189EA6; Wed, 27 Oct 2021 13:27:38 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id AF32260E8B; Wed, 27 Oct 2021 13:27:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635341258; bh=qGGtvga8O1y2g6sWEld8AJp0sUrc5VDqNDJOBbnVFRA=; h=From:To:Cc:Subject:Date:From; b=tx4BDkkYm1SRvdcDon9KgichU1wvJJaXGNP3U7ewpBTsSMFErXR32NiRSIovtbqmo iUdK02QhRwrxWR7gImHML3L8nJ3Hu3DmGLx2Tp0CGZXfZP8oulQwxznvmmSZWLv053 s8yspSHvgs2T0bryjeX1TUt6hHbeZE2OFLuM3Hu8P5jsRpe9WzAutzBnODMUFZUl88 JlLaatbU8csbbXYqQpraLQYEqRtXyxgV7bjxROkkdz0ixS95td5p8zNTTy3cBHcxKb vS2nkdJoQlyIL2gdYgYeuqzld55B7kU7LZCjF3lolqJf5h6mmkDDo7YVZZbBUwQmPw kxSUhjiP5weAQ== From: Arnd Bergmann To: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org, intel-gfx@lists.freedesktop.org, Jani Nikula , Arnd Bergmann , Daniel Vetter , Thomas Zimmermann , Andy Shevchenko , Geert Uytterhoeven , Randy Dunlap , linux-kernel@vger.kernel.org Subject: [PATCH 1/3] fbdev: rework FB_DDC dependencies Date: Wed, 27 Oct 2021 15:27:12 +0200 Message-Id: <20211027132732.3993279-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 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 Selecting FB_DDC currently turns on CONFIG_I2C implicitly, which is often not desired and can lead to circular dependencies. Change this to a 'depends on' and change all drivers that rely on FB_DDC to have an appropriate I2C dependency as well. Signed-off-by: Arnd Bergmann --- drivers/video/fbdev/Kconfig | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) -- 2.29.2 Acked-by: Andy Shevchenko diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index 6ed5e608dd04..c187a93c9a16 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -62,9 +62,8 @@ config FIRMWARE_EDID config FB_DDC tristate - depends on FB + depends on FB && I2C select I2C_ALGOBIT - select I2C config FB_BOOT_VESA_SUPPORT bool @@ -356,6 +355,7 @@ config FB_CYBER2000 config FB_CYBER2000_DDC bool "DDC for CyberPro support" depends on FB_CYBER2000 + depends on I2C=y || I2C=FB_CYBER2000 select FB_DDC default y help @@ -894,6 +894,7 @@ config FB_NVIDIA config FB_NVIDIA_I2C bool "Enable DDC Support" depends on FB_NVIDIA + depends on I2C=y || I2C=FB_NVIDIA select FB_DDC help This enables I2C support for nVidia Chipsets. This is used @@ -940,6 +941,7 @@ config FB_RIVA config FB_RIVA_I2C bool "Enable DDC Support" depends on FB_RIVA + depends on I2C=y || I2C=FB_RIVA select FB_DDC help This enables I2C support for nVidia Chipsets. This is used @@ -967,7 +969,7 @@ config FB_RIVA_BACKLIGHT config FB_I740 tristate "Intel740 support" - depends on FB && PCI + depends on FB && PCI && I2C select FB_MODE_HELPERS select FB_CFB_FILLRECT select FB_CFB_COPYAREA @@ -1021,6 +1023,7 @@ config FB_I810_GTF config FB_I810_I2C bool "Enable DDC Support" depends on FB_I810 && FB_I810_GTF + depends on I2C=y || I2C=FB_I810 select FB_DDC help Add DDC/I2C support for i810fb. This will allow the driver to get @@ -1076,6 +1079,7 @@ config FB_INTEL_DEBUG config FB_INTEL_I2C bool "DDC/I2C for Intel framebuffer support" depends on FB_INTEL + depends on I2C=y || I2C=FB_INTEL select FB_DDC default y help @@ -1155,6 +1159,7 @@ config FB_MATROX_G config FB_MATROX_I2C tristate "Matrox I2C support" depends on FB_MATROX + depends on I2C=y || I2C=FB_MATROX select FB_DDC help This drivers creates I2C buses which are needed for accessing the @@ -1220,6 +1225,7 @@ config FB_RADEON config FB_RADEON_I2C bool "DDC/I2C for ATI Radeon support" depends on FB_RADEON + depends on I2C=y || I2C=FB_RADEON select FB_DDC default y help @@ -1329,6 +1335,7 @@ config FB_S3 config FB_S3_DDC bool "DDC for S3 support" depends on FB_S3 + depends on I2C=y || I2C=FB_S3 select FB_DDC default y help @@ -1354,6 +1361,7 @@ config FB_SAVAGE config FB_SAVAGE_I2C bool "Enable DDC2 Support" depends on FB_SAVAGE + depends on I2C=y || I2C=FB_SAVAGE select FB_DDC help This enables I2C support for S3 Savage Chipsets. This is used @@ -1493,6 +1501,7 @@ config FB_3DFX_ACCEL config FB_3DFX_I2C bool "Enable DDC/I2C support" depends on FB_3DFX + depends on I2C=y || I2C=FB_3DFX select FB_DDC default y help @@ -1532,7 +1541,7 @@ config FB_VT8623 config FB_TRIDENT tristate "Trident/CyberXXX/CyberBlade support" - depends on FB && PCI + depends on FB && PCI && I2C select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT From patchwork Wed Oct 27 13:27:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 516286 Delivered-To: patch@linaro.org Received: by 2002:ac0:c404:0:0:0:0:0 with SMTP id t4csp532807imj; Wed, 27 Oct 2021 06:28:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwK34+WneRsqGKoDxbK8UzU29cKUg2zK1pvHkLDy/DVjhxEZs4uP12cKSU6IjHL0xIZxVSp X-Received: by 2002:a17:90b:17c9:: with SMTP id me9mr5800984pjb.197.1635341295080; Wed, 27 Oct 2021 06:28:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635341295; cv=none; d=google.com; s=arc-20160816; b=CBEbFomhW/Ucr51RhjIrnAjx0IHJ0M9YWVciMi3P+AE1Nr5LLC5GmAKgmRmfteTjca anPM6pCylwCJeQ2Tj35cXByBLzWbloWnAP/l9YWL0xgDL242aqgLlpAZf1HLuAaQXLpK 3eBmJ4Hb5u5oS+3xN1xXB8cpOS0P2yFIhJ23lb98Eq0OiJHgzDl1uFIs8xdTa+FV0DaU HnmF1S3DL86bMWLVet2o5D23FKAy6NxvTE1r1WQcK/9AB17OTPTi/YcwAFH/orO9hxfd 64r3KlMHxd2zurfZpaulgI+ctbsn7Si/zFG+r2lOAaMc718SJLG6ex0vVQT7vIyRDG53 NREw== 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=2szRqPRqOfRD92z3WZahykfMw/cJKZyEdoG8z2Pu/yg=; b=PZWOEWeVAijedlGMBZx8/EmQODTCZW8x08Fit30q82DiBmSSnKzK8dFa06in9Z9EOE QfM3avghbLNs9cW/uDY15ZQLAy2W/+5bpveHW6IaPi0hu76mNIcVCu0A99EVSOtqvpks S1ttpOOCH1Wzgh7ljGUMwvj9sU4GG0FUca6Wj7n2tdHylcnurf20BhZCsIo27FheyFXE RgmHhT7XVhZAb7eekVwW0YXzWPjFTiNFfjJAFVZDiBIV8LBZ85GmeO8aBOWQLHOyMFzB kyoJleiIjxOInEagFkETL7qAPZB3LMMLoYl4nbEnwrL63TGX+LXx9fTdxIleTYTh1aUS qjWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="YcopuqY/"; 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 b11si36523331plk.409.2021.10.27.06.28.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Oct 2021 06:28:15 -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="YcopuqY/"; 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 908A789FCC; Wed, 27 Oct 2021 13:28:13 +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 77C2889FCC; Wed, 27 Oct 2021 13:28:12 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id D0A3F60E54; Wed, 27 Oct 2021 13:28:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1635341292; bh=EubQhcLZiFFhLvGY743JDlU2CsiFAofCWoI/Tq6daTc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YcopuqY/86PHp0diMOIqnqlv92hsF7zYHZF2pg23bhC5uktYbu6+Z5N5MsTM0HlAh QhZbyhKfgmFZ2jOl13wsl8n7bifDk0IH2n/qxiOLbtOnRu6e6bgwEF9RQMefKgF07I AmEGcPxHukeePYS+bHLyilD1YPaftFzy41fF6L5Rs4sqJf3f+9qSpDBXH0AvaQ4Cpo RuFpm5pqlGB7tFY6o0NyDPKiGa1iSHSeIkrnFn8Y1qze55y3dX+/APv51wOJo50HNN DQzC3Y0fWuauHQ5YFWDzNpMr2ADL3BX6TybX7GANMfB26gw1jLRT5fG/xky3Y2/lR/ v3dRifrKOTiRQ== From: Arnd Bergmann To: dri-devel@lists.freedesktop.org Cc: linux-fbdev@vger.kernel.org, intel-gfx@lists.freedesktop.org, Jani Nikula , Arnd Bergmann , Miguel Ojeda , Benjamin Herrenschmidt , Greg Kroah-Hartman , Jens Frederich , Jon Nettleton , Geert Uytterhoeven , Lars Poeschel , Robin van der Gracht , Daniel Vetter , Thomas Zimmermann , Randy Dunlap , Andy Shevchenko , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-staging@lists.linux.dev Subject: [PATCH 2/3] fbdev: rework backlight dependencies Date: Wed, 27 Oct 2021 15:27:13 +0200 Message-Id: <20211027132732.3993279-2-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 Rather than having CONFIG_FB_BACKLIGHT select CONFIG_BACKLIGHT_CLASS_DEVICE, make any driver that needs it have a dependency on the class device being available, to prevent circular dependencies. This is the same way that the backlight is already treated for the DRM subsystem. Signed-off-by: Arnd Bergmann --- drivers/auxdisplay/Kconfig | 1 + drivers/macintosh/Kconfig | 1 + drivers/staging/fbtft/Kconfig | 1 + drivers/staging/olpc_dcon/Kconfig | 2 +- drivers/video/fbdev/Kconfig | 14 +++++++++++--- 5 files changed, 15 insertions(+), 4 deletions(-) -- 2.29.2 Acked-by: Miguel Ojeda Acked-by: Randy Dunlap diff --git a/drivers/auxdisplay/Kconfig b/drivers/auxdisplay/Kconfig index 64012cda4d12..356afb6a569d 100644 --- a/drivers/auxdisplay/Kconfig +++ b/drivers/auxdisplay/Kconfig @@ -170,6 +170,7 @@ config IMG_ASCII_LCD config HT16K33 tristate "Holtek Ht16K33 LED controller with keyscan" depends on FB && I2C && INPUT + depends on BACKLIGHT_CLASS_DEVICE select FB_SYS_FOPS select FB_SYS_FILLRECT select FB_SYS_COPYAREA diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig index 5cdc361da37c..cb0fbdf8ff7f 100644 --- a/drivers/macintosh/Kconfig +++ b/drivers/macintosh/Kconfig @@ -113,6 +113,7 @@ config PMAC_MEDIABAY config PMAC_BACKLIGHT bool "Backlight control for LCD screens" depends on PPC_PMAC && ADB_PMU && FB = y && (BROKEN || !PPC64) + depends on BACKLIGHT_CLASS_DEVICE select FB_BACKLIGHT help Say Y here to enable Macintosh specific extensions of the generic diff --git a/drivers/staging/fbtft/Kconfig b/drivers/staging/fbtft/Kconfig index dad1ddcd7b0c..c4f2f01cd798 100644 --- a/drivers/staging/fbtft/Kconfig +++ b/drivers/staging/fbtft/Kconfig @@ -3,6 +3,7 @@ menuconfig FB_TFT tristate "Support for small TFT LCD display modules" depends on FB && SPI depends on GPIOLIB || COMPILE_TEST + depends on BACKLIGHT_CLASS_DEVICE select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT diff --git a/drivers/staging/olpc_dcon/Kconfig b/drivers/staging/olpc_dcon/Kconfig index d1a0dea09ef0..a9f36538d7ab 100644 --- a/drivers/staging/olpc_dcon/Kconfig +++ b/drivers/staging/olpc_dcon/Kconfig @@ -4,7 +4,7 @@ config FB_OLPC_DCON depends on OLPC && FB depends on I2C depends on GPIO_CS5535 && ACPI - select BACKLIGHT_CLASS_DEVICE + depends on BACKLIGHT_CLASS_DEVICE help In order to support very low power operation, the XO laptop uses a secondary Display CONtroller, or DCON. This secondary controller diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index c187a93c9a16..3ad499433726 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -186,7 +186,7 @@ config FB_MACMODES config FB_BACKLIGHT tristate depends on FB - select BACKLIGHT_CLASS_DEVICE + depends on BACKLIGHT_CLASS_DEVICE config FB_MODE_HELPERS bool "Enable Video Mode Handling Helpers" @@ -275,12 +275,12 @@ config FB_ARMCLCD tristate "ARM PrimeCell PL110 support" depends on ARM || ARM64 || COMPILE_TEST depends on FB && ARM_AMBA && HAS_IOMEM + depends on BACKLIGHT_CLASS_DEVICE || !OF select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_MODE_HELPERS if OF select VIDEOMODE_HELPERS if OF - select BACKLIGHT_CLASS_DEVICE if OF help This framebuffer device driver is for the ARM PrimeCell PL110 Colour LCD controller. ARM PrimeCells provide the building @@ -863,6 +863,7 @@ config FB_ATMEL tristate "AT91 LCD Controller support" depends on FB && OF && HAVE_CLK && HAS_IOMEM depends on HAVE_FB_ATMEL || COMPILE_TEST + depends on BACKLIGHT_CLASS_DEVICE select FB_BACKLIGHT select FB_CFB_FILLRECT select FB_CFB_COPYAREA @@ -916,6 +917,7 @@ config FB_NVIDIA_DEBUG config FB_NVIDIA_BACKLIGHT bool "Support for backlight control" depends on FB_NVIDIA + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_NVIDIA default y help Say Y here if you want to control the backlight of your display. @@ -963,6 +965,7 @@ config FB_RIVA_DEBUG config FB_RIVA_BACKLIGHT bool "Support for backlight control" depends on FB_RIVA + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_RIVA default y help Say Y here if you want to control the backlight of your display. @@ -1234,6 +1237,7 @@ config FB_RADEON_I2C config FB_RADEON_BACKLIGHT bool "Support for backlight control" depends on FB_RADEON + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_RADEON default y help Say Y here if you want to control the backlight of your display. @@ -1265,6 +1269,7 @@ config FB_ATY128 config FB_ATY128_BACKLIGHT bool "Support for backlight control" depends on FB_ATY128 + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_ATY128 default y help Say Y here if you want to control the backlight of your display. @@ -1314,6 +1319,7 @@ config FB_ATY_GX config FB_ATY_BACKLIGHT bool "Support for backlight control" + depends on BACKLIGHT_CLASS_DEVICE=y || BACKLIGHT_CLASS_DEVICE=FB_ATY depends on FB_ATY default y help @@ -1838,6 +1844,7 @@ config FB_SH_MOBILE_LCDC tristate "SuperH Mobile LCDC framebuffer support" depends on FB && HAVE_CLK && HAS_IOMEM depends on SUPERH || ARCH_RENESAS || COMPILE_TEST + depends on BACKLIGHT_CLASS_DEVICE select FB_SYS_FILLRECT select FB_SYS_COPYAREA select FB_SYS_IMAGEBLIT @@ -2166,7 +2173,7 @@ config FB_PRE_INIT_FB config FB_MX3 tristate "MX3 Framebuffer support" depends on FB && MX3_IPU - select BACKLIGHT_CLASS_DEVICE + depends on BACKLIGHT_CLASS_DEVICE select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT @@ -2222,6 +2229,7 @@ config FB_SSD1307 tristate "Solomon SSD1307 framebuffer support" depends on FB && I2C depends on GPIOLIB || COMPILE_TEST + depends on BACKLIGHT_CLASS_DEVICE select FB_SYS_FOPS select FB_SYS_FILLRECT select FB_SYS_COPYAREA 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