drm/etnaviv: add thermal dependency
Subsystems (4)
PATCH 1/1 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.
--- drivers/acpi/Kconfig | 2 +- drivers/gpu/drm/etnaviv/Kconfig | 1 + drivers/platform/x86/Kconfig | 1 - 3 files changed, 2 insertions(+), 2 deletions(-)
drivers/acpi/Kconfig +1 -1
@@ -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
drivers/gpu/drm/etnaviv/Kconfig +1 -0
@@ -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
drivers/platform/x86/Kconfig +0 -1
@@ -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.
Signature · 6 lines
2.9.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · Arnd Bergmann
When
CONFIG_THERMALis 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 tothermal_of_cooling_device_register' etnaviv_gpu.c:(.text.etnaviv_gpu_bind+0xe0): undefined reference tothermal_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'
Quoted 9 lines
This adds a
Kconfigdependency to prevent etnaviv from being built-in withCONFIG_THERMAL=m, while still allowing the valid configurations. Unfortunately, simply adding the dependency here breaksKconfigthrough a dependency loop involving lots of symbols all the way untilACPI_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' fromINTEL_MENLOW, so no other driver uses that statement.
For PDx86 part:
Quoted 48 lines
Fixes bcdfb5e56dc5 ("drm/etnaviv: add etnaviv cooling device")Signed-off-by Arnd Bergmann <[email protected]>--- drivers/acpi/Kconfig | 2 +- drivers/gpu/drm/etnaviv/Kconfig | 1 + drivers/platform/x86/Kconfig | 1 - 3 files changed, 2 insertions(+), 2 deletions(-)drivers/acpi/Kconfig +1
-1@@ -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 indrivers/gpu/drm/etnaviv/Kconfig +1
-0@@ -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_FILEdrivers/platform/x86/Kconfig +0
-2@@ -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
Signature · 6 lines
With Best Regards, Andy Shevchenko _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 18 lines · Arnd Bergmann
When
CONFIG_THERMALis 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 tothermal_of_cooling_device_register' etnaviv_gpu.c:(.text.etnaviv_gpu_bind+0xe0): undefined reference tothermal_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
Kconfigdependency to prevent etnaviv from being built-in withCONFIG_THERMAL=m, while still allowing the valid configurations. Unfortunately, simply adding the dependency here breaksKconfigthrough a dependency loop involving lots of symbols all the way untilACPI_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' fromINTEL_MENLOW, so no other driver uses that statement.
Quoted 2 lines
Fixes bcdfb5e56dc5 ("drm/etnaviv: add etnaviv cooling device")Signed-off-by Arnd Bergmann <[email protected]>
Quoted 46 lines
--- drivers/acpi/Kconfig | 2 +- drivers/gpu/drm/etnaviv/Kconfig | 1 + drivers/platform/x86/Kconfig | 1 - 3 files changed, 2 insertions(+), 2 deletions(-)drivers/acpi/Kconfig +1
-1@@ -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 indrivers/gpu/drm/etnaviv/Kconfig +1
-0@@ -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_FILEdrivers/platform/x86/Kconfig +0
-1@@ -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.Signature · 1 line
2.9.0
Lucas Stach
maintainerAm Mittwoch, den 19.04.2017, 20:11 +0200 schrieb Arnd Bergmann:
Quoted 18 lines
When
CONFIG_THERMALis 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 tothermal_of_cooling_device_register' etnaviv_gpu.c:(.text.etnaviv_gpu_bind+0xe0): undefined reference tothermal_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
Kconfigdependency to prevent etnaviv from being built-in withCONFIG_THERMAL=m, while still allowing the valid configurations. Unfortunately, simply adding the dependency here breaksKconfigthrough a dependency loop involving lots of symbols all the way untilACPI_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' fromINTEL_MENLOW, so no other driver uses that statement.
Quoted 2 lines
Fixes bcdfb5e56dc5 ("drm/etnaviv: add etnaviv cooling device")Signed-off-by Arnd Bergmann <[email protected]>
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
Quoted 43 lines
--- drivers/acpi/Kconfig | 2 +- drivers/gpu/drm/etnaviv/Kconfig | 1 + drivers/platform/x86/Kconfig | 1 - 3 files changed, 2 insertions(+), 2 deletions(-)drivers/acpi/Kconfig +1
-1@@ -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 indrivers/gpu/drm/etnaviv/Kconfig +1
-0@@ -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_FILEdrivers/platform/x86/Kconfig +0
-1@@ -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.
Quoted 19 lines · Lucas Stach
Am Mittwoch, den 19.04.2017, 20:11 +0200 schrieb Arnd Bergmann:
Quoted 18 lines
When
CONFIG_THERMALis 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 tothermal_of_cooling_device_register' etnaviv_gpu.c:(.text.etnaviv_gpu_bind+0xe0): undefined reference tothermal_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
Kconfigdependency to prevent etnaviv from being built-in withCONFIG_THERMAL=m, while still allowing the valid configurations. Unfortunately, simply adding the dependency here breaksKconfigthrough a dependency loop involving lots of symbols all the way untilACPI_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' fromINTEL_MENLOW, so no other driver uses that statement.
Quoted 6 lines
Quoted 2 lines
Fixes bcdfb5e56dc5 ("drm/etnaviv: add etnaviv cooling device")Signed-off-by Arnd Bergmann <[email protected]>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
dg
Quoted 37 lines · Arnd Bergmann
Quoted 19 lines · Lucas Stach
Am Mittwoch, den 19.04.2017, 20:11 +0200 schrieb Arnd Bergmann:
Quoted 18 lines
When
CONFIG_THERMALis 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 tothermal_of_cooling_device_register' etnaviv_gpu.c:(.text.etnaviv_gpu_bind+0xe0): undefined reference tothermal_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
Kconfigdependency to prevent etnaviv from being built-in withCONFIG_THERMAL=m, while still allowing the valid configurations. Unfortunately, simply adding the dependency here breaksKconfigthrough a dependency loop involving lots of symbols all the way untilACPI_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' fromINTEL_MENLOW, so no other driver uses that statement.Quoted 6 lines
Quoted 2 lines
Fixes bcdfb5e56dc5 ("drm/etnaviv: add etnaviv cooling device")Signed-off-by Arnd Bergmann <[email protected]>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 inACPI_VIDEOthat I used for ETNAVIV, because of another circular dependency in ACPI.Arnd