fbdev: rework FB_DDC dependencies
Subsystems (7)
PATCH 1/3 fbdev: rework FB_DDC dependencies
From: Arnd Bergmann <[email protected]>
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.
--- drivers/video/fbdev/Kconfig | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
drivers/video/fbdev/Kconfig +13 -4
@@ -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
Signature · 1 line
2.29.2
PATCH 2/3 fbdev: rework backlight dependencies
From: Arnd Bergmann <[email protected]>
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.
--- 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(-)
drivers/auxdisplay/Kconfig +1 -0
@@ -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
drivers/macintosh/Kconfig +1 -0
@@ -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
drivers/staging/fbtft/Kconfig +1 -0
@@ -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
drivers/staging/olpc_dcon/Kconfig +1 -1
@@ -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
drivers/video/fbdev/Kconfig +11 -3
@@ -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
Signature · 1 line
2.29.2
Re: [PATCH 2/3] fbdev: rework backlight dependencies
Quoted 4 lines · Arnd Bergmann
Rather than having
CONFIG_FB_BACKLIGHTselectCONFIG_BACKLIGHT_CLASS_DEVICE, make any driver that needs it have a dependency on the class device being available, to prevent circular dependencies.
Cheers,
Miguel
Re: [PATCH 2/3] fbdev: rework backlight dependencies
In reply to Arnd BergmannQuoted 9 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Rather than having
CONFIG_FB_BACKLIGHTselectCONFIG_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.
Quoted 8 lines
Signed-off-by Arnd Bergmann <[email protected]>--- 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(-)
Thanks.
Signature · 1 line
~Randy
PATCH v2 3/3 i915: fix backlight configuration issue
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
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.
---
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(-)
drivers/gpu/drm/i915/Kconfig +2 -4
@@ -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
Signature · 1 line
2.29.2
Re: [PATCH 3/3] [v2] i915: fix backlight configuration issue
Quoted 40 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
The i915 driver can use the backlight subsystem as an option, and usually selects it when
CONFIG_ACPIis 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 tobacklight_device_register' drivers/gpu/drm/i915/display/intel_panel.o: In functionintel_backlight_device_unregister':
intel_panel.c:(.text+0x2fe4): undefined reference to `backlight_device_unregister'Change i915 to just 'depends on' for both
BACKLIGHT_CLASS_DEVICEandACPI_VIDEO, which avoids a lot of the problems.Signed-off-by Arnd Bergmann <[email protected]>---
This change depends on cleaning updrivers/video/fbdevto no longer 'select' I2C andBACKLIGHT_CLASS_DEVICE, otherwise it causes dependency loops.--- drivers/gpu/drm/i915/Kconfig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/i915/Kconfig +2
-0@@ -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
drivers/gpu/drm/i915/Kconfig config DRM_I915 · line 20
Quoted 3 lines
drivers/gpu/drm/i915/Kconfig +0
-0@@ -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
The comment needs updating as well.
Other than that,
on the series.
Quoted 7 lines
drivers/gpu/drm/i915/Kconfig +0
-4- 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
Signature · 1 line
Jani Nikula, Intel Open Source Graphics Center
Re: [PATCH 3/3] [v2] i915: fix backlight configuration issue
Quoted 6 lines · Jani Nikula
drivers/gpu/drm/i915/Kconfig config DRM_I915 · line 20
Quoted 4 lines
drivers/gpu/drm/i915/Kconfig +0
-0@@ -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, ickThe comment needs updating as well.
Right, I've removed that comment now.
Quoted 5 lines
Other than that,
Acked-by Jani Nikula <[email protected]>on the series.
Thanks!
Arnd
Quoted 7 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
Selecting
FB_DDCcurrently turns onCONFIG_I2Cimplicitly, 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_DDCto have an appropriate I2C dependency as well.
No objections from me.
Quoted 121 lines
Signed-off-by Arnd Bergmann <[email protected]>--- drivers/video/fbdev/Kconfig | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)drivers/video/fbdev/Kconfig +13
-4@@ -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_IMAGEBLITSignature · 1 line
2.29.2
Signature · 2 lines
With Best Regards, Andy Shevchenko
Patchwork
CI[Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/3] fbdev: rework FB_DDC dependencies
In reply to Arnd Bergmann== Series Details ==
== Series Details ==
Series: series starting with [1/3] fbdev: rework FB_DDC dependencies
URL : https://patchwork.freedesktop.org/series/96343/
State : failure
== Summary ==
Applying: fbdev: rework FB_DDC dependencies
Applying: fbdev: rework backlight dependencies
error: sha1 information is lacking or useless (drivers/auxdisplay/Kconfig).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch Patch failed at 0002 fbdev: rework backlight dependencies
When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort".