Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1626674 > unrolled thread

[PATCH] drm/etnaviv: add thermal dependency

Started byArnd Bergmann <arnd@arndb.de>
First post2017-04-19 20:20 +0200
Last post2017-04-24 19:40 +0200
Articles 5 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] drm/etnaviv: add thermal dependency Arnd Bergmann <arnd@arndb.de> - 2017-04-19 20:20 +0200
    Re: [PATCH] drm/etnaviv: add thermal dependency Andy Shevchenko <andy.shevchenko@gmail.com> - 2017-04-19 21:00 +0200
    Re: [PATCH] drm/etnaviv: add thermal dependency Eduardo Valentin <edubezval@gmail.com> - 2017-04-23 17:40 +0200
    Re: [PATCH] drm/etnaviv: add thermal dependency Lucas Stach <l.stach@pengutronix.de> - 2017-04-24 12:50 +0200
      Re: [PATCH] drm/etnaviv: add thermal dependency Arnd Bergmann <arnd@arndb.de> - 2017-04-24 19:40 +0200

#1626674 — [PATCH] drm/etnaviv: add thermal dependency

FromArnd Bergmann <arnd@arndb.de>
Date2017-04-19 20:20 +0200
Subject[PATCH] drm/etnaviv: add thermal dependency
Message-ID<ty2mS-6JR-11@gated-at.bofh.it>
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@arndb.de>
---
 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 03cc4e74096b..252399efa8b3 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -184,7 +184,7 @@ config ACPI_VIDEO
 	tristate "Video"
 	depends on X86 && BACKLIGHT_CLASS_DEVICE
 	depends on INPUT
-	select THERMAL
+	depends on THERMAL
 	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/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 e229ea317b9c..76ced87efde5 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -544,7 +544,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

[toc] | [next] | [standalone]


#1626713

FromAndy Shevchenko <andy.shevchenko@gmail.com>
Date2017-04-19 21:00 +0200
Message-ID<ty2ZA-6X8-19@gated-at.bofh.it>
In reply to#1626674
On Wed, Apr 19, 2017 at 9:11 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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.
>

For PDx86 part:

Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>

> Fixes: bcdfb5e56dc5 ("drm/etnaviv: add etnaviv cooling device")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  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 03cc4e74096b..252399efa8b3 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -184,7 +184,7 @@ config ACPI_VIDEO
>         tristate "Video"
>         depends on X86 && BACKLIGHT_CLASS_DEVICE
>         depends on INPUT
> -       select THERMAL
> +       depends on THERMAL
>         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/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 e229ea317b9c..76ced87efde5 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -544,7 +544,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
>



-- 
With Best Regards,
Andy Shevchenko

[toc] | [prev] | [next] | [standalone]


#1629040

FromEduardo Valentin <edubezval@gmail.com>
Date2017-04-23 17:40 +0200
Message-ID<tzrMd-1Lw-7@gated-at.bofh.it>
In reply to#1626674

[Multipart message — attachments visible in raw view] — view raw

On Wed, Apr 19, 2017 at 08:11:16PM +0200, Arnd Bergmann wrote:
> 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@arndb.de>

Acked-by: Eduardo Valentin <edubezval@gmail.com>

> ---
>  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 03cc4e74096b..252399efa8b3 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -184,7 +184,7 @@ config ACPI_VIDEO
>  	tristate "Video"
>  	depends on X86 && BACKLIGHT_CLASS_DEVICE
>  	depends on INPUT
> -	select THERMAL
> +	depends on THERMAL
>  	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/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 e229ea317b9c..76ced87efde5 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -544,7 +544,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
> 

[toc] | [prev] | [next] | [standalone]


#1629420

FromLucas Stach <l.stach@pengutronix.de>
Date2017-04-24 12:50 +0200
Message-ID<tzJJ8-5V5-29@gated-at.bofh.it>
In reply to#1626674
Am Mittwoch, den 19.04.2017, 20:11 +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@arndb.de>

This patch mixes a few things, so the subject doesn't really fit. I'm
fine with taking the patch trough my tree, if I can get an ACK on the
ACPI part.

Regards,
Lucas

> ---
>  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 03cc4e74096b..252399efa8b3 100644
> --- a/drivers/acpi/Kconfig
> +++ b/drivers/acpi/Kconfig
> @@ -184,7 +184,7 @@ config ACPI_VIDEO
>  	tristate "Video"
>  	depends on X86 && BACKLIGHT_CLASS_DEVICE
>  	depends on INPUT
> -	select THERMAL
> +	depends on THERMAL
>  	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/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 e229ea317b9c..76ced87efde5 100644
> --- a/drivers/platform/x86/Kconfig
> +++ b/drivers/platform/x86/Kconfig
> @@ -544,7 +544,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.

[toc] | [prev] | [next] | [standalone]


#1629811

FromArnd Bergmann <arnd@arndb.de>
Date2017-04-24 19:40 +0200
Message-ID<tzQ7T-1tV-1@gated-at.bofh.it>
In reply to#1629420
On Mon, Apr 24, 2017 at 12:44 PM, Lucas Stach <l.stach@pengutronix.de> wrote:
> Am Mittwoch, den 19.04.2017, 20:11 +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@arndb.de>
>
> This patch mixes a few things, so the subject doesn't really fit. I'm
> fine with taking the patch trough my tree, if I can get an ACK on the
> ACPI part.

Actually the ACPI part triggered a new warning that I haven't figured
out completely yet. Please disregard my patch for the moment.

I think we can just drop the dependency in ACPI_VIDEO, but I'm not
entirely sure yet if we could hit a broken configuration with THERMAL=m
and ACPI_VIDEO=y in that case. Unfortunately we cannot use the
same trick in ACPI_VIDEO that I used for ETNAVIV, because of
another circular dependency in ACPI.

        Arnd

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web