linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] ARM: dts: exynos: Add GPU thermal zone cooling maps for Odroid XU3/XU4/HC1
       [not found] <CGME20200117123454eucas1p2a7a3a6b64fae5382ef404ac2542aa4b3@eucas1p2.samsung.com>
@ 2020-01-17 12:34 ` Marek Szyprowski
       [not found]   ` <CGME20200117123454eucas1p1e8f0e527dc39f1e0993b14c7098002e4@eucas1p1.samsung.com>
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Marek Szyprowski @ 2020-01-17 12:34 UTC (permalink / raw)
  To: linux-samsung-soc, linux-kernel
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Chanwoo Choi

Add trip points and cooling maps for GPU thermal zone for Odroid
XU3/XU4/HC1 boards. Trip points are based on the CPU thermal zone for the
those boards.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/boot/dts/exynos5422-odroidhc1.dts    | 32 ++++++++++
 .../boot/dts/exynos5422-odroidxu3-common.dtsi | 59 +++++++++++++++++++
 2 files changed, 91 insertions(+)

diff --git a/arch/arm/boot/dts/exynos5422-odroidhc1.dts b/arch/arm/boot/dts/exynos5422-odroidhc1.dts
index f163206265bb..8f38ef5bff55 100644
--- a/arch/arm/boot/dts/exynos5422-odroidhc1.dts
+++ b/arch/arm/boot/dts/exynos5422-odroidhc1.dts
@@ -215,6 +215,38 @@
 				};
 			};
 		};
+		gpu_thermal: gpu-thermal {
+			thermal-sensors = <&tmu_gpu 0>;
+			polling-delay-passive = <250>;
+			polling-delay = <0>;
+			trips {
+				gpu_alert0: gpu-alert-0 {
+					temperature = <70000>;
+					hysteresis = <10000>;
+					type = "active";
+				};
+				gpu_alert1: gpu-alert-1 {
+					temperature = <85000>;
+					hysteresis = <10000>;
+					type = "active";
+				};
+				gpu_crit0: gpu-crit-0 {
+					temperature = <120000>;
+					hysteresis = <0>;
+					type = "critical";
+				};
+			};
+			cooling-maps {
+				map0 {
+					trip = <&gpu_alert0>;
+					cooling-device = <&gpu 0 2>;
+				};
+				map1 {
+					trip = <&gpu_alert1>;
+					cooling-device = <&gpu 3 6>;
+				};
+			};
+		};
 	};
 
 };
diff --git a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
index 1865a708b49f..5da2d81e3be2 100644
--- a/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
+++ b/arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi
@@ -357,6 +357,65 @@
 				};
 			};
 		};
+		gpu_thermal: gpu-thermal {
+			thermal-sensors = <&tmu_gpu 0>;
+			polling-delay-passive = <250>;
+			polling-delay = <0>;
+			trips {
+				gpu_alert0: gpu-alert-0 {
+					temperature = <50000>;
+					hysteresis = <5000>;
+					type = "active";
+				};
+				gpu_alert1: gpu-alert-1 {
+					temperature = <60000>;
+					hysteresis = <5000>;
+					type = "active";
+				};
+				gpu_alert2: gpu-alert-2 {
+					temperature = <70000>;
+					hysteresis = <5000>;
+					type = "active";
+				};
+				gpu_crit0: gpu-crit-0 {
+					temperature = <120000>;
+					hysteresis = <0>;
+					type = "critical";
+				};
+				gpu_alert3: gpu-alert-3 {
+					temperature = <70000>;
+					hysteresis = <10000>;
+					type = "passive";
+				};
+				gpu_alert4: gpu-alert-4 {
+					temperature = <85000>;
+					hysteresis = <10000>;
+					type = "passive";
+				};
+			};
+			cooling-maps {
+				map0 {
+					trip = <&gpu_alert0>;
+					cooling-device = <&fan0 0 1>;
+				};
+				map1 {
+					trip = <&gpu_alert1>;
+					cooling-device = <&fan0 1 2>;
+				};
+				map2 {
+					trip = <&gpu_alert2>;
+					cooling-device = <&fan0 2 3>;
+				};
+				map3 {
+					trip = <&gpu_alert3>;
+					cooling-device = <&gpu 0 2>;
+				};
+				map4 {
+					trip = <&gpu_alert4>;
+					cooling-device = <&gpu 3 6>;
+				};
+			};
+		};
 	};
 };
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] ARM: exynos_defconfig: Enable devfreq thermal integration
       [not found]   ` <CGME20200117123454eucas1p1e8f0e527dc39f1e0993b14c7098002e4@eucas1p1.samsung.com>
@ 2020-01-17 12:34     ` Marek Szyprowski
  2020-01-17 19:16       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 6+ messages in thread
From: Marek Szyprowski @ 2020-01-17 12:34 UTC (permalink / raw)
  To: linux-samsung-soc, linux-kernel
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Chanwoo Choi

Panfrost driver provides a devfreq driver for the Mali GPU and allows to
scale GPU core frequency. Enable support for devfreq thermal integration
to enable cooling of GPU thermal zone by reducing GPU core frequency.

This fixes following warning during boot on Exynos5422-based Odroid XU4:

panfrost 11800000.gpu: [drm:panfrost_devfreq_init] Failed to register cooling device

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/configs/exynos_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/exynos_defconfig b/arch/arm/configs/exynos_defconfig
index c05263de08a5..d80dbdaf00f8 100644
--- a/arch/arm/configs/exynos_defconfig
+++ b/arch/arm/configs/exynos_defconfig
@@ -155,6 +155,7 @@ CONFIG_SENSORS_NTC_THERMISTOR=y
 CONFIG_SENSORS_PWM_FAN=y
 CONFIG_SENSORS_INA2XX=y
 CONFIG_CPU_THERMAL=y
+CONFIG_DEVFREQ_THERMAL=y
 CONFIG_THERMAL_EMULATION=y
 CONFIG_WATCHDOG=y
 CONFIG_S3C2410_WATCHDOG=y
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] ARM: multi_v7_defconfig: Enable devfreq thermal integration
       [not found]   ` <CGME20200117123454eucas1p28093460c40e4300d4a58f7809f614135@eucas1p2.samsung.com>
@ 2020-01-17 12:34     ` Marek Szyprowski
  2020-01-17 19:17       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 6+ messages in thread
From: Marek Szyprowski @ 2020-01-17 12:34 UTC (permalink / raw)
  To: linux-samsung-soc, linux-kernel
  Cc: Marek Szyprowski, Krzysztof Kozlowski, Bartlomiej Zolnierkiewicz,
	Chanwoo Choi

Panfrost driver provides a devfreq driver for the Mali GPU and allows to
scale GPU core frequency. Enable support for devfreq thermal integration
to enable cooling of GPU thermal zone by reducing GPU core frequency.

This fixes following warning during boot on Exynos5422-based Odroid XU4:

panfrost 11800000.gpu: [drm:panfrost_devfreq_init] Failed to register cooling device

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
 arch/arm/configs/multi_v7_defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 80373fe0280d..cc7f9533b3ef 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -492,6 +492,7 @@ CONFIG_SENSORS_PWM_FAN=m
 CONFIG_SENSORS_RASPBERRYPI_HWMON=m
 CONFIG_SENSORS_INA2XX=m
 CONFIG_CPU_THERMAL=y
+CONFIG_DEVFREQ_THERMAL=y
 CONFIG_IMX_THERMAL=y
 CONFIG_ROCKCHIP_THERMAL=y
 CONFIG_RCAR_THERMAL=y
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] ARM: dts: exynos: Add GPU thermal zone cooling maps for Odroid XU3/XU4/HC1
  2020-01-17 12:34 ` [PATCH 1/3] ARM: dts: exynos: Add GPU thermal zone cooling maps for Odroid XU3/XU4/HC1 Marek Szyprowski
       [not found]   ` <CGME20200117123454eucas1p1e8f0e527dc39f1e0993b14c7098002e4@eucas1p1.samsung.com>
       [not found]   ` <CGME20200117123454eucas1p28093460c40e4300d4a58f7809f614135@eucas1p2.samsung.com>
@ 2020-01-17 18:51   ` Krzysztof Kozlowski
  2 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2020-01-17 18:51 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-samsung-soc, linux-kernel, Bartlomiej Zolnierkiewicz, Chanwoo Choi

