Arnd Bergmann
2017-Jul-26 13:53 UTC
[Nouveau] [PATCH 0/3] Kconfig dependencies: acpi-video, backlight and thermal
Hi everyone, It took me a while to figure this out properly, as I kept getting circular or missing dependencies with video drivers. This set of three patches should simplify the situation a bit, mostly by cleaning up the dependencies around CONFIG_ACPI_VIDEO. With all three patches applied, I no longer run into those related warnings. If everyone agrees on the general direction, I hope we can merge all three through the DRM tree. I originally had another larger patch in the series to replace all of the 'select BACKLIGHT_LCD_SUPPORT; select BACKLIGHT_CLASS_DEVICE' statements with 'depends on LCD_CLASS_DEVICE', that would clean it up some more, but it is also a more invasive change that we can do separately at some point. Arnd Arnd Bergmann (3): backlight: always select BACKLIGHT_LCD_SUPPORT for BACKLIGHT_CLASS_DEVICE ACPI/DRM: rework ACPI_VIDEO Kconfig dependencies drm/etnaviv: add thermal dependency drivers/acpi/Kconfig | 7 +++++-- drivers/gpu/drm/etnaviv/Kconfig | 1 + drivers/gpu/drm/gma500/Kconfig | 5 +---- drivers/gpu/drm/i915/Kconfig | 7 +------ drivers/gpu/drm/nouveau/Kconfig | 10 ++-------- drivers/platform/x86/Kconfig | 9 ++++----- drivers/staging/olpc_dcon/Kconfig | 1 + 7 files changed, 15 insertions(+), 25 deletions(-) To: dri-devel at lists.freedesktop.org Cc: "Rafael J. Wysocki" <rjw at rjwysocki.net> Cc: Len Brown <lenb at kernel.org> Cc: Lucas Stach <l.stach at pengutronix.de> Cc: Russell King <linux+etnaviv at armlinux.org.uk> Cc: Christian Gmeiner <christian.gmeiner at gmail.com> Cc: David Airlie <airlied at linux.ie> Cc: Patrik Jakobsson <patrik.r.jakobsson at gmail.com> Cc: Daniel Vetter <daniel.vetter at intel.com> Cc: Jani Nikula <jani.nikula at linux.intel.com> Cc: Ben Skeggs <bskeggs at redhat.com> Cc: Darren Hart <dvhart at infradead.org> Cc: Andy Shevchenko <andy at infradead.org> Cc: Jens Frederich <jfrederich at gmail.com> Cc: Daniel Drake <dsd at laptop.org> Cc: Jon Nettleton <jon.nettleton at gmail.com> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org> Cc: linux-acpi at vger.kernel.org Cc: linux-kernel at vger.kernel.org Cc: etnaviv at lists.freedesktop.org Cc: intel-gfx at lists.freedesktop.org Cc: nouveau at lists.freedesktop.org Cc: platform-driver-x86 at vger.kernel.org Cc: devel at driverdev.osuosl.org -- 2.9.0
Arnd Bergmann
2017-Jul-26 13:53 UTC
[Nouveau] [PATCH 1/3] backlight: always select BACKLIGHT_LCD_SUPPORT for BACKLIGHT_CLASS_DEVICE
randconfig builds occasionally produce this Kconfig warning: warning: (DRM_RADEON && DRM_AMDGPU && DRM_NOUVEAU && DRM_I915 && DRM_GMA500 && DRM_SHMOBILE && DRM_TILCDC && DRM_FSL_DCU && DRM_TINYDRM && DRM_PARADE_PS8622 && FB_BACKLIGHT && FB_ARMCLCD && FB_MX3 && USB_APPLEDISPLAY && FB_OLPC_DCON && ACPI_CMPC && SAMSUNG_Q10) selects BACKLIGHT_CLASS_DEVICE which has unmet direct dependencies (HAS_IOMEM && BACKLIGHT_LCD_SUPPORT) It turns out that amost all users of BACKLIGHT_CLASS_DEVICE also select BACKLIGHT_LCD_SUPPORT, but not all of them do. This makes the remaining ones behave like the others. It would probably be best to rework the way those two options related entirely, but for now this takes the simpler and safer approach to fix the warnings without introducing regressions. Signed-off-by: Arnd Bergmann <arnd at arndb.de> --- drivers/gpu/drm/gma500/Kconfig | 1 + drivers/platform/x86/Kconfig | 2 ++ drivers/staging/olpc_dcon/Kconfig | 1 + 3 files changed, 4 insertions(+) diff --git a/drivers/gpu/drm/gma500/Kconfig b/drivers/gpu/drm/gma500/Kconfig index df11582f1efc..52d855cb0569 100644 --- a/drivers/gpu/drm/gma500/Kconfig +++ b/drivers/gpu/drm/gma500/Kconfig @@ -6,6 +6,7 @@ config DRM_GMA500 # GMA500 depends on ACPI_VIDEO when ACPI is enabled, just like i915 select ACPI_VIDEO if ACPI select BACKLIGHT_CLASS_DEVICE if ACPI + select BACKLIGHT_LCD_SUPPORT if ACPI select INPUT if ACPI help Say yes for an experimental 2D KMS framebuffer driver for the diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index 80b87954f6dd..e0ca673bf564 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -785,6 +785,7 @@ config ACPI_CMPC depends on RFKILL || RFKILL=n select INPUT select BACKLIGHT_CLASS_DEVICE + select BACKLIGHT_LCD_SUPPORT default n help Support for Intel Classmate PC ACPI devices, including some @@ -1000,6 +1001,7 @@ config SAMSUNG_Q10 tristate "Samsung Q10 Extras" depends on ACPI select BACKLIGHT_CLASS_DEVICE + select BACKLIGHT_LCD_SUPPORT ---help--- This driver provides support for backlight control on Samsung Q10 and related laptops, including Dell Latitude X200. diff --git a/drivers/staging/olpc_dcon/Kconfig b/drivers/staging/olpc_dcon/Kconfig index d277f048789e..845f756886f0 100644 --- a/drivers/staging/olpc_dcon/Kconfig +++ b/drivers/staging/olpc_dcon/Kconfig @@ -4,6 +4,7 @@ config FB_OLPC_DCON depends on I2C depends on (GPIO_CS5535 || GPIO_CS5535=n) select BACKLIGHT_CLASS_DEVICE + select BACKLIGHT_LCD_SUPPORT ---help--- In order to support very low power operation, the XO laptop uses a secondary Display CONtroller, or DCON. This secondary controller -- 2.9.0
Arnd Bergmann
2017-Jul-26 13:53 UTC
[Nouveau] [PATCH 2/3] ACPI/DRM: rework ACPI_VIDEO Kconfig dependencies
ACPI_VIDEO keeps causing problems with circular Kconfig dependencies, as it depends on a couple of other symbols, and it gets selected by drivers that may end up being depending on others. This is an attempt to simplify this by changing all drivers that currently 'select ACPI_VIDEO' to use 'depends on'. This by itself simplifies the dependency lists for the other drivers. We make ACPI_VIDEO 'default y' to avoid having it turned off for 'make oldconfig' users. This should again be fine as x86 users will normally want this enabled and the option is not available elsewhere. I'm moving the 'select BACKLIGHT_CLASS_DEVICE/BACKLIGHT_LCD_SUPPORT' into ACPI_VIDEO as a further simplification, those were already selected by anything that selected ACPI_VIDEO before. Changing the INPUT dependency in ACPI_CMPC is necessary to avoid a circular dependency with X86_PLATFORM_DEVICES/NOUVEAU. Signed-off-by: Arnd Bergmann <arnd at arndb.de> --- drivers/acpi/Kconfig | 5 ++++- drivers/gpu/drm/gma500/Kconfig | 6 +----- drivers/gpu/drm/i915/Kconfig | 7 +------ drivers/gpu/drm/nouveau/Kconfig | 10 ++-------- drivers/platform/x86/Kconfig | 6 ++---- 5 files changed, 10 insertions(+), 24 deletions(-) diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 1ce52f84dc23..a8f5a40e2914 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig @@ -182,9 +182,12 @@ config ACPI_BUTTON config ACPI_VIDEO tristate "Video" - depends on X86 && BACKLIGHT_CLASS_DEVICE + depends on X86 depends on INPUT select THERMAL + select BACKLIGHT_CLASS_DEVICE + select BACKLIGHT_LCD_SUPPORT + default y help This driver implements the ACPI Extensions For Display Adapters for integrated graphics devices on motherboard, as specified in diff --git a/drivers/gpu/drm/gma500/Kconfig b/drivers/gpu/drm/gma500/Kconfig index 52d855cb0569..41878bb05067 100644 --- a/drivers/gpu/drm/gma500/Kconfig +++ b/drivers/gpu/drm/gma500/Kconfig @@ -1,13 +1,9 @@ config DRM_GMA500 tristate "Intel GMA5/600 KMS Framebuffer" depends on DRM && PCI && X86 && MMU + depends on ACPI_VIDEO || !ACPI select DRM_KMS_HELPER select DRM_TTM - # GMA500 depends on ACPI_VIDEO when ACPI is enabled, just like i915 - select ACPI_VIDEO if ACPI - select BACKLIGHT_CLASS_DEVICE if ACPI - select BACKLIGHT_LCD_SUPPORT if ACPI - select INPUT if ACPI help Say yes for an experimental 2D KMS framebuffer driver for the Intel GMA500 ('Poulsbo') and other Intel IMG based graphics diff --git a/drivers/gpu/drm/i915/Kconfig b/drivers/gpu/drm/i915/Kconfig index e9e64e8e9765..22978c88c7bf 100644 --- a/drivers/gpu/drm/i915/Kconfig +++ b/drivers/gpu/drm/i915/Kconfig @@ -2,6 +2,7 @@ config DRM_I915 tristate "Intel 8xx/9xx/G3x/G4x/HD Graphics" depends on DRM depends on X86 && PCI + depends on ACPI_VIDEO || !ACPI select INTEL_GTT select INTERVAL_TREE # we need shmfs for the swappable backing store, and in particular @@ -12,12 +13,6 @@ config DRM_I915 select DRM_PANEL select DRM_MIPI_DSI select RELAY - # i915 depends on ACPI_VIDEO when ACPI is enabled - # but for select to work, need to select ACPI_VIDEO's dependencies, ick - select BACKLIGHT_LCD_SUPPORT if ACPI - 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 diff --git a/drivers/gpu/drm/nouveau/Kconfig b/drivers/gpu/drm/nouveau/Kconfig index c02a13406a81..8ac61658cec1 100644 --- a/drivers/gpu/drm/nouveau/Kconfig +++ b/drivers/gpu/drm/nouveau/Kconfig @@ -1,21 +1,15 @@ config DRM_NOUVEAU tristate "Nouveau (NVIDIA) cards" depends on DRM && PCI && MMU + depends on ACPI_VIDEO || !(ACPI && X86) select FW_LOADER select DRM_KMS_HELPER select DRM_TTM - select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT - select ACPI_VIDEO if ACPI && X86 && BACKLIGHT_CLASS_DEVICE && INPUT + select FB_BACKLIGHT if DRM_NOUVEAU_BACKLIGHT && FB select X86_PLATFORM_DEVICES if ACPI && X86 select ACPI_WMI if ACPI && X86 select MXM_WMI if ACPI && X86 select POWER_SUPPLY - # Similar to i915, we need to select ACPI_VIDEO and it's dependencies - select BACKLIGHT_LCD_SUPPORT if ACPI && X86 - select BACKLIGHT_CLASS_DEVICE if ACPI && X86 - select INPUT if ACPI && X86 - select THERMAL if ACPI && X86 - select ACPI_VIDEO if ACPI && X86 select DRM_VM help Choose this option for open-source NVIDIA support. diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index e0ca673bf564..2d9fb46a8d11 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -17,7 +17,7 @@ if X86_PLATFORM_DEVICES config ACER_WMI tristate "Acer WMI Laptop Extras" - depends on ACPI + depends on ACPI_VIDEO select LEDS_CLASS select NEW_LEDS depends on BACKLIGHT_CLASS_DEVICE @@ -26,8 +26,6 @@ config ACER_WMI depends on RFKILL || RFKILL = n depends on ACPI_WMI select INPUT_SPARSEKMAP - # Acer WMI depends on ACPI_VIDEO when ACPI is enabled - select ACPI_VIDEO if ACPI ---help--- This is a driver for newer Acer (and Wistron) laptops. It adds wireless radio and bluetooth control, and on some laptops, @@ -783,7 +781,7 @@ config ACPI_CMPC tristate "CMPC Laptop Extras" depends on ACPI depends on RFKILL || RFKILL=n - select INPUT + depends on INPUT select BACKLIGHT_CLASS_DEVICE select BACKLIGHT_LCD_SUPPORT default n -- 2.9.0
Arnd Bergmann
2017-Jul-26 13:53 UTC
[Nouveau] [PATCH 3/3] drm/etnaviv: add thermal dependency
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 <arnd at arndb.de> --- 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(-) 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. -- 2.9.0
Daniel Vetter
2017-Jul-26 14:40 UTC
[Nouveau] [Intel-gfx] [PATCH 0/3] Kconfig dependencies: acpi-video, backlight and thermal
On Wed, Jul 26, 2017 at 03:53:09PM +0200, Arnd Bergmann wrote:> Hi everyone, > > It took me a while to figure this out properly, as I kept getting > circular or missing dependencies with video drivers. > > This set of three patches should simplify the situation a bit, > mostly by cleaning up the dependencies around CONFIG_ACPI_VIDEO. > With all three patches applied, I no longer run into those related > warnings. If everyone agrees on the general direction, I hope > we can merge all three through the DRM tree. > > I originally had another larger patch in the series to replace all > of the 'select BACKLIGHT_LCD_SUPPORT; select BACKLIGHT_CLASS_DEVICE' > statements with 'depends on LCD_CLASS_DEVICE', that would clean > it up some more, but it is also a more invasive change that we > can do separately at some point.Looks reasonable, but I think it'd be good to get Jani Nikula's explicit ack on this, since he dugg around a lot in this area. And he's on vacation this week. -Daniel> > Arnd > > Arnd Bergmann (3): > backlight: always select BACKLIGHT_LCD_SUPPORT for > BACKLIGHT_CLASS_DEVICE > ACPI/DRM: rework ACPI_VIDEO Kconfig dependencies > drm/etnaviv: add thermal dependency > > drivers/acpi/Kconfig | 7 +++++-- > drivers/gpu/drm/etnaviv/Kconfig | 1 + > drivers/gpu/drm/gma500/Kconfig | 5 +---- > drivers/gpu/drm/i915/Kconfig | 7 +------ > drivers/gpu/drm/nouveau/Kconfig | 10 ++-------- > drivers/platform/x86/Kconfig | 9 ++++----- > drivers/staging/olpc_dcon/Kconfig | 1 + > 7 files changed, 15 insertions(+), 25 deletions(-) > > To: dri-devel at lists.freedesktop.org > Cc: "Rafael J. Wysocki" <rjw at rjwysocki.net> > Cc: Len Brown <lenb at kernel.org> > Cc: Lucas Stach <l.stach at pengutronix.de> > Cc: Russell King <linux+etnaviv at armlinux.org.uk> > Cc: Christian Gmeiner <christian.gmeiner at gmail.com> > Cc: David Airlie <airlied at linux.ie> > Cc: Patrik Jakobsson <patrik.r.jakobsson at gmail.com> > Cc: Daniel Vetter <daniel.vetter at intel.com> > Cc: Jani Nikula <jani.nikula at linux.intel.com> > Cc: Ben Skeggs <bskeggs at redhat.com> > Cc: Darren Hart <dvhart at infradead.org> > Cc: Andy Shevchenko <andy at infradead.org> > Cc: Jens Frederich <jfrederich at gmail.com> > Cc: Daniel Drake <dsd at laptop.org> > Cc: Jon Nettleton <jon.nettleton at gmail.com> > Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org> > Cc: linux-acpi at vger.kernel.org > Cc: linux-kernel at vger.kernel.org > Cc: etnaviv at lists.freedesktop.org > Cc: intel-gfx at lists.freedesktop.org > Cc: nouveau at lists.freedesktop.org > Cc: platform-driver-x86 at vger.kernel.org > Cc: devel at driverdev.osuosl.org > > -- > 2.9.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx-- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Andy Shevchenko
2017-Jul-26 15:38 UTC
[Nouveau] [PATCH 1/3] backlight: always select BACKLIGHT_LCD_SUPPORT for BACKLIGHT_CLASS_DEVICE
On Wed, Jul 26, 2017 at 4:53 PM, Arnd Bergmann <arnd at arndb.de> wrote:> randconfig builds occasionally produce this Kconfig warning: > > warning: (DRM_RADEON && DRM_AMDGPU && DRM_NOUVEAU && DRM_I915 && DRM_GMA500 && DRM_SHMOBILE && DRM_TILCDC && DRM_FSL_DCU && DRM_TINYDRM && DRM_PARADE_PS8622 && FB_BACKLIGHT && FB_ARMCLCD && FB_MX3 && USB_APPLEDISPLAY && FB_OLPC_DCON && ACPI_CMPC && SAMSUNG_Q10) selects BACKLIGHT_CLASS_DEVICE which has unmet direct dependencies (HAS_IOMEM && BACKLIGHT_LCD_SUPPORT) > > It turns out that amost all users of BACKLIGHT_CLASS_DEVICE also select > BACKLIGHT_LCD_SUPPORT, but not all of them do. This makes the remaining > ones behave like the others. > > It would probably be best to rework the way those two options related > entirely, but for now this takes the simpler and safer approach to > fix the warnings without introducing regressions.> diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig > index 80b87954f6dd..e0ca673bf564 100644 > --- a/drivers/platform/x86/Kconfig > +++ b/drivers/platform/x86/Kconfig > @@ -785,6 +785,7 @@ config ACPI_CMPC > depends on RFKILL || RFKILL=n > select INPUT > select BACKLIGHT_CLASS_DEVICE > + select BACKLIGHT_LCD_SUPPORT > default n > help > Support for Intel Classmate PC ACPI devices, including some > @@ -1000,6 +1001,7 @@ config SAMSUNG_Q10 > tristate "Samsung Q10 Extras" > depends on ACPI > select BACKLIGHT_CLASS_DEVICE > + select BACKLIGHT_LCD_SUPPORT > ---help--- > This driver provides support for backlight control on Samsung Q10 > and related laptops, including Dell Latitude X200.Acked-by: Andy Shevchenko <andy.shevchenko at gmail.com> -- With Best Regards, Andy Shevchenko
Rafael J. Wysocki
2017-Jul-26 18:23 UTC
[Nouveau] [PATCH 2/3] ACPI/DRM: rework ACPI_VIDEO Kconfig dependencies
On Wednesday, July 26, 2017 03:53:11 PM Arnd Bergmann wrote:> ACPI_VIDEO keeps causing problems with circular Kconfig dependencies, > as it depends on a couple of other symbols, and it gets selected by > drivers that may end up being depending on others. > > This is an attempt to simplify this by changing all drivers that > currently 'select ACPI_VIDEO' to use 'depends on'. This by itself > simplifies the dependency lists for the other drivers. We make > ACPI_VIDEO 'default y' to avoid having it turned off for 'make > oldconfig' users. This should again be fine as x86 users will > normally want this enabled and the option is not available elsewhere. > > I'm moving the 'select BACKLIGHT_CLASS_DEVICE/BACKLIGHT_LCD_SUPPORT' > into ACPI_VIDEO as a further simplification, those were already > selected by anything that selected ACPI_VIDEO before. > > Changing the INPUT dependency in ACPI_CMPC is necessary to avoid a > circular dependency with X86_PLATFORM_DEVICES/NOUVEAU. > > Signed-off-by: Arnd Bergmann <arnd at arndb.de> > --- > drivers/acpi/Kconfig | 5 ++++- > drivers/gpu/drm/gma500/Kconfig | 6 +----- > drivers/gpu/drm/i915/Kconfig | 7 +------ > drivers/gpu/drm/nouveau/Kconfig | 10 ++-------- > drivers/platform/x86/Kconfig | 6 ++---- > 5 files changed, 10 insertions(+), 24 deletions(-) > > diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig > index 1ce52f84dc23..a8f5a40e2914 100644 > --- a/drivers/acpi/Kconfig > +++ b/drivers/acpi/Kconfig > @@ -182,9 +182,12 @@ config ACPI_BUTTON > > config ACPI_VIDEO > tristate "Video" > - depends on X86 && BACKLIGHT_CLASS_DEVICE > + depends on X86 > depends on INPUT > select THERMAL > + select BACKLIGHT_CLASS_DEVICE > + select BACKLIGHT_LCD_SUPPORT > + default y > help > This driver implements the ACPI Extensions For Display Adapters > for integrated graphics devices on motherboard, as specified inAcked-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com> for the ACPI_VIDEO changes. Thanks, Rafael
Jani Nikula
2017-Jul-31 11:28 UTC
[Nouveau] [Intel-gfx] [PATCH 0/3] Kconfig dependencies: acpi-video, backlight and thermal
On Wed, 26 Jul 2017, Daniel Vetter <daniel at ffwll.ch> wrote:> On Wed, Jul 26, 2017 at 03:53:09PM +0200, Arnd Bergmann wrote: >> Hi everyone, >> >> It took me a while to figure this out properly, as I kept getting >> circular or missing dependencies with video drivers. >> >> This set of three patches should simplify the situation a bit, >> mostly by cleaning up the dependencies around CONFIG_ACPI_VIDEO. >> With all three patches applied, I no longer run into those related >> warnings. If everyone agrees on the general direction, I hope >> we can merge all three through the DRM tree. >> >> I originally had another larger patch in the series to replace all >> of the 'select BACKLIGHT_LCD_SUPPORT; select BACKLIGHT_CLASS_DEVICE' >> statements with 'depends on LCD_CLASS_DEVICE', that would clean >> it up some more, but it is also a more invasive change that we >> can do separately at some point. > > Looks reasonable, but I think it'd be good to get Jani Nikula's explicit > ack on this, since he dugg around a lot in this area. And he's on vacation > this week.I didn't dig through all the details, but looks good to me and definitely an improvement in drm Kconfigs. Acked-by: Jani Nikula <jani.nikula at intel.com>> -Daniel > >> >> Arnd >> >> Arnd Bergmann (3): >> backlight: always select BACKLIGHT_LCD_SUPPORT for >> BACKLIGHT_CLASS_DEVICE >> ACPI/DRM: rework ACPI_VIDEO Kconfig dependencies >> drm/etnaviv: add thermal dependency >> >> drivers/acpi/Kconfig | 7 +++++-- >> drivers/gpu/drm/etnaviv/Kconfig | 1 + >> drivers/gpu/drm/gma500/Kconfig | 5 +---- >> drivers/gpu/drm/i915/Kconfig | 7 +------ >> drivers/gpu/drm/nouveau/Kconfig | 10 ++-------- >> drivers/platform/x86/Kconfig | 9 ++++----- >> drivers/staging/olpc_dcon/Kconfig | 1 + >> 7 files changed, 15 insertions(+), 25 deletions(-) >> >> To: dri-devel at lists.freedesktop.org >> Cc: "Rafael J. Wysocki" <rjw at rjwysocki.net> >> Cc: Len Brown <lenb at kernel.org> >> Cc: Lucas Stach <l.stach at pengutronix.de> >> Cc: Russell King <linux+etnaviv at armlinux.org.uk> >> Cc: Christian Gmeiner <christian.gmeiner at gmail.com> >> Cc: David Airlie <airlied at linux.ie> >> Cc: Patrik Jakobsson <patrik.r.jakobsson at gmail.com> >> Cc: Daniel Vetter <daniel.vetter at intel.com> >> Cc: Jani Nikula <jani.nikula at linux.intel.com> >> Cc: Ben Skeggs <bskeggs at redhat.com> >> Cc: Darren Hart <dvhart at infradead.org> >> Cc: Andy Shevchenko <andy at infradead.org> >> Cc: Jens Frederich <jfrederich at gmail.com> >> Cc: Daniel Drake <dsd at laptop.org> >> Cc: Jon Nettleton <jon.nettleton at gmail.com> >> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org> >> Cc: linux-acpi at vger.kernel.org >> Cc: linux-kernel at vger.kernel.org >> Cc: etnaviv at lists.freedesktop.org >> Cc: intel-gfx at lists.freedesktop.org >> Cc: nouveau at lists.freedesktop.org >> Cc: platform-driver-x86 at vger.kernel.org >> Cc: devel at driverdev.osuosl.org >> >> -- >> 2.9.0 >> >> _______________________________________________ >> Intel-gfx mailing list >> Intel-gfx at lists.freedesktop.org >> https://lists.freedesktop.org/mailman/listinfo/intel-gfx-- Jani Nikula, Intel Open Source Technology Center
Lucas Stach
2017-Aug-08 11:16 UTC
[Nouveau] [PATCH 3/3] drm/etnaviv: add thermal dependency
Hi Arnd, Am Mittwoch, den 26.07.2017, 15:53 +0200 schrieb Arnd Bergmann:> 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 <arnd at arndb.de> > --- > 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 -I would like to take this patch, but I'm not sure why it includes x86 and ACPI hunks. Regards, Lucas> 3 files changed, 2 insertions(+), 2 deletions(-) > > 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.
Apparently Analagous Threads
- [PATCH 0/3] Kconfig dependencies: acpi-video, backlight and thermal
- [PATCH] drm: remove NULL pointer check for clk_disable_unprepare
- [PATCH] drm: Remove unnecessary (void*) conversions
- [PATCH] drm: Remove unnecessary (void*) conversions
- [PATCH] drm: Remove unnecessary (void*) conversions