Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding
@ 2019-05-16 17:25 Matthias Kaehlcke
  2019-05-16 17:25 ` [PATCH v2 2/3] ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU Matthias Kaehlcke
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Matthias Kaehlcke @ 2019-05-16 17:25 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter, Heiko Stuebner, Rob Herring, Mark Rutland
  Cc: devicetree, Douglas Anderson, dri-devel, linux-kernel,
	linux-rockchip, Matthias Kaehlcke, linux-arm-kernel

The GPU can be used as a thermal cooling device, add an optional
'#cooling-cells' property.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v2:
- patch added to the series
---
 Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
index 18a2cde2e5f3..61fd41a20f99 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
@@ -37,6 +37,8 @@ Optional properties:
 - operating-points-v2 : Refer to Documentation/devicetree/bindings/opp/opp.txt
   for details.
 
+- #cooling-cells: Refer to Documentation/devicetree/bindings/thermal/thermal.txt
+  for details.
 
 Example for a Mali-T760:
 
@@ -51,6 +53,7 @@ gpu@ffa30000 {
 	mali-supply = <&vdd_gpu>;
 	operating-points-v2 = <&gpu_opp_table>;
 	power-domains = <&power RK3288_PD_GPU>;
+	#cooling-cells = <2>;
 };
 
 gpu_opp_table: opp_table0 {
-- 
2.21.0.1020.gf2820cf01a-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 2/3] ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU
  2019-05-16 17:25 [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding Matthias Kaehlcke
@ 2019-05-16 17:25 ` Matthias Kaehlcke
  2019-05-22  9:02   ` Heiko Stuebner
  2019-05-16 17:25 ` [PATCH v2 3/3] ARM: dts: rockchip: Use GPU as cooling device for the GPU thermal zone of the rk3288 Matthias Kaehlcke
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Matthias Kaehlcke @ 2019-05-16 17:25 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter, Heiko Stuebner, Rob Herring, Mark Rutland
  Cc: devicetree, Douglas Anderson, dri-devel, linux-kernel,
	linux-rockchip, Matthias Kaehlcke, linux-arm-kernel

The Mali GPU of the rk3288 can be used as cooling device, add
a #cooling-cells entry for it.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
---
Changes in v2:
- added Doug's 'Reviewed-by' tag
---
 arch/arm/boot/dts/rk3288.dtsi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index a024d1e7e74c..14d9609f0b15 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -1273,6 +1273,7 @@
 		interrupt-names = "job", "mmu", "gpu";
 		clocks = <&cru ACLK_GPU>;
 		operating-points-v2 = <&gpu_opp_table>;
+		#cooling-cells = <2>; /* min followed by max */
 		power-domains = <&power RK3288_PD_GPU>;
 		status = "disabled";
 	};