On Fri, Jan 17, 2020 at 01:34:46PM +0100, Marek Szyprowski wrote:
> Add trip points and cooling maps for GPU thermal zone for Odroid
> XU3/XU4/HC1 boards. Trip points are based on the CPU thermal zone for the
> those boards.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  arch/arm/boot/dts/exynos5422-odroidhc1.dts    | 32 ++++++++++
>  .../boot/dts/exynos5422-odroidxu3-common.dtsi | 59 +++++++++++++++++++
>  2 files changed, 91 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/exynos5422-odroidhc1.dts b/arch/arm/boot/dts/exynos5422-odroidhc1.dts
> index f163206265bb..8f38ef5bff55 100644
> --- a/arch/arm/boot/dts/exynos5422-odroidhc1.dts
> +++ b/arch/arm/boot/dts/exynos5422-odroidhc1.dts
> @@ -215,6 +215,38 @@
>  				};
>  			};
>  		};
> +		gpu_thermal: gpu-thermal {
> +			thermal-sensors = <&tmu_gpu 0>;
> +			polling-delay-passive = <250>;
> +			polling-delay = <0>;

These should not be needed - you do not add more than 4 thermal zones.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/3] ARM: exynos_defconfig: Enable devfreq thermal integration
  2020-01-17 12:34     ` [PATCH 2/3] ARM: exynos_defconfig: Enable devfreq thermal integration Marek Szyprowski
@ 2020-01-17 19:16       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2020-01-17 19:16 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-samsung-soc, linux-kernel, Bartlomiej Zolnierkiewicz, Chanwoo Choi

On Fri, Jan 17, 2020 at 01:34:47PM +0100, Marek Szyprowski wrote:
> Panfrost driver provides a devfreq driver for the Mali GPU and allows to
> scale GPU core frequency. Enable support for devfreq thermal integration
> to enable cooling of GPU thermal zone by reducing GPU core frequency.
> 
> This fixes following warning during boot on Exynos5422-based Odroid XU4:
> 
> panfrost 11800000.gpu: [drm:panfrost_devfreq_init] Failed to register cooling device
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  arch/arm/configs/exynos_defconfig | 1 +

Thanks, applied.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 3/3] ARM: multi_v7_defconfig: Enable devfreq thermal integration
  2020-01-17 12:34     ` [PATCH 3/3] ARM: multi_v7_defconfig: " Marek Szyprowski
@ 2020-01-17 19:17       ` Krzysztof Kozlowski
  0 siblings, 0 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2020-01-17 19:17 UTC (permalink / raw)
  To: Marek Szyprowski
  Cc: linux-samsung-soc, linux-kernel, Bartlomiej Zolnierkiewicz, Chanwoo Choi

On Fri, Jan 17, 2020 at 01:34:48PM +0100, Marek Szyprowski wrote:
> Panfrost driver provides a devfreq driver for the Mali GPU and allows to
> scale GPU core frequency. Enable support for devfreq thermal integration
> to enable cooling of GPU thermal zone by reducing GPU core frequency.
> 
> This fixes following warning during boot on Exynos5422-based Odroid XU4:
> 
> panfrost 11800000.gpu: [drm:panfrost_devfreq_init] Failed to register cooling device
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
>  arch/arm/configs/multi_v7_defconfig | 1 +

Thanks, applied.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-01-17 19:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200117123454eucas1p2a7a3a6b64fae5382ef404ac2542aa4b3@eucas1p2.samsung.com>
2020-01-17 12:34 ` [PATCH 1/3] ARM: dts: exynos: Add GPU thermal zone cooling maps for Odroid XU3/XU4/HC1 Marek Szyprowski
     [not found]   ` <CGME20200117123454eucas1p1e8f0e527dc39f1e0993b14c7098002e4@eucas1p1.samsung.com>
2020-01-17 12:34     ` [PATCH 2/3] ARM: exynos_defconfig: Enable devfreq thermal integration Marek Szyprowski
2020-01-17 19:16       ` Krzysztof Kozlowski
     [not found]   ` <CGME20200117123454eucas1p28093460c40e4300d4a58f7809f614135@eucas1p2.samsung.com>
2020-01-17 12:34     ` [PATCH 3/3] ARM: multi_v7_defconfig: " Marek Szyprowski
2020-01-17 19:17       ` Krzysztof Kozlowski
2020-01-17 18:51   ` [PATCH 1/3] ARM: dts: exynos: Add GPU thermal zone cooling maps for Odroid XU3/XU4/HC1 Krzysztof Kozlowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).