* [PATCH v2 0/5] arm64: dts: rockchip: support mail and IPA thermal for rk3399 @ 2017-07-17 8:14 Caesar Wang 2017-07-17 8:14 ` [PATCH v2 1/5] dt-bindings: gpu: add the RK3399 mali for rockchip specifics Caesar Wang ` (5 more replies) 0 siblings, 6 replies; 17+ messages in thread From: Caesar Wang @ 2017-07-17 8:14 UTC (permalink / raw) To: Heiko Stuebner Cc: linux-rockchip, rocky.hao, Caesar Wang, linux-arm-kernel, devicetree, William wu, Matthias Kaehlcke, Elaine Zhang, Kever Yang, Brian Norris, Klaus Goger, linux-kernel, dri-devel, Shawn Lin, Rob Herring, Douglas Anderson, David Airlie, Will Deacon, Mark Rutland, Catalin Marinas, Roger Chen This series patches supported the mail in devicetree and used the thermal IPA by default. Verified with kernel is based on Linus's master branch and Heiko's v4.14-armsoc-tmp/dts64 branch. ( The Linux version 4.12.0 for now). The most rockchip SoCs will be supported with IPA mode for thermal in later. --- History version: 1. The first version found on https://www.spinics.net/lists/arm-kernel/msg593118.html Tested on Kevin board with bringing up ChromeOS. OS VERSION: CHROMEOS_RELEASE_DESCRIPTION=9693.1.0 (Official Build) dev-channel kevin test BIOS VERSION: Google_Kevin.8785.211.2017_06_20_1043 EC VERSION: Build info: kevin_v1.10.217-24514961d 2017-07-03 07:46:36 wxt@nb With the ARM's lastest mali driver TX011-SW-99002-r18p0-01rel0 on https://developer.arm.com/products/software/mali-drivers/midgard-kernel >From the bootup log: localhost devfreq0 # dmesg |grep mali [ 0.933334] mali ff9a0000.gpu: GPU identified as 0x0860 r2p0 status 0 [ 0.940830] mali ff9a0000.gpu: Protected mode not available [ 0.947334] mali ff9a0000.gpu: Using configured power model mali-simple-power-model, and fallback mali-simple-power-model [ 0.960083] mali ff9a0000.gpu: Probed as mali0 localhost devfreq0 # pwd /sys/devices/platform/ff9a0000.gpu/devfreq/devfreq0 localhost devfreq0 # ls available_frequencies device min_freq subsystem uevent available_governors governor polling_interval target_freq userspace cur_freq max_freq power trans_stat localhost ff9a0000.gpu # ls core_availability_policy gpuinfo modalias soft_job_timeout core_mask js_scheduling_period of_node subsystem devfreq js_timeouts pm_poweroff uevent driver mem_pool_max_size power driver_override mem_pool_size power_policy dvfs_period misc reset_timeout --- And for thermal with IPA. Try to run 'md5sum /dev/zero &' and octane/benchmark scripts to go up the temperature. >From the scripts to have a look at the actual control. " while true; do grep "" /sys/class/thermal/thermal_zone[0-1]/temp /sys/devices/system/cpu/cpu[0-5]/cpufreq/scaling_cur_freq /sys/devices/platform/ff9a0000.gpu/devfreq/devfreq0/cur_freq;date;sleep .5; done & " -Caesar Changes in v2: As Heiko comments on https://patchwork.kernel.org/patch/9835939/ - interrupt-name use the lower case. - use the correct compatible "arm,mali-t860" - remove the clock name, since the mali only have one input clock. - foo@ will produce warnings when used without reg property. - update the commit to explain the two passive trip points changed. Caesar Wang (5): dt-bindings: gpu: add the RK3399 mali for rockchip specifics dt-bindings: gpu: add a power_model optional properties for MALI arm64: dts: rockchip: add ARM Mali GPU node for RK3399 SoCs arm64: dts: rockchip: enable the GPU for RK3399-GRU arm64: dts: rockchip: update the thermal zones for RK3399 SoCs .../devicetree/bindings/gpu/arm,mali-midgard.txt | 13 ++++ arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 5 ++ arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 33 ++++++++++ arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 33 ++++++++++ arch/arm64/boot/dts/rockchip/rk3399.dtsi | 74 ++++++++++++---------- 5 files changed, 125 insertions(+), 33 deletions(-) -- 2.7.4 ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 1/5] dt-bindings: gpu: add the RK3399 mali for rockchip specifics 2017-07-17 8:14 [PATCH v2 0/5] arm64: dts: rockchip: support mail and IPA thermal for rk3399 Caesar Wang @ 2017-07-17 8:14 ` Caesar Wang [not found] ` <1500279271-15249-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-07-17 8:14 ` [PATCH v2 2/5] dt-bindings: gpu: add a power_model optional properties for MALI Caesar Wang ` (4 subsequent siblings) 5 siblings, 1 reply; 17+ messages in thread From: Caesar Wang @ 2017-07-17 8:14 UTC (permalink / raw) To: Heiko Stuebner Cc: Mark Rutland, devicetree, linux-kernel, dri-devel, linux-rockchip, Rob Herring, rocky.hao, Caesar Wang RK3399's GPU uses the quad-core Mali-T860, which is the new generation of high-end graphics processors from ARM. This patch added "rockchip,rk3399-mali" for dt-bindings, in order to support IPA of gpu thermal in later. Signed-off-by: Caesar Wang <wxt@rock-chips.com> --- Changes in v2: None Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt index d3b6e1a4..a461e47 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt @@ -17,6 +17,7 @@ Required properties: * which must be preceded by one of the following vendor specifics: + "amlogic,meson-gxm-mali" + "rockchip,rk3288-mali" + + "rockchip,rk3399-mali" - reg : Physical base address of the device and length of the register area. -- 2.7.4 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply related [flat|nested] 17+ messages in thread
[parent not found: <1500279271-15249-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* Re: [PATCH v2 1/5] dt-bindings: gpu: add the RK3399 mali for rockchip specifics [not found] ` <1500279271-15249-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> @ 2017-07-17 19:51 ` Rob Herring 2017-07-22 21:38 ` Heiko Stuebner 1 sibling, 0 replies; 17+ messages in thread From: Rob Herring @ 2017-07-17 19:51 UTC (permalink / raw) To: Caesar Wang Cc: Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, rocky.hao-TNX95d0MmH7DzftRWevZcw, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, David Airlie, Mark Rutland On Mon, Jul 17, 2017 at 04:14:27PM +0800, Caesar Wang wrote: > RK3399's GPU uses the quad-core Mali-T860, which is the new generation of > high-end graphics processors from ARM. > > This patch added "rockchip,rk3399-mali" for dt-bindings, in order to > support IPA of gpu thermal in later. > > Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> > --- > > Changes in v2: None > > Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 1 + > 1 file changed, 1 insertion(+) Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 1/5] dt-bindings: gpu: add the RK3399 mali for rockchip specifics [not found] ` <1500279271-15249-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-07-17 19:51 ` Rob Herring @ 2017-07-22 21:38 ` Heiko Stuebner 1 sibling, 0 replies; 17+ messages in thread From: Heiko Stuebner @ 2017-07-22 21:38 UTC (permalink / raw) To: Caesar Wang Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, rocky.hao-TNX95d0MmH7DzftRWevZcw, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Rob Herring, David Airlie, Mark Rutland Am Montag, 17. Juli 2017, 16:14:27 CEST schrieb Caesar Wang: > RK3399's GPU uses the quad-core Mali-T860, which is the new generation of > high-end graphics processors from ARM. > > This patch added "rockchip,rk3399-mali" for dt-bindings, in order to > support IPA of gpu thermal in later. > > Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> applied for 4.14 with Rob's Ack Heiko -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 2/5] dt-bindings: gpu: add a power_model optional properties for MALI 2017-07-17 8:14 [PATCH v2 0/5] arm64: dts: rockchip: support mail and IPA thermal for rk3399 Caesar Wang 2017-07-17 8:14 ` [PATCH v2 1/5] dt-bindings: gpu: add the RK3399 mali for rockchip specifics Caesar Wang @ 2017-07-17 8:14 ` Caesar Wang 2017-07-17 20:07 ` Rob Herring [not found] ` <1500279271-15249-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> ` (3 subsequent siblings) 5 siblings, 1 reply; 17+ messages in thread From: Caesar Wang @ 2017-07-17 8:14 UTC (permalink / raw) To: Heiko Stuebner Cc: linux-rockchip, rocky.hao, Caesar Wang, devicetree, linux-kernel, dri-devel, Rob Herring, David Airlie, Mark Rutland This patch adds the MALI's power-model to set the IPA model to be used for power management. Signed-off-by: Caesar Wang <wxt@rock-chips.com> --- Changes in v2: None Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt index a461e47..b616e6b 100644 --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt @@ -37,6 +37,18 @@ Optional properties: - operating-points-v2 : Refer to Documentation/devicetree/bindings/power/opp.txt for details. +- power_model : Sets power model parameters. Note that this model was designed for the Juno + platform, and may not be suitable for other platforms. A structure containing : + - compatible: Should be arm,mali-simple-power-model + - dynamic-coefficient: Coefficient, in pW/(Hz V^2), which is multiplied + by v^2*f to calculate the dynamic power consumption. + - static-coefficient: Coefficient, in uW/V^3, which is multiplied by + v^3 to calculate the static power consumption. + - ts: An array containing coefficients for the temperature scaling + factor. This is used to scale the static power by a factor of + tsf/1000000, where tsf = ts[3]*T^3 + ts[2]*T^2 + ts[1]*T + ts[0], + and T = temperature in degrees. + - thermal-zone: A string identifying the thermal zone used for the GPU Example for a Mali-T760: -- 2.7.4 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH v2 2/5] dt-bindings: gpu: add a power_model optional properties for MALI 2017-07-17 8:14 ` [PATCH v2 2/5] dt-bindings: gpu: add a power_model optional properties for MALI Caesar Wang @ 2017-07-17 20:07 ` Rob Herring 2017-07-18 0:58 ` Caesar Wang 0 siblings, 1 reply; 17+ messages in thread From: Rob Herring @ 2017-07-17 20:07 UTC (permalink / raw) To: Caesar Wang Cc: Mark Rutland, devicetree, linux-kernel, dri-devel, linux-rockchip, rocky.hao On Mon, Jul 17, 2017 at 04:14:28PM +0800, Caesar Wang wrote: > This patch adds the MALI's power-model to set the IPA model to be used > for power management. What's IPA? India Pale Ale or Intermediate Physical Address? > > Signed-off-by: Caesar Wang <wxt@rock-chips.com> > --- > > Changes in v2: None > > Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt > index a461e47..b616e6b 100644 > --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt > @@ -37,6 +37,18 @@ Optional properties: > - operating-points-v2 : Refer to Documentation/devicetree/bindings/power/opp.txt > for details. > > +- power_model : Sets power model parameters. Note that this model was designed for the Juno > + platform, and may not be suitable for other platforms. A structure containing : > + - compatible: Should be arm,mali-simple-power-model > + - dynamic-coefficient: Coefficient, in pW/(Hz V^2), which is multiplied > + by v^2*f to calculate the dynamic power consumption. > + - static-coefficient: Coefficient, in uW/V^3, which is multiplied by > + v^3 to calculate the static power consumption. > + - ts: An array containing coefficients for the temperature scaling > + factor. This is used to scale the static power by a factor of > + tsf/1000000, where tsf = ts[3]*T^3 + ts[2]*T^2 + ts[1]*T + ts[0], > + and T = temperature in degrees. > + - thermal-zone: A string identifying the thermal zone used for the GPU This can all easily be implied by the compatible string. I'm not inclined to accept something Mali specific here. This looks *very* precise, but I'd be surprised if these values are any more than magic values (at least the dynamic coef) adjusted until the desired power/performance requirements are achieved. To put it another way, why don't we have similar values for CPUs? Rob _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 2/5] dt-bindings: gpu: add a power_model optional properties for MALI 2017-07-17 20:07 ` Rob Herring @ 2017-07-18 0:58 ` Caesar Wang 2017-07-24 16:39 ` Rob Herring 0 siblings, 1 reply; 17+ messages in thread From: Caesar Wang @ 2017-07-18 0:58 UTC (permalink / raw) To: Rob Herring Cc: Heiko Stuebner, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, rocky.hao-TNX95d0MmH7DzftRWevZcw, devicetree-u79uwXL29TY76Z2rM5mHXA, linux-kernel-u79uwXL29TY76Z2rM5mHXA, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, David Airlie, Mark Rutland Rob, 在 2017年07月18日 04:07, Rob Herring 写道: > On Mon, Jul 17, 2017 at 04:14:28PM +0800, Caesar Wang wrote: >> This patch adds the MALI's power-model to set the IPA model to be used >> for power management. > What's IPA? India Pale Ale or Intermediate Physical Address? IPA is intelligent Power Allocator. (As the ARM introduced on https://developer.arm.com/open-source/intelligent-power-allocation) > >> Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> >> --- >> >> Changes in v2: None >> >> Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 12 ++++++++++++ >> 1 file changed, 12 insertions(+) >> >> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt >> index a461e47..b616e6b 100644 >> --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt >> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt >> @@ -37,6 +37,18 @@ Optional properties: >> - operating-points-v2 : Refer to Documentation/devicetree/bindings/power/opp.txt >> for details. >> >> +- power_model : Sets power model parameters. Note that this model was designed for the Juno >> + platform, and may not be suitable for other platforms. A structure containing : >> + - compatible: Should be arm,mali-simple-power-model >> + - dynamic-coefficient: Coefficient, in pW/(Hz V^2), which is multiplied >> + by v^2*f to calculate the dynamic power consumption. >> + - static-coefficient: Coefficient, in uW/V^3, which is multiplied by >> + v^3 to calculate the static power consumption. >> + - ts: An array containing coefficients for the temperature scaling >> + factor. This is used to scale the static power by a factor of >> + tsf/1000000, where tsf = ts[3]*T^3 + ts[2]*T^2 + ts[1]*T + ts[0], >> + and T = temperature in degrees. >> + - thermal-zone: A string identifying the thermal zone used for the GPU > This can all easily be implied by the compatible string. I'm not > inclined to accept something Mali specific here. Isn't arm,mali-midgard.txt document suit for Mali specific? :-) > > This looks *very* precise, but I'd be surprised if these values are any > more than magic values (at least the dynamic coef) adjusted until the > desired power/performance requirements are achieved. To put it another > way, why don't we have similar values for CPUs? These value was calculated by running full GPU process. CPU had the similar value for dtsi. Say: arch/arm64/boot/dts/rockchip/rk3399.dtsi cpu_b0: cpu@100 { ... dynamic-power-coefficient = <436>; ... }; -Caesar > > Rob > > > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 2/5] dt-bindings: gpu: add a power_model optional properties for MALI 2017-07-18 0:58 ` Caesar Wang @ 2017-07-24 16:39 ` Rob Herring 0 siblings, 0 replies; 17+ messages in thread From: Rob Herring @ 2017-07-24 16:39 UTC (permalink / raw) To: Caesar Wang Cc: Mark Rutland, devicetree, linux-kernel, dri-devel, linux-rockchip, rocky.hao On Tue, Jul 18, 2017 at 08:58:50AM +0800, Caesar Wang wrote: > Rob, > > 在 2017年07月18日 04:07, Rob Herring 写道: > > On Mon, Jul 17, 2017 at 04:14:28PM +0800, Caesar Wang wrote: > > > This patch adds the MALI's power-model to set the IPA model to be used > > > for power management. > > What's IPA? India Pale Ale or Intermediate Physical Address? > > IPA is intelligent Power Allocator. (As the ARM introduced on > https://developer.arm.com/open-source/intelligent-power-allocation) > > > > > > Signed-off-by: Caesar Wang <wxt@rock-chips.com> > > > --- > > > > > > Changes in v2: None > > > > > > Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 12 ++++++++++++ > > > 1 file changed, 12 insertions(+) > > > > > > diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt > > > index a461e47..b616e6b 100644 > > > --- a/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt > > > +++ b/Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt > > > @@ -37,6 +37,18 @@ Optional properties: > > > - operating-points-v2 : Refer to Documentation/devicetree/bindings/power/opp.txt > > > for details. > > > +- power_model : Sets power model parameters. Note that this model was designed for the Juno > > > + platform, and may not be suitable for other platforms. A structure containing : > > > + - compatible: Should be arm,mali-simple-power-model > > > + - dynamic-coefficient: Coefficient, in pW/(Hz V^2), which is multiplied > > > + by v^2*f to calculate the dynamic power consumption. > > > + - static-coefficient: Coefficient, in uW/V^3, which is multiplied by > > > + v^3 to calculate the static power consumption. > > > + - ts: An array containing coefficients for the temperature scaling > > > + factor. This is used to scale the static power by a factor of > > > + tsf/1000000, where tsf = ts[3]*T^3 + ts[2]*T^2 + ts[1]*T + ts[0], > > > + and T = temperature in degrees. > > > + - thermal-zone: A string identifying the thermal zone used for the GPU > > This can all easily be implied by the compatible string. I'm not > > inclined to accept something Mali specific here. > > Isn't arm,mali-midgard.txt document suit for Mali specific? :-) It is, but I'm saying we shouldn't have something Mali specific here. It should be something that works across different GPUs at least. IOW, get some agreement with say adreno folks that these properties are useful and I'll be more receptive. > > > > This looks *very* precise, but I'd be surprised if these values are any > > more than magic values (at least the dynamic coef) adjusted until the > > desired power/performance requirements are achieved. To put it another > > way, why don't we have similar values for CPUs? > > These value was calculated by running full GPU process. > > CPU had the similar value for dtsi. > > Say: arch/arm64/boot/dts/rockchip/rk3399.dtsi > cpu_b0: cpu@100 { > ... > dynamic-power-coefficient = <436>; > ... > }; Indeed. While it is documented for ARM CPUs, I don't see that it is widely used as only the hi6220 dts defines it. So either support for platforms is just missing, or upstream is not really using this property. And if we are going to use this, then it needs to be documented in a common location and moved out of arm/cpus.txt. Rob _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <1500279271-15249-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* [PATCH v2 3/5] arm64: dts: rockchip: add ARM Mali GPU node for RK3399 SoCs [not found] ` <1500279271-15249-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> @ 2017-07-17 8:14 ` Caesar Wang [not found] ` <1500279271-15249-4-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 0 siblings, 1 reply; 17+ messages in thread From: Caesar Wang @ 2017-07-17 8:14 UTC (permalink / raw) To: Heiko Stuebner Cc: Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, Brian Norris, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Shawn Lin, Elaine Zhang, Will Deacon, Douglas Anderson, Kever Yang, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring, Roger Chen, Catalin Marinas, William wu, rocky.hao-TNX95d0MmH7DzftRWevZcw, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Caesar Wang Add Mali GPU device tree node for the RK3399 SoCs, with devfreq opp table. RK3399 and RK3399-OP1 SoCs have a different recommendation table with gpu opp. Also, the ARM's mali driver found on https://developer.arm.com/products/software/mali-drivers/midgard-kernel. Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> --- Changes in v2: As Heiko comments on https://patchwork.kernel.org/patch/9835939/ - interrupt-name use the lower case. - use the correct compatible "arm,mali-t860" - remove the clock name, since the mali only have one input clock. arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 33 ++++++++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 33 ++++++++++++++++++++++++ arch/arm64/boot/dts/rockchip/rk3399.dtsi | 12 +++++++++ 3 files changed, 78 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi index be7fe63..d8a120f 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi @@ -118,6 +118,35 @@ opp-microvolt = <1250000>; }; }; + + gpu_opp_table: opp-table2 { + compatible = "operating-points-v2"; + + opp00 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <800000>; + }; + opp01 { + opp-hz = /bits/ 64 <297000000>; + opp-microvolt = <800000>; + }; + opp02 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <825000>; + }; + opp03 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <850000>; + }; + opp04 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <925000>; + }; + opp05 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <1075000>; + }; + }; }; &cpu_l0 { @@ -143,3 +172,7 @@ &cpu_b1 { operating-points-v2 = <&cluster1_opp>; }; + +&gpu { + operating-points-v2 = <&gpu_opp_table>; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi index c83460d..81617bc 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi @@ -110,6 +110,35 @@ opp-microvolt = <1200000>; }; }; + + gpu_opp_table: opp-table2 { + compatible = "operating-points-v2"; + + opp00 { + opp-hz = /bits/ 64 <200000000>; + opp-microvolt = <800000>; + }; + opp01 { + opp-hz = /bits/ 64 <297000000>; + opp-microvolt = <800000>; + }; + opp02 { + opp-hz = /bits/ 64 <400000000>; + opp-microvolt = <825000>; + }; + opp03 { + opp-hz = /bits/ 64 <500000000>; + opp-microvolt = <875000>; + }; + opp04 { + opp-hz = /bits/ 64 <600000000>; + opp-microvolt = <925000>; + }; + opp05 { + opp-hz = /bits/ 64 <800000000>; + opp-microvolt = <1100000>; + }; + }; }; &cpu_l0 { @@ -135,3 +164,7 @@ &cpu_b1 { operating-points-v2 = <&cluster1_opp>; }; + +&gpu { + operating-points-v2 = <&gpu_opp_table>; +}; diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index 1cbd7a2..77d67cb 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -1443,6 +1443,18 @@ status = "disabled"; }; + gpu: gpu@ff9a0000 { + compatible = "arm,rk3399-mali", "arm,mali-t860"; + reg = <0x0 0xff9a0000 0x0 0x10000>; + interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH 0>, + <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH 0>, + <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>; + interrupt-names = "gpu", "job", "mmu"; + clocks = <&cru ACLK_GPU>; + power-domains = <&power RK3399_PD_GPU>; + status = "disabled"; + }; + pinctrl: pinctrl { compatible = "rockchip,rk3399-pinctrl"; rockchip,grf = <&grf>; -- 2.7.4 ^ permalink raw reply related [flat|nested] 17+ messages in thread
[parent not found: <1500279271-15249-4-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* Re: [PATCH v2 3/5] arm64: dts: rockchip: add ARM Mali GPU node for RK3399 SoCs [not found] ` <1500279271-15249-4-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> @ 2017-07-22 21:39 ` Heiko Stuebner 0 siblings, 0 replies; 17+ messages in thread From: Heiko Stuebner @ 2017-07-22 21:39 UTC (permalink / raw) To: Caesar Wang Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, rocky.hao-TNX95d0MmH7DzftRWevZcw, Douglas Anderson, William wu, Elaine Zhang, Kever Yang, Brian Norris, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Shawn Lin, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Will Deacon, Mark Rutland, Catalin Marinas, Roger Chen Am Montag, 17. Juli 2017, 16:14:29 CEST schrieb Caesar Wang: > Add Mali GPU device tree node for the RK3399 SoCs, with devfreq > opp table. > > RK3399 and RK3399-OP1 SoCs have a different recommendation table with > gpu opp. Also, the ARM's mali driver found on > https://developer.arm.com/products/software/mali-drivers/midgard-kernel. > > Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> > > --- > > Changes in v2: > As Heiko comments on https://patchwork.kernel.org/patch/9835939/ > - interrupt-name use the lower case. > - use the correct compatible "arm,mali-t860" > - remove the clock name, since the mali only have one input clock. > > arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 33 ++++++++++++++++++++++++ > arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 33 ++++++++++++++++++++++++ > arch/arm64/boot/dts/rockchip/rk3399.dtsi | 12 +++++++++ > 3 files changed, 78 insertions(+) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi > index be7fe63..d8a120f 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi > @@ -118,6 +118,35 @@ > opp-microvolt = <1250000>; > }; > }; > + > + gpu_opp_table: opp-table2 { > + compatible = "operating-points-v2"; > + > + opp00 { > + opp-hz = /bits/ 64 <200000000>; > + opp-microvolt = <800000>; > + }; > + opp01 { > + opp-hz = /bits/ 64 <297000000>; > + opp-microvolt = <800000>; > + }; > + opp02 { > + opp-hz = /bits/ 64 <400000000>; > + opp-microvolt = <825000>; > + }; > + opp03 { > + opp-hz = /bits/ 64 <500000000>; > + opp-microvolt = <850000>; > + }; > + opp04 { > + opp-hz = /bits/ 64 <600000000>; > + opp-microvolt = <925000>; > + }; > + opp05 { > + opp-hz = /bits/ 64 <800000000>; > + opp-microvolt = <1075000>; > + }; > + }; > }; > > &cpu_l0 { > @@ -143,3 +172,7 @@ > &cpu_b1 { > operating-points-v2 = <&cluster1_opp>; > }; > + > +&gpu { > + operating-points-v2 = <&gpu_opp_table>; > +}; > diff --git a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi > index c83460d..81617bc 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi > @@ -110,6 +110,35 @@ > opp-microvolt = <1200000>; > }; > }; > + > + gpu_opp_table: opp-table2 { > + compatible = "operating-points-v2"; > + > + opp00 { > + opp-hz = /bits/ 64 <200000000>; > + opp-microvolt = <800000>; > + }; > + opp01 { > + opp-hz = /bits/ 64 <297000000>; > + opp-microvolt = <800000>; > + }; > + opp02 { > + opp-hz = /bits/ 64 <400000000>; > + opp-microvolt = <825000>; > + }; > + opp03 { > + opp-hz = /bits/ 64 <500000000>; > + opp-microvolt = <875000>; > + }; > + opp04 { > + opp-hz = /bits/ 64 <600000000>; > + opp-microvolt = <925000>; > + }; > + opp05 { > + opp-hz = /bits/ 64 <800000000>; > + opp-microvolt = <1100000>; > + }; > + }; > }; > > &cpu_l0 { > @@ -135,3 +164,7 @@ > &cpu_b1 { > operating-points-v2 = <&cluster1_opp>; > }; > + > +&gpu { > + operating-points-v2 = <&gpu_opp_table>; > +}; > diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi > index 1cbd7a2..77d67cb 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi > @@ -1443,6 +1443,18 @@ > status = "disabled"; > }; > > + gpu: gpu@ff9a0000 { > + compatible = "arm,rk3399-mali", "arm,mali-t860"; applied for 4.14 after fixing the compatible to rockchip,rk3399-mali Heiko -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 4/5] arm64: dts: rockchip: enable the GPU for RK3399-GRU 2017-07-17 8:14 [PATCH v2 0/5] arm64: dts: rockchip: support mail and IPA thermal for rk3399 Caesar Wang ` (2 preceding siblings ...) [not found] ` <1500279271-15249-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> @ 2017-07-17 8:14 ` Caesar Wang [not found] ` <1500279271-15249-5-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-07-17 8:14 ` [PATCH v2 5/5] arm64: dts: rockchip: update the thermal zones for RK3399 SoCs Caesar Wang 2017-07-19 9:06 ` [PATCH v2 0/5] arm64: dts: rockchip: support mail and IPA thermal for rk3399 Caesar Wang 5 siblings, 1 reply; 17+ messages in thread From: Caesar Wang @ 2017-07-17 8:14 UTC (permalink / raw) To: Heiko Stuebner Cc: linux-rockchip, rocky.hao, Caesar Wang, Matthias Kaehlcke, devicetree, Brian Norris, Klaus Goger, linux-kernel, Rob Herring, Will Deacon, Mark Rutland, Catalin Marinas, linux-arm-kernel This patch enables the gpu and adds the mali-supply power for RK3399-GRU devices. Signed-off-by: Caesar Wang <wxt@rock-chips.com> --- Changes in v2: None arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi index 90259cf..d48e98b 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi @@ -595,6 +595,11 @@ status = "okay"; }; +&gpu { + mali-supply = <&ppvar_gpu>; + status = "okay"; +}; + ap_i2c_mic: &i2c1 { status = "okay"; -- 2.7.4 ^ permalink raw reply related [flat|nested] 17+ messages in thread
[parent not found: <1500279271-15249-5-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* Re: [PATCH v2 4/5] arm64: dts: rockchip: enable the GPU for RK3399-GRU [not found] ` <1500279271-15249-5-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> @ 2017-07-22 21:41 ` Heiko Stuebner 0 siblings, 0 replies; 17+ messages in thread From: Heiko Stuebner @ 2017-07-22 21:41 UTC (permalink / raw) To: Caesar Wang Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, rocky.hao-TNX95d0MmH7DzftRWevZcw, Matthias Kaehlcke, devicetree-u79uwXL29TY76Z2rM5mHXA, Brian Norris, Klaus Goger, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Will Deacon, Mark Rutland, Catalin Marinas, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Am Montag, 17. Juli 2017, 16:14:30 CEST schrieb Caesar Wang: > This patch enables the gpu and adds the mali-supply power for RK3399-GRU > devices. > > Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> applied for 4.14 Thanks Heiko -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v2 5/5] arm64: dts: rockchip: update the thermal zones for RK3399 SoCs 2017-07-17 8:14 [PATCH v2 0/5] arm64: dts: rockchip: support mail and IPA thermal for rk3399 Caesar Wang ` (3 preceding siblings ...) 2017-07-17 8:14 ` [PATCH v2 4/5] arm64: dts: rockchip: enable the GPU for RK3399-GRU Caesar Wang @ 2017-07-17 8:14 ` Caesar Wang [not found] ` <1500279271-15249-6-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-07-19 9:06 ` [PATCH v2 0/5] arm64: dts: rockchip: support mail and IPA thermal for rk3399 Caesar Wang 5 siblings, 1 reply; 17+ messages in thread From: Caesar Wang @ 2017-07-17 8:14 UTC (permalink / raw) To: Heiko Stuebner Cc: linux-rockchip, rocky.hao, Caesar Wang, Douglas Anderson, William wu, Elaine Zhang, Kever Yang, Brian Norris, linux-kernel, Shawn Lin, devicetree, Rob Herring, linux-arm-kernel, Will Deacon, Mark Rutland, Catalin Marinas, Roger Chen As RK3399 had used the Power allocator thermal governor by default, enabled this to manage thermals by dynamically allocating and limiting power to devices. Also, this patch supported the dynamic-power-coefficient/sustainable_power and GPU's power model for needed parameters with thermal IPA. The Thermal power allocator governor works optimatly with two passive trip points, for the better performance we will use the trip-point0 with 70 degree above which the governor control starts operating and trip-point1 with 85 degree is the target temperature by controlling. Signed-off-by: Caesar Wang <wxt@rock-chips.com> --- Changes in v2: - foo@ will produce warnings when used without reg property. - update the commit to explain the two passive trip points changed. arch/arm64/boot/dts/rockchip/rk3399.dtsi | 62 +++++++++++++++----------------- 1 file changed, 29 insertions(+), 33 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index 77d67cb..6d8a5eb 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi @@ -147,7 +147,7 @@ enable-method = "psci"; #cooling-cells = <2>; /* min followed by max */ clocks = <&cru ARMCLKB>; - dynamic-power-coefficient = <100>; + dynamic-power-coefficient = <436>; }; cpu_b1: cpu@101 { @@ -156,7 +156,7 @@ reg = <0x0 0x101>; enable-method = "psci"; clocks = <&cru ARMCLKB>; - dynamic-power-coefficient = <100>; + dynamic-power-coefficient = <436>; }; }; @@ -690,24 +690,25 @@ }; thermal_zones: thermal-zones { - cpu_thermal: cpu { + soc_thermal: soc-thermal { polling-delay-passive = <100>; polling-delay = <1000>; + sustainable-power = <1000>; thermal-sensors = <&tsadc 0>; trips { - cpu_alert0: cpu_alert0 { + threshold: trip-point0 { temperature = <70000>; hysteresis = <2000>; type = "passive"; }; - cpu_alert1: cpu_alert1 { - temperature = <75000>; + target: trip-point1 { + temperature = <85000>; hysteresis = <2000>; type = "passive"; }; - cpu_crit: cpu_crit { + soc_crit: soc-crit { temperature = <95000>; hysteresis = <2000>; type = "critical"; @@ -716,45 +717,31 @@ cooling-maps { map0 { - trip = <&cpu_alert0>; + trip = <&target>; cooling-device = - <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + contribution = <4096>; }; map1 { - trip = <&cpu_alert1>; + trip = <&target>; cooling-device = - <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + contribution = <1024>; + }; + map2 { + trip = <&target>; + cooling-device = + <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + contribution = <4096>; }; }; }; - gpu_thermal: gpu { + gpu_thermal: gpu-thermal { polling-delay-passive = <100>; polling-delay = <1000>; thermal-sensors = <&tsadc 1>; - - trips { - gpu_alert0: gpu_alert0 { - temperature = <75000>; - hysteresis = <2000>; - type = "passive"; - }; - gpu_crit: gpu_crit { - temperature = <95000>; - hysteresis = <2000>; - type = "critical"; - }; - }; - - cooling-maps { - map0 { - trip = <&gpu_alert0>; - cooling-device = - <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; - }; - }; }; }; @@ -1451,8 +1438,17 @@ <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>; interrupt-names = "gpu", "job", "mmu"; clocks = <&cru ACLK_GPU>; + #cooling-cells = <2>; power-domains = <&power RK3399_PD_GPU>; status = "disabled"; + + gpu_power_model: power_model { + compatible = "arm,mali-simple-power-model"; + static-coefficient = <1079403>; + dynamic-coefficient = <977>; + ts = <32000 4700 (-80) 2>; + thermal-zone = "gpu-thermal"; + }; }; pinctrl: pinctrl { -- 2.7.4 ^ permalink raw reply related [flat|nested] 17+ messages in thread
[parent not found: <1500279271-15249-6-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* Re: [PATCH v2 5/5] arm64: dts: rockchip: update the thermal zones for RK3399 SoCs [not found] ` <1500279271-15249-6-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> @ 2017-07-22 21:48 ` Heiko Stuebner 2017-07-25 9:15 ` Caesar Wang 0 siblings, 1 reply; 17+ messages in thread From: Heiko Stuebner @ 2017-07-22 21:48 UTC (permalink / raw) To: Caesar Wang Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, rocky.hao-TNX95d0MmH7DzftRWevZcw, Douglas Anderson, William wu, Elaine Zhang, Kever Yang, Brian Norris, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Shawn Lin, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Will Deacon, Mark Rutland, Catalin Marinas, Roger Chen Hi Caesar, Am Montag, 17. Juli 2017, 16:14:31 CEST schrieb Caesar Wang: > As RK3399 had used the Power allocator thermal governor by default, > enabled this to manage thermals by dynamically allocating and limiting > power to devices. > > Also, this patch supported the dynamic-power-coefficient/sustainable_power > and GPU's power model for needed parameters with thermal IPA. > > The Thermal power allocator governor works optimatly with two passive trip > points, for the better performance we will use the trip-point0 with 70 > degree above which the governor control starts operating and trip-point1 > with 85 degree is the target temperature by controlling. > > Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> > > --- > > Changes in v2: > - foo@ will produce warnings when used without reg property. > - update the commit to explain the two passive trip points changed. > > arch/arm64/boot/dts/rockchip/rk3399.dtsi | 62 +++++++++++++++----------------- > 1 file changed, 29 insertions(+), 33 deletions(-) > > diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi > index 77d67cb..6d8a5eb 100644 > --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi > +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi > @@ -147,7 +147,7 @@ > enable-method = "psci"; > #cooling-cells = <2>; /* min followed by max */ > clocks = <&cru ARMCLKB>; > - dynamic-power-coefficient = <100>; > + dynamic-power-coefficient = <436>; > }; > > cpu_b1: cpu@101 { > @@ -156,7 +156,7 @@ > reg = <0x0 0x101>; > enable-method = "psci"; > clocks = <&cru ARMCLKB>; > - dynamic-power-coefficient = <100>; > + dynamic-power-coefficient = <436>; Adjusting the coefficients should be a separate patch and the commit message should explain how they were calculated and why they are the exacter ones over the old values. > }; > }; > > @@ -690,24 +690,25 @@ > }; > > thermal_zones: thermal-zones { > - cpu_thermal: cpu { > + soc_thermal: soc-thermal { > polling-delay-passive = <100>; > polling-delay = <1000>; > + sustainable-power = <1000>; > > thermal-sensors = <&tsadc 0>; > > trips { > - cpu_alert0: cpu_alert0 { > + threshold: trip-point0 { > temperature = <70000>; > hysteresis = <2000>; > type = "passive"; > }; > - cpu_alert1: cpu_alert1 { > - temperature = <75000>; > + target: trip-point1 { > + temperature = <85000>; > hysteresis = <2000>; > type = "passive"; > }; > - cpu_crit: cpu_crit { > + soc_crit: soc-crit { > temperature = <95000>; > hysteresis = <2000>; > type = "critical"; > @@ -716,45 +717,31 @@ > > cooling-maps { > map0 { > - trip = <&cpu_alert0>; > + trip = <&target>; still both maps use &target as trip point. Is that intentional and if so, why is the &threshold trip point never referenced? > cooling-device = > - <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + contribution = <4096>; > }; > map1 { > - trip = <&cpu_alert1>; > + trip = <&target>; > cooling-device = > - <&cpu_l0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, > <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + contribution = <1024>; > + }; > + map2 { > + trip = <&target>; > + cooling-device = > + <&gpu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > + contribution = <4096>; > }; > }; > }; > > - gpu_thermal: gpu { > + gpu_thermal: gpu-thermal { > polling-delay-passive = <100>; > polling-delay = <1000>; > > thermal-sensors = <&tsadc 1>; > - > - trips { > - gpu_alert0: gpu_alert0 { > - temperature = <75000>; > - hysteresis = <2000>; > - type = "passive"; > - }; > - gpu_crit: gpu_crit { > - temperature = <95000>; > - hysteresis = <2000>; > - type = "critical"; > - }; > - }; > - > - cooling-maps { > - map0 { > - trip = <&gpu_alert0>; > - cooling-device = > - <&cpu_b0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; > - }; > - }; > }; > }; > > @@ -1451,8 +1438,17 @@ > <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>; > interrupt-names = "gpu", "job", "mmu"; > clocks = <&cru ACLK_GPU>; > + #cooling-cells = <2>; > power-domains = <&power RK3399_PD_GPU>; > status = "disabled"; > + > + gpu_power_model: power_model { > + compatible = "arm,mali-simple-power-model"; > + static-coefficient = <1079403>; > + dynamic-coefficient = <977>; > + ts = <32000 4700 (-80) 2>; > + thermal-zone = "gpu-thermal"; > + }; You might want to have the gpu thermal work without the power-model-thingy for now, so most likely just drop that gpu-related change for now. Heiko -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 5/5] arm64: dts: rockchip: update the thermal zones for RK3399 SoCs 2017-07-22 21:48 ` Heiko Stuebner @ 2017-07-25 9:15 ` Caesar Wang 0 siblings, 0 replies; 17+ messages in thread From: Caesar Wang @ 2017-07-25 9:15 UTC (permalink / raw) To: Heiko Stuebner Cc: Caesar Wang, Mark Rutland, devicetree-u79uwXL29TY76Z2rM5mHXA, Brian Norris, linux-kernel-u79uwXL29TY76Z2rM5mHXA, Shawn Lin, Elaine Zhang, Will Deacon, Kever Yang, Douglas Anderson, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Rob Herring, Roger Chen, Catalin Marinas, William wu, rocky.hao-TNX95d0MmH7DzftRWevZcw, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Hi Heiko, Thanks your comments. 在 2017年07月23日 05:48, Heiko Stuebner 写道: > Hi Caesar, > > Am Montag, 17. Juli 2017, 16:14:31 CEST schrieb Caesar Wang: >> As RK3399 had used the Power allocator thermal governor by default, >> enabled this to manage thermals by dynamically allocating and limiting >> power to devices. >> >> Also, this patch supported the dynamic-power-coefficient/sustainable_power >> and GPU's power model for needed parameters with thermal IPA. >> >> The Thermal power allocator governor works optimatly with two passive trip >> points, for the better performance we will use the trip-point0 with 70 >> degree above which the governor control starts operating and trip-point1 >> with 85 degree is the target temperature by controlling. >> >> Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> >> >> --- >> >> Changes in v2: >> - foo@ will produce warnings when used without reg property. >> - update the commit to explain the two passive trip points changed. >> >> arch/arm64/boot/dts/rockchip/rk3399.dtsi | 62 +++++++++++++++----------------- >> 1 file changed, 29 insertions(+), 33 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi >> index 77d67cb..6d8a5eb 100644 >> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi >> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi >> @@ -147,7 +147,7 @@ >> enable-method = "psci"; >> #cooling-cells = <2>; /* min followed by max */ >> clocks = <&cru ARMCLKB>; >> - dynamic-power-coefficient = <100>; >> + dynamic-power-coefficient = <436>; >> }; >> >> cpu_b1: cpu@101 { >> @@ -156,7 +156,7 @@ >> reg = <0x0 0x101>; >> enable-method = "psci"; >> clocks = <&cru ARMCLKB>; >> - dynamic-power-coefficient = <100>; >> + dynamic-power-coefficient = <436>; > Adjusting the coefficients should be a separate patch and the > commit message should explain how they were calculated and > why they are the exacter ones over the old values. Okay, i don't know why the dynamic-power-coefficient is 100 for b-cluster before.:-) > > >> }; >> }; >> >> @@ -690,24 +690,25 @@ >> }; >> >> thermal_zones: thermal-zones { >> - cpu_thermal: cpu { >> + soc_thermal: soc-thermal { >> polling-delay-passive = <100>; >> polling-delay = <1000>; >> + sustainable-power = <1000>; >> >> thermal-sensors = <&tsadc 0>; >> >> trips { >> - cpu_alert0: cpu_alert0 { >> + threshold: trip-point0 { >> temperature = <70000>; >> hysteresis = <2000>; >> type = "passive"; >> }; >> - cpu_alert1: cpu_alert1 { >> - temperature = <75000>; >> + target: trip-point1 { >> + temperature = <85000>; >> hysteresis = <2000>; >> type = "passive"; >> }; >> - cpu_crit: cpu_crit { >> + soc_crit: soc-crit { >> temperature = <95000>; >> hysteresis = <2000>; >> type = "critical"; >> @@ -716,45 +717,31 @@ >> >> cooling-maps { >> map0 { >> - trip = <&cpu_alert0>; >> + trip = <&target>; > still both maps use &target as trip point. Is that intentional > and if so, why is the &threshold trip point never referenced? For the power allocator governor, the &threshold trip point just control starts operating, not need for map. For other governor (e.g: step_wise) will need the first trip point. Looks like we have to think about how to support them. > }; > }; > > @@ -1451,8 +1438,17 @@ > <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH 0>; > interrupt-names = "gpu", "job", "mmu"; > clocks = <&cru ACLK_GPU>; > + #cooling-cells = <2>; > power-domains = <&power RK3399_PD_GPU>; > status = "disabled"; > + > + gpu_power_model: power_model { > + compatible = "arm,mali-simple-power-model"; > + static-coefficient = <1079403>; > + dynamic-coefficient = <977>; > + ts = <32000 4700 (-80) 2>; > + thermal-zone = "gpu-thermal"; > + }; > You might want to have the gpu thermal work without the > power-model-thingy for now, so most likely just drop that > gpu-related change for now. Well, I guess the mediatek/hisilicon/rockchip ARM SoCs should support the gpu's power mode with private kernel, not in the upstream kernel. -Caesar > > > Heiko > > _______________________________________________ > Linux-rockchip mailing list > Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org > http://lists.infradead.org/mailman/listinfo/linux-rockchip -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH v2 0/5] arm64: dts: rockchip: support mail and IPA thermal for rk3399 2017-07-17 8:14 [PATCH v2 0/5] arm64: dts: rockchip: support mail and IPA thermal for rk3399 Caesar Wang ` (4 preceding siblings ...) 2017-07-17 8:14 ` [PATCH v2 5/5] arm64: dts: rockchip: update the thermal zones for RK3399 SoCs Caesar Wang @ 2017-07-19 9:06 ` Caesar Wang [not found] ` <65759378-509b-3287-fd78-02361e89429b-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 5 siblings, 1 reply; 17+ messages in thread From: Caesar Wang @ 2017-07-19 9:06 UTC (permalink / raw) To: Caesar Wang, Heiko Stuebner, Rob Herring, rocky.hao Cc: Mark Rutland, devicetree, Elaine Zhang, Catalin Marinas, Shawn Lin, Brian Norris, Will Deacon, Douglas Anderson, dri-devel, Kever Yang, linux-rockchip, Matthias Kaehlcke, Klaus Goger, linux-arm-kernel, Roger Chen, William wu, linux-kernel Hi Rob & Heiko, Do we have the chance to merge these patches? I'm try to bring up the display and run webgl for testing with my github on https://github.com/Caesar-github/rockchip/commits/gru/next-stable-chromeos I believe the Rocky@RK will post patches to support the other SoCs after. -Caesar 在 2017年07月17日 16:14, Caesar Wang 写道: > This series patches supported the mail in devicetree and used the > thermal IPA by default. > > Verified with kernel is based on Linus's master branch and Heiko's > v4.14-armsoc-tmp/dts64 branch. ( The Linux version 4.12.0 for now). > > The most rockchip SoCs will be supported with IPA mode for thermal > in later. > > --- > > History version: > 1. The first version found on > https://www.spinics.net/lists/arm-kernel/msg593118.html > > Tested on Kevin board with bringing up ChromeOS. > OS VERSION: > CHROMEOS_RELEASE_DESCRIPTION=9693.1.0 (Official Build) dev-channel kevin test > > BIOS VERSION: > Google_Kevin.8785.211.2017_06_20_1043 > > EC VERSION: > Build info: kevin_v1.10.217-24514961d 2017-07-03 07:46:36 wxt@nb > > With the ARM's lastest mali driver TX011-SW-99002-r18p0-01rel0 on > https://developer.arm.com/products/software/mali-drivers/midgard-kernel > > From the bootup log: > localhost devfreq0 # dmesg |grep mali > [ 0.933334] mali ff9a0000.gpu: GPU identified as 0x0860 r2p0 status 0 > [ 0.940830] mali ff9a0000.gpu: Protected mode not available > [ 0.947334] mali ff9a0000.gpu: Using configured power model mali-simple-power-model, and fallback mali-simple-power-model > [ 0.960083] mali ff9a0000.gpu: Probed as mali0 > > localhost devfreq0 # pwd > /sys/devices/platform/ff9a0000.gpu/devfreq/devfreq0 > localhost devfreq0 # ls > available_frequencies device min_freq subsystem uevent > available_governors governor polling_interval target_freq userspace > cur_freq max_freq power trans_stat > > localhost ff9a0000.gpu # ls > core_availability_policy gpuinfo modalias soft_job_timeout > core_mask js_scheduling_period of_node subsystem > devfreq js_timeouts pm_poweroff uevent > driver mem_pool_max_size power > driver_override mem_pool_size power_policy > dvfs_period misc reset_timeout > --- > > And for thermal with IPA. > Try to run 'md5sum /dev/zero &' and octane/benchmark scripts to go up the temperature. > From the scripts to have a look at the actual control. > " > while true; do grep "" /sys/class/thermal/thermal_zone[0-1]/temp /sys/devices/system/cpu/cpu[0-5]/cpufreq/scaling_cur_freq /sys/devices/platform/ff9a0000.gpu/devfreq/devfreq0/cur_freq;date;sleep .5; done & > " > > -Caesar > > > Changes in v2: > As Heiko comments on https://patchwork.kernel.org/patch/9835939/ > - interrupt-name use the lower case. > - use the correct compatible "arm,mali-t860" > - remove the clock name, since the mali only have one input clock. > - foo@ will produce warnings when used without reg property. > - update the commit to explain the two passive trip points changed. > > Caesar Wang (5): > dt-bindings: gpu: add the RK3399 mali for rockchip specifics > dt-bindings: gpu: add a power_model optional properties for MALI > arm64: dts: rockchip: add ARM Mali GPU node for RK3399 SoCs > arm64: dts: rockchip: enable the GPU for RK3399-GRU > arm64: dts: rockchip: update the thermal zones for RK3399 SoCs > > .../devicetree/bindings/gpu/arm,mali-midgard.txt | 13 ++++ > arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 5 ++ > arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 33 ++++++++++ > arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 33 ++++++++++ > arch/arm64/boot/dts/rockchip/rk3399.dtsi | 74 ++++++++++++---------- > 5 files changed, 125 insertions(+), 33 deletions(-) > _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <65759378-509b-3287-fd78-02361e89429b-TNX95d0MmH7DzftRWevZcw@public.gmane.org>]
* Re: [PATCH v2 0/5] arm64: dts: rockchip: support mail and IPA thermal for rk3399 [not found] ` <65759378-509b-3287-fd78-02361e89429b-TNX95d0MmH7DzftRWevZcw@public.gmane.org> @ 2017-07-19 21:06 ` Heiko Stuebner 0 siblings, 0 replies; 17+ messages in thread From: Heiko Stuebner @ 2017-07-19 21:06 UTC (permalink / raw) To: Caesar Wang Cc: Rob Herring, rocky.hao-TNX95d0MmH7DzftRWevZcw, Douglas Anderson, devicetree-u79uwXL29TY76Z2rM5mHXA, Brian Norris, David Airlie, Catalin Marinas, Shawn Lin, Elaine Zhang, Will Deacon, Kever Yang, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, linux-kernel-u79uwXL29TY76Z2rM5mHXA, linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Matthias Kaehlcke, Klaus Goger, Mark Rutland, Roger Chen, William wu, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r Am Mittwoch, 19. Juli 2017, 17:06:59 CEST schrieb Caesar Wang: > Hi Rob & Heiko, > > Do we have the chance to merge these patches? >From the mali-thermal thingy, it doesn't look like Rob likes that IPA stuff. So I'll most likely pick the other patches that rely on approved bindings after I return from my vacation and leave the thermal issue until it can be resolved. Heiko > > I'm try to bring up the display and run webgl for testing with my github on > https://github.com/Caesar-github/rockchip/commits/gru/next-stable-chromeos > > I believe the Rocky@RK will post patches to support the other SoCs after. > > -Caesar > > 在 2017年07月17日 16:14, Caesar Wang 写道: > > This series patches supported the mail in devicetree and used the > > thermal IPA by default. > > > > Verified with kernel is based on Linus's master branch and Heiko's > > v4.14-armsoc-tmp/dts64 branch. ( The Linux version 4.12.0 for now). > > > > The most rockchip SoCs will be supported with IPA mode for thermal > > in later. > > > > --- > > > > History version: > > 1. The first version found on > > https://www.spinics.net/lists/arm-kernel/msg593118.html > > > > Tested on Kevin board with bringing up ChromeOS. > > OS VERSION: > > CHROMEOS_RELEASE_DESCRIPTION=9693.1.0 (Official Build) dev-channel kevin test > > > > BIOS VERSION: > > Google_Kevin.8785.211.2017_06_20_1043 > > > > EC VERSION: > > Build info: kevin_v1.10.217-24514961d 2017-07-03 07:46:36 wxt@nb > > > > With the ARM's lastest mali driver TX011-SW-99002-r18p0-01rel0 on > > https://developer.arm.com/products/software/mali-drivers/midgard-kernel > > > > From the bootup log: > > localhost devfreq0 # dmesg |grep mali > > [ 0.933334] mali ff9a0000.gpu: GPU identified as 0x0860 r2p0 status 0 > > [ 0.940830] mali ff9a0000.gpu: Protected mode not available > > [ 0.947334] mali ff9a0000.gpu: Using configured power model mali-simple-power-model, and fallback mali-simple-power-model > > [ 0.960083] mali ff9a0000.gpu: Probed as mali0 > > > > localhost devfreq0 # pwd > > /sys/devices/platform/ff9a0000.gpu/devfreq/devfreq0 > > localhost devfreq0 # ls > > available_frequencies device min_freq subsystem uevent > > available_governors governor polling_interval target_freq userspace > > cur_freq max_freq power trans_stat > > > > localhost ff9a0000.gpu # ls > > core_availability_policy gpuinfo modalias soft_job_timeout > > core_mask js_scheduling_period of_node subsystem > > devfreq js_timeouts pm_poweroff uevent > > driver mem_pool_max_size power > > driver_override mem_pool_size power_policy > > dvfs_period misc reset_timeout > > --- > > > > And for thermal with IPA. > > Try to run 'md5sum /dev/zero &' and octane/benchmark scripts to go up the temperature. > > From the scripts to have a look at the actual control. > > " > > while true; do grep "" /sys/class/thermal/thermal_zone[0-1]/temp /sys/devices/system/cpu/cpu[0-5]/cpufreq/scaling_cur_freq /sys/devices/platform/ff9a0000.gpu/devfreq/devfreq0/cur_freq;date;sleep .5; done & > > " > > > > -Caesar > > > > > > Changes in v2: > > As Heiko comments on https://patchwork.kernel.org/patch/9835939/ > > - interrupt-name use the lower case. > > - use the correct compatible "arm,mali-t860" > > - remove the clock name, since the mali only have one input clock. > > - foo@ will produce warnings when used without reg property. > > - update the commit to explain the two passive trip points changed. > > > > Caesar Wang (5): > > dt-bindings: gpu: add the RK3399 mali for rockchip specifics > > dt-bindings: gpu: add a power_model optional properties for MALI > > arm64: dts: rockchip: add ARM Mali GPU node for RK3399 SoCs > > arm64: dts: rockchip: enable the GPU for RK3399-GRU > > arm64: dts: rockchip: update the thermal zones for RK3399 SoCs > > > > .../devicetree/bindings/gpu/arm,mali-midgard.txt | 13 ++++ > > arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 5 ++ > > arch/arm64/boot/dts/rockchip/rk3399-op1-opp.dtsi | 33 ++++++++++ > > arch/arm64/boot/dts/rockchip/rk3399-opp.dtsi | 33 ++++++++++ > > arch/arm64/boot/dts/rockchip/rk3399.dtsi | 74 ++++++++++++---------- > > 5 files changed, 125 insertions(+), 33 deletions(-) > > > > > > -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2017-07-25 9:15 UTC | newest] Thread overview: 17+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2017-07-17 8:14 [PATCH v2 0/5] arm64: dts: rockchip: support mail and IPA thermal for rk3399 Caesar Wang 2017-07-17 8:14 ` [PATCH v2 1/5] dt-bindings: gpu: add the RK3399 mali for rockchip specifics Caesar Wang [not found] ` <1500279271-15249-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-07-17 19:51 ` Rob Herring 2017-07-22 21:38 ` Heiko Stuebner 2017-07-17 8:14 ` [PATCH v2 2/5] dt-bindings: gpu: add a power_model optional properties for MALI Caesar Wang 2017-07-17 20:07 ` Rob Herring 2017-07-18 0:58 ` Caesar Wang 2017-07-24 16:39 ` Rob Herring [not found] ` <1500279271-15249-1-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-07-17 8:14 ` [PATCH v2 3/5] arm64: dts: rockchip: add ARM Mali GPU node for RK3399 SoCs Caesar Wang [not found] ` <1500279271-15249-4-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-07-22 21:39 ` Heiko Stuebner 2017-07-17 8:14 ` [PATCH v2 4/5] arm64: dts: rockchip: enable the GPU for RK3399-GRU Caesar Wang [not found] ` <1500279271-15249-5-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-07-22 21:41 ` Heiko Stuebner 2017-07-17 8:14 ` [PATCH v2 5/5] arm64: dts: rockchip: update the thermal zones for RK3399 SoCs Caesar Wang [not found] ` <1500279271-15249-6-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-07-22 21:48 ` Heiko Stuebner 2017-07-25 9:15 ` Caesar Wang 2017-07-19 9:06 ` [PATCH v2 0/5] arm64: dts: rockchip: support mail and IPA thermal for rk3399 Caesar Wang [not found] ` <65759378-509b-3287-fd78-02361e89429b-TNX95d0MmH7DzftRWevZcw@public.gmane.org> 2017-07-19 21:06 ` Heiko Stuebner
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).