-- 
2.21.0.1020.gf2820cf01a-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2 3/3] ARM: dts: rockchip: Use GPU as cooling device for the GPU thermal zone of the rk3288
  2019-05-16 17:25 [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding Matthias Kaehlcke
  2019-05-16 17:25 ` [PATCH v2 2/3] ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU Matthias Kaehlcke
@ 2019-05-16 17:25 ` Matthias Kaehlcke
  2019-05-16 17:39   ` Doug Anderson
  2019-05-16 17:40 ` [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding Doug Anderson
  2019-05-22  8:56 ` Heiko Stuebner
  3 siblings, 1 reply; 8+ messages in thread
From: Matthias Kaehlcke @ 2019-05-16 17:25 UTC (permalink / raw)
  To: David Airlie, Daniel Vetter, Heiko Stuebner, Rob Herring, Mark Rutland
  Cc: devicetree, Douglas Anderson, dri-devel, linux-kernel,
	linux-rockchip, Matthias Kaehlcke, linux-arm-kernel

Currently the CPUs are used as cooling devices of the rk3288 GPU
thermal zone. The CPUs are also configured as cooling devices in the
CPU thermal zone, which indirectly helps with cooling the GPU thermal
zone, since the CPU and GPU temperatures are correlated on the rk3288.

Configure the ARM Mali Midgard GPU as cooling device for the GPU
thermal zone instead of the CPUs.

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
Changes in v2:
- patch added to the series
---
 arch/arm/boot/dts/rk3288.dtsi | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi
index 14d9609f0b15..988555c5118d 100644
--- a/arch/arm/boot/dts/rk3288.dtsi
+++ b/arch/arm/boot/dts/rk3288.dtsi
@@ -547,10 +547,7 @@
 				map0 {
 					trip = <&gpu_alert0>;
 					cooling-device =
-						<&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-						<&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-						<&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
-						<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+						<&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
 				};
 			};
 		};
-- 
2.21.0.1020.gf2820cf01a-goog


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 3/3] ARM: dts: rockchip: Use GPU as cooling device for the GPU thermal zone of the rk3288
  2019-05-16 17:25 ` [PATCH v2 3/3] ARM: dts: rockchip: Use GPU as cooling device for the GPU thermal zone of the rk3288 Matthias Kaehlcke
@ 2019-05-16 17:39   ` Doug Anderson
  0 siblings, 0 replies; 8+ messages in thread
From: Doug Anderson @ 2019-05-16 17:39 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Mark Rutland, devicetree, Heiko Stuebner, David Airlie, LKML,
	dri-devel, open list:ARM/Rockchip SoC...,
	Rob Herring, Daniel Vetter, Linux ARM

Hi,

On Thu, May 16, 2019 at 10:25 AM Matthias Kaehlcke <mka@chromium.org> wrote:

> Currently the CPUs are used as cooling devices of the rk3288 GPU
> thermal zone. The CPUs are also configured as cooling devices in the
> CPU thermal zone, which indirectly helps with cooling the GPU thermal
> zone, since the CPU and GPU temperatures are correlated on the rk3288.
>
> Configure the ARM Mali Midgard GPU as cooling device for the GPU
> thermal zone instead of the CPUs.
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
> Changes in v2:
> - patch added to the series
> ---
>  arch/arm/boot/dts/rk3288.dtsi | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)

This makes sense to me unless there is some better way to model the
intertwined nature of the CPU and GPU temperature.  It's my
understanding that the original device tree snippet was there because
it was added before the gpu node existed in the device tree so the
best we could do is to suggest that the cpu could cool things down.

Reviewed-by: Douglas Anderson <dianders@chromium.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding
  2019-05-16 17:25 [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding Matthias Kaehlcke
  2019-05-16 17:25 ` [PATCH v2 2/3] ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU Matthias Kaehlcke
  2019-05-16 17:25 ` [PATCH v2 3/3] ARM: dts: rockchip: Use GPU as cooling device for the GPU thermal zone of the rk3288 Matthias Kaehlcke
@ 2019-05-16 17:40 ` Doug Anderson
  2019-05-17 10:37   ` Heiko Stuebner
  2019-05-22  8:56 ` Heiko Stuebner
  3 siblings, 1 reply; 8+ messages in thread
From: Doug Anderson @ 2019-05-16 17:40 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Mark Rutland, devicetree, Heiko Stuebner, David Airlie,
	Kevin Hilman, LKML, dri-devel, open list:ARM/Rockchip SoC...,
	Rob Herring, Daniel Vetter, Linux ARM

Hi,

On Thu, May 16, 2019 at 10:25 AM Matthias Kaehlcke <mka@chromium.org> wrote:

> The GPU can be used as a thermal cooling device, add an optional
> '#cooling-cells' property.
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> ---
> Changes in v2:
> - patch added to the series
> ---
>  Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> index 18a2cde2e5f3..61fd41a20f99 100644
> --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> @@ -37,6 +37,8 @@ Optional properties:
>  - operating-points-v2 : Refer to Documentation/devicetree/bindings/opp/opp.txt
>    for details.
>
> +- #cooling-cells: Refer to Documentation/devicetree/bindings/thermal/thermal.txt
> +  for details.
>
>  Example for a Mali-T760:
>
> @@ -51,6 +53,7 @@ gpu@ffa30000 {
>         mali-supply = <&vdd_gpu>;
>         operating-points-v2 = <&gpu_opp_table>;
>         power-domains = <&power RK3288_PD_GPU>;
> +       #cooling-cells = <2>;
>  };

You will conflict with d5ff1adb3809 ("dt-bindings: gpu: mali-midgard:
Add resets property"), but it's easy to rebase.  I'll leave it to
whoever is going to land this to decide if they would like you to
re-post or if they can handle resolving the conflict themselves.
+Kevin who appears to be the one who landed the conflicting commit.

With that:

Reviewed-by: Douglas Anderson <dianders@chromium.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding
  2019-05-16 17:40 ` [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding Doug Anderson
@ 2019-05-17 10:37   ` Heiko Stuebner
  0 siblings, 0 replies; 8+ messages in thread
From: Heiko Stuebner @ 2019-05-17 10:37 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Mark Rutland, devicetree, David Airlie, Kevin Hilman, dri-devel,
	open list:ARM/Rockchip SoC...,
	Rob Herring, Daniel Vetter, Matthias Kaehlcke, Linux ARM

Am Donnerstag, 16. Mai 2019, 19:40:38 CEST schrieb Doug Anderson:
> Hi,
> 
> On Thu, May 16, 2019 at 10:25 AM Matthias Kaehlcke <mka@chromium.org> wrote:
> 
> > The GPU can be used as a thermal cooling device, add an optional
> > '#cooling-cells' property.
> >
> > Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> > ---
> > Changes in v2:
> > - patch added to the series
> > ---
> >  Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> > index 18a2cde2e5f3..61fd41a20f99 100644
> > --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt
> > @@ -37,6 +37,8 @@ Optional properties:
> >  - operating-points-v2 : Refer to Documentation/devicetree/bindings/opp/opp.txt
> >    for details.
> >
> > +- #cooling-cells: Refer to Documentation/devicetree/bindings/thermal/thermal.txt
> > +  for details.
> >
> >  Example for a Mali-T760:
> >
> > @@ -51,6 +53,7 @@ gpu@ffa30000 {
> >         mali-supply = <&vdd_gpu>;
> >         operating-points-v2 = <&gpu_opp_table>;
> >         power-domains = <&power RK3288_PD_GPU>;
> > +       #cooling-cells = <2>;
> >  };
> 
> You will conflict with d5ff1adb3809 ("dt-bindings: gpu: mali-midgard:
> Add resets property"), but it's easy to rebase.  I'll leave it to
> whoever is going to land this to decide if they would like you to
> re-post or if they can handle resolving the conflict themselves.
> +Kevin who appears to be the one who landed the conflicting commit.

No problem, I can update this comment when applying
(likely to drm-misc to not create more conflicts),
but will give Rob a bit more time to possibly object :-)

[somewhere in the recent past, he said to not wait on him on the tiny
property-additions, and cooling-cells is pretty well used one at that]


> With that:
> 
> Reviewed-by: Douglas Anderson <dianders@chromium.org>






_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding
  2019-05-16 17:25 [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding Matthias Kaehlcke
                   ` (2 preceding siblings ...)
  2019-05-16 17:40 ` [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding Doug Anderson
@ 2019-05-22  8:56 ` Heiko Stuebner
  3 siblings, 0 replies; 8+ messages in thread
From: Heiko Stuebner @ 2019-05-22  8:56 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Mark Rutland, devicetree, David Airlie, linux-kernel, dri-devel,
	Douglas Anderson, linux-rockchip, Rob Herring, Daniel Vetter,
	linux-arm-kernel

Am Donnerstag, 16. Mai 2019, 19:25:08 CEST schrieb Matthias Kaehlcke:
> The GPU can be used as a thermal cooling device, add an optional
> '#cooling-cells' property.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>

applied to drm-misc-next for 5.3



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2 2/3] ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU
  2019-05-16 17:25 ` [PATCH v2 2/3] ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU Matthias Kaehlcke
@ 2019-05-22  9:02   ` Heiko Stuebner
  0 siblings, 0 replies; 8+ messages in thread
From: Heiko Stuebner @ 2019-05-22  9:02 UTC (permalink / raw)
  To: Matthias Kaehlcke
  Cc: Mark Rutland, devicetree, David Airlie, linux-kernel, dri-devel,
	Douglas Anderson, linux-rockchip, Rob Herring, Daniel Vetter,
	linux-arm-kernel

Am Donnerstag, 16. Mai 2019, 19:25:09 CEST schrieb Matthias Kaehlcke:
> The Mali GPU of the rk3288 can be used as cooling device, add
> a #cooling-cells entry for it.
> 
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>

applied patches 2+3 for 5.3

Thanks
Heiko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, back to index

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-16 17:25 [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding Matthias Kaehlcke
2019-05-16 17:25 ` [PATCH v2 2/3] ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU Matthias Kaehlcke
2019-05-22  9:02   ` Heiko Stuebner
2019-05-16 17:25 ` [PATCH v2 3/3] ARM: dts: rockchip: Use GPU as cooling device for the GPU thermal zone of the rk3288 Matthias Kaehlcke
2019-05-16 17:39   ` Doug Anderson
2019-05-16 17:40 ` [PATCH v2 1/3] dt-bindings: gpu: add #cooling-cells property to the ARM Mali Midgard GPU binding Doug Anderson
2019-05-17 10:37   ` Heiko Stuebner
2019-05-22  8:56 ` Heiko Stuebner

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org infradead-linux-arm-kernel@archiver.kernel.org
	public-inbox-index linux-arm-kernel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox