* [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model. @ 2015-12-16 13:29 Dawei Chien 2015-12-16 13:29 ` [PATCH v6 1/3] " Dawei Chien ` (3 more replies) 0 siblings, 4 replies; 12+ messages in thread From: Dawei Chien @ 2015-12-16 13:29 UTC (permalink / raw) To: linux-arm-kernel Use Intelligent Power Allocation (IPA) technical to add dynamic power model for binding CPU thermal zone. The power allocator governor allocates power budget to control CPU temperature. Power Allocator governor is able to keep SOC temperature within a defined temperature range to avoid SOC overheat and keep it's performance. mt8173-cpufreq.c need to register its' own power model with power allocator thermal governor, so that power allocator governor can allocates suitable power budget to control CPU temperature. Binding document is refer to this patchset https://lkml.org/lkml/2015/11/30/239 Change since V5: 1. Remove thermal sensor ID from phandles Change since V4: 1. Remove unnecessary error-checking for mt8173-cpufreq.c 2. Initializing variable capacitance with 0 Change since V3: 1. Remove static power model 2. Split V3's device tree in two for thermal zones and dynamic power models respectively Change since V2: 1. Move dynamic/static power model in device tree Change since V1: 1. Include mt8171.h and sort header file for mt8173.dtsi Dawei Chien (3): thermal: mediatek: Add cpu dynamic power cooling model. arm64: dts: mt8173: Add thermal zone node. arm64: dts: mt8173: Add dynamic power node. arch/arm64/boot/dts/mediatek/mt8173.dtsi | 47 ++++++++++++++++++++++++++++++ drivers/cpufreq/mt8173-cpufreq.c | 12 ++++++-- 2 files changed, 57 insertions(+), 2 deletions(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v6 1/3] thermal: mediatek: Add cpu dynamic power cooling model. 2015-12-16 13:29 [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model Dawei Chien @ 2015-12-16 13:29 ` Dawei Chien 2015-12-16 13:29 ` [PATCH v6 2/3] arm64: dts: mt8173: Add thermal zone node Dawei Chien ` (2 subsequent siblings) 3 siblings, 0 replies; 12+ messages in thread From: Dawei Chien @ 2015-12-16 13:29 UTC (permalink / raw) To: linux-arm-kernel MT8173 cpufreq driver select of_cpufreq_power_cooling_register registering cooling devices with dynamic power coefficient. Signed-off-by: Dawei Chien <dawei.chien@mediatek.com> --- This patch is base on patchset: https://lkml.org/lkml/2015/11/17/251 --- drivers/cpufreq/mt8173-cpufreq.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/cpufreq/mt8173-cpufreq.c b/drivers/cpufreq/mt8173-cpufreq.c index 83001dc..d00bab5 100644 --- a/drivers/cpufreq/mt8173-cpufreq.c +++ b/drivers/cpufreq/mt8173-cpufreq.c @@ -263,17 +263,24 @@ static int mtk_cpufreq_set_target(struct cpufreq_policy *policy, return 0; } +#define DYNAMIC_POWER "dynamic-power-coefficient" + static void mtk_cpufreq_ready(struct cpufreq_policy *policy) { struct mtk_cpu_dvfs_info *info = policy->driver_data; struct device_node *np = of_node_get(info->cpu_dev->of_node); + u32 capacitance = 0; if (WARN_ON(!np)) return; if (of_find_property(np, "#cooling-cells", NULL)) { - info->cdev = of_cpufreq_cooling_register(np, - policy->related_cpus); + of_property_read_u32(np, DYNAMIC_POWER, &capacitance); + + info->cdev = of_cpufreq_power_cooling_register(np, + policy->related_cpus, + capacitance, + NULL); if (IS_ERR(info->cdev)) { dev_err(info->cpu_dev, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v6 2/3] arm64: dts: mt8173: Add thermal zone node. 2015-12-16 13:29 [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model Dawei Chien 2015-12-16 13:29 ` [PATCH v6 1/3] " Dawei Chien @ 2015-12-16 13:29 ` Dawei Chien 2015-12-16 13:29 ` [PATCH v6 3/3] arm64: dts: mt8173: Add dynamic power node Dawei Chien 2015-12-17 1:52 ` [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model Viresh Kumar 3 siblings, 0 replies; 12+ messages in thread From: Dawei Chien @ 2015-12-16 13:29 UTC (permalink / raw) To: linux-arm-kernel This adds thermal zone node to Mediatek MT8173 dtsi file. Signed-off-by: Dawei Chien <dawei.chien@mediatek.com> --- This patch is base on patchset: https://lkml.org/lkml/2015/11/30/239 --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 43 ++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi index fda805d..c962d94 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi @@ -188,6 +188,49 @@ clock-output-names = "cpum_ck"; }; + thermal-zones { + cpu_thermal: cpu_thermal { + polling-delay-passive = <1000>; /* milliseconds */ + polling-delay = <1000>; /* milliseconds */ + + thermal-sensors = <&thermal>; + sustainable-power = <1500>; /* milliwatts */ + + trips { + threshold: trip-point at 0 { + temperature = <68000>; + hysteresis = <2000>; + type = "passive"; + }; + + target: trip-point at 1 { + temperature = <85000>; + hysteresis = <2000>; + type = "passive"; + }; + + cpu_crit: cpu_crit at 0 { + temperature = <115000>; + hysteresis = <2000>; + type = "critical"; + }; + }; + + cooling-maps { + map at 0 { + trip = <&target>; + cooling-device = <&cpu0 0 0>; + contribution = <1024>; + }; + map at 1 { + trip = <&target>; + cooling-device = <&cpu2 0 0>; + contribution = <2048>; + }; + }; + }; + }; + timer { compatible = "arm,armv8-timer"; interrupt-parent = <&gic>; -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v6 3/3] arm64: dts: mt8173: Add dynamic power node. 2015-12-16 13:29 [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model Dawei Chien 2015-12-16 13:29 ` [PATCH v6 1/3] " Dawei Chien 2015-12-16 13:29 ` [PATCH v6 2/3] arm64: dts: mt8173: Add thermal zone node Dawei Chien @ 2015-12-16 13:29 ` Dawei Chien 2015-12-17 1:52 ` [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model Viresh Kumar 3 siblings, 0 replies; 12+ messages in thread From: Dawei Chien @ 2015-12-16 13:29 UTC (permalink / raw) To: linux-arm-kernel This device node is for calculating dynamic power in mW. Since mt8173 has two clusters, there are two dynamic power coefficient as well. Signed-off-by: Dawei Chien <dawei.chien@mediatek.com> --- This patch is base on patchset: https://lkml.org/lkml/2015/11/17/251 --- arch/arm64/boot/dts/mediatek/mt8173.dtsi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8173.dtsi b/arch/arm64/boot/dts/mediatek/mt8173.dtsi index c962d94..b6f4ea5 100644 --- a/arch/arm64/boot/dts/mediatek/mt8173.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8173.dtsi @@ -71,6 +71,7 @@ #cooling-cells = <2>; #cooling-min-level = <0>; #cooling-max-level = <7>; + dynamic-power-coefficient = <263>; }; cpu1: cpu at 1 { @@ -95,6 +96,7 @@ #cooling-cells = <2>; #cooling-min-level = <0>; #cooling-max-level = <7>; + dynamic-power-coefficient = <263>; }; cpu2: cpu at 100 { @@ -119,6 +121,7 @@ #cooling-cells = <2>; #cooling-min-level = <0>; #cooling-max-level = <7>; + dynamic-power-coefficient = <530>; }; cpu3: cpu at 101 { @@ -143,6 +146,7 @@ #cooling-cells = <2>; #cooling-min-level = <0>; #cooling-max-level = <7>; + dynamic-power-coefficient = <530>; }; idle-states { -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model. 2015-12-16 13:29 [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model Dawei Chien ` (2 preceding siblings ...) 2015-12-16 13:29 ` [PATCH v6 3/3] arm64: dts: mt8173: Add dynamic power node Dawei Chien @ 2015-12-17 1:52 ` Viresh Kumar 2016-03-15 4:53 ` dawei chien 3 siblings, 1 reply; 12+ messages in thread From: Viresh Kumar @ 2015-12-17 1:52 UTC (permalink / raw) To: linux-arm-kernel On 16-12-15, 21:29, Dawei Chien wrote: > Use Intelligent Power Allocation (IPA) technical to add dynamic power model > for binding CPU thermal zone. The power allocator governor allocates power > budget to control CPU temperature. > > Power Allocator governor is able to keep SOC temperature within a defined > temperature range to avoid SOC overheat and keep it's performance. > mt8173-cpufreq.c need to register its' own power model with power allocator > thermal governor, so that power allocator governor can allocates suitable > power budget to control CPU temperature. > > Binding document is refer to this patchset > https://lkml.org/lkml/2015/11/30/239 > > Change since V5: > 1. Remove thermal sensor ID from phandles Though you should have included this in the new version, but still Acked-by: Viresh Kumar <viresh.kumar@linaro.org> -- viresh ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model. 2015-12-17 1:52 ` [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model Viresh Kumar @ 2016-03-15 4:53 ` dawei chien 2016-03-15 6:17 ` Viresh Kumar 0 siblings, 1 reply; 12+ messages in thread From: dawei chien @ 2016-03-15 4:53 UTC (permalink / raw) To: linux-arm-kernel On Thu, 2015-12-17 at 09:52 +0800, Viresh Kumar wrote: > On 16-12-15, 21:29, Dawei Chien wrote: > > Use Intelligent Power Allocation (IPA) technical to add dynamic power model > > for binding CPU thermal zone. The power allocator governor allocates power > > budget to control CPU temperature. > > > > Power Allocator governor is able to keep SOC temperature within a defined > > temperature range to avoid SOC overheat and keep it's performance. > > mt8173-cpufreq.c need to register its' own power model with power allocator > > thermal governor, so that power allocator governor can allocates suitable > > power budget to control CPU temperature. > > > > Binding document is refer to this patchset > > https://lkml.org/lkml/2015/11/30/239 > > > > Change since V5: > > 1. Remove thermal sensor ID from phandles > > Though you should have included this in the new version, but still > > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> > > -- > viresh Hi Viresh, Would you please pull this patch to your tree since following patch already pulled in, thank you. https://lkml.org/lkml/2015/11/30/239 BR, Dawei ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model. 2016-03-15 4:53 ` dawei chien @ 2016-03-15 6:17 ` Viresh Kumar 2016-03-22 5:13 ` dawei chien 0 siblings, 1 reply; 12+ messages in thread From: Viresh Kumar @ 2016-03-15 6:17 UTC (permalink / raw) To: linux-arm-kernel On 15-03-16, 12:53, dawei chien wrote: > On Thu, 2015-12-17 at 09:52 +0800, Viresh Kumar wrote: > > On 16-12-15, 21:29, Dawei Chien wrote: > > > Use Intelligent Power Allocation (IPA) technical to add dynamic power model > > > for binding CPU thermal zone. The power allocator governor allocates power > > > budget to control CPU temperature. > > > > > > Power Allocator governor is able to keep SOC temperature within a defined > > > temperature range to avoid SOC overheat and keep it's performance. > > > mt8173-cpufreq.c need to register its' own power model with power allocator > > > thermal governor, so that power allocator governor can allocates suitable > > > power budget to control CPU temperature. > > > > > > Binding document is refer to this patchset > > > https://lkml.org/lkml/2015/11/30/239 > > > > > > Change since V5: > > > 1. Remove thermal sensor ID from phandles > > > > Though you should have included this in the new version, but still > > > > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> > > > > -- > > viresh > > Hi Viresh, > Would you please pull this patch to your tree since following patch > already pulled in, thank you. > > https://lkml.org/lkml/2015/11/30/239 Its Rafael, who is going to apply this one. Can you please resend it as he may not have it in patchworks? -- viresh ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model. 2016-03-15 6:17 ` Viresh Kumar @ 2016-03-22 5:13 ` dawei chien 2016-04-12 2:32 ` dawei chien 0 siblings, 1 reply; 12+ messages in thread From: dawei chien @ 2016-03-22 5:13 UTC (permalink / raw) To: linux-arm-kernel On Tue, 2016-03-15 at 13:17 +0700, Viresh Kumar wrote: > On 15-03-16, 12:53, dawei chien wrote: > > On Thu, 2015-12-17 at 09:52 +0800, Viresh Kumar wrote: > > > On 16-12-15, 21:29, Dawei Chien wrote: > > > > Use Intelligent Power Allocation (IPA) technical to add dynamic power model > > > > for binding CPU thermal zone. The power allocator governor allocates power > > > > budget to control CPU temperature. > > > > > > > > Power Allocator governor is able to keep SOC temperature within a defined > > > > temperature range to avoid SOC overheat and keep it's performance. > > > > mt8173-cpufreq.c need to register its' own power model with power allocator > > > > thermal governor, so that power allocator governor can allocates suitable > > > > power budget to control CPU temperature. > > > > > > > > Binding document is refer to this patchset > > > > https://lkml.org/lkml/2015/11/30/239 > > > > > > > > Change since V5: > > > > 1. Remove thermal sensor ID from phandles > > > > > > Though you should have included this in the new version, but still > > > > > > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> > > > > > > -- > > > viresh > > > > Hi Viresh, > > Would you please pull this patch to your tree since following patch > > already pulled in, thank you. > > > > https://lkml.org/lkml/2015/11/30/239 > > Its Rafael, who is going to apply this one. > > Can you please resend it as he may not have it in patchworks? > Hi Rafael, Would you merge this patch to your tee, thank you. BR, Dawei ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model. 2016-03-22 5:13 ` dawei chien @ 2016-04-12 2:32 ` dawei chien 2016-04-12 5:11 ` Viresh Kumar 0 siblings, 1 reply; 12+ messages in thread From: dawei chien @ 2016-04-12 2:32 UTC (permalink / raw) To: linux-arm-kernel On Tue, 2016-03-22 at 13:13 +0800, dawei chien wrote: > On Tue, 2016-03-15 at 13:17 +0700, Viresh Kumar wrote: > > On 15-03-16, 12:53, dawei chien wrote: > > > On Thu, 2015-12-17 at 09:52 +0800, Viresh Kumar wrote: > > > > On 16-12-15, 21:29, Dawei Chien wrote: > > > > > Use Intelligent Power Allocation (IPA) technical to add dynamic power model > > > > > for binding CPU thermal zone. The power allocator governor allocates power > > > > > budget to control CPU temperature. > > > > > > > > > > Power Allocator governor is able to keep SOC temperature within a defined > > > > > temperature range to avoid SOC overheat and keep it's performance. > > > > > mt8173-cpufreq.c need to register its' own power model with power allocator > > > > > thermal governor, so that power allocator governor can allocates suitable > > > > > power budget to control CPU temperature. > > > > > > > > > > Binding document is refer to this patchset > > > > > https://lkml.org/lkml/2015/11/30/239 > > > > > > > > > > Change since V5: > > > > > 1. Remove thermal sensor ID from phandles > > > > > > > > Though you should have included this in the new version, but still > > > > > > > > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> > > > > > > > > -- > > > > viresh > > > > > > Hi Viresh, > > > Would you please pull this patch to your tree since following patch > > > already pulled in, thank you. > > > > > > https://lkml.org/lkml/2015/11/30/239 > > > > Its Rafael, who is going to apply this one. > > > > Can you please resend it as he may not have it in patchworks? > > > > Hi Rafael, > Would you merge this patch to your tree, thank you. > > BR, > Dawei Hi Rafael, Would you please merge this patch, or please kindly let me know for any problem, thank you. BR, Dawei ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model. 2016-04-12 2:32 ` dawei chien @ 2016-04-12 5:11 ` Viresh Kumar 2016-04-12 5:24 ` dawei chien 0 siblings, 1 reply; 12+ messages in thread From: Viresh Kumar @ 2016-04-12 5:11 UTC (permalink / raw) To: linux-arm-kernel On 12-04-16, 10:32, dawei chien wrote: > On Tue, 2016-03-22 at 13:13 +0800, dawei chien wrote: > > On Tue, 2016-03-15 at 13:17 +0700, Viresh Kumar wrote: > > > Its Rafael, who is going to apply this one. > > > > > > Can you please resend it as he may not have it in patchworks? > > > > > > > Hi Rafael, > > Would you merge this patch to your tree, thank you. > > > > BR, > > Dawei > > Hi Rafael, > Would you please merge this patch, or please kindly let me know for any > problem, thank you. Didn't I ask you earlier to resend this patch as Rafael wouldn't have it in his queue now ? Please resend it and that will make it earlier for Rafael to get it applied. -- viresh ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model. 2016-04-12 5:11 ` Viresh Kumar @ 2016-04-12 5:24 ` dawei chien 2016-04-12 5:39 ` Viresh Kumar 0 siblings, 1 reply; 12+ messages in thread From: dawei chien @ 2016-04-12 5:24 UTC (permalink / raw) To: linux-arm-kernel On Tue, 2016-04-12 at 10:41 +0530, Viresh Kumar wrote: > On 12-04-16, 10:32, dawei chien wrote: > > On Tue, 2016-03-22 at 13:13 +0800, dawei chien wrote: > > > On Tue, 2016-03-15 at 13:17 +0700, Viresh Kumar wrote: > > > > Its Rafael, who is going to apply this one. > > > > > > > > Can you please resend it as he may not have it in patchworks? > > > > > > > > > > Hi Rafael, > > > Would you merge this patch to your tree, thank you. > > > > > > BR, > > > Dawei > > > > Hi Rafael, > > Would you please merge this patch, or please kindly let me know for any > > problem, thank you. > > Didn't I ask you earlier to resend this patch as Rafael wouldn't have > it in his queue now ? > > Please resend it and that will make it earlier for Rafael to get it > applied. > Hi Viresh, Please refer to following for my resending, thank you. https://lkml.org/lkml/2016/3/15/101 https://patchwork.kernel.org/patch/8586131/ https://patchwork.kernel.org/patch/8586111/ https://patchwork.kernel.org/patch/8586081/ BR, Dawei ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model. 2016-04-12 5:24 ` dawei chien @ 2016-04-12 5:39 ` Viresh Kumar 0 siblings, 0 replies; 12+ messages in thread From: Viresh Kumar @ 2016-04-12 5:39 UTC (permalink / raw) To: linux-arm-kernel On 12-04-16, 13:24, dawei chien wrote: > Please refer to following for my resending, thank you. > > https://lkml.org/lkml/2016/3/15/101 > https://patchwork.kernel.org/patch/8586131/ > https://patchwork.kernel.org/patch/8586111/ > https://patchwork.kernel.org/patch/8586081/ Oh, you were continuously sending new ping requests on the old thread. You should have used the new thread instead :) Anyway, I have pinged Rafael over the new thread now. -- viresh ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-04-12 5:39 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-12-16 13:29 [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model Dawei Chien 2015-12-16 13:29 ` [PATCH v6 1/3] " Dawei Chien 2015-12-16 13:29 ` [PATCH v6 2/3] arm64: dts: mt8173: Add thermal zone node Dawei Chien 2015-12-16 13:29 ` [PATCH v6 3/3] arm64: dts: mt8173: Add dynamic power node Dawei Chien 2015-12-17 1:52 ` [PATCH v6 0/3] thermal: mediatek: Add cpu dynamic power cooling model Viresh Kumar 2016-03-15 4:53 ` dawei chien 2016-03-15 6:17 ` Viresh Kumar 2016-03-22 5:13 ` dawei chien 2016-04-12 2:32 ` dawei chien 2016-04-12 5:11 ` Viresh Kumar 2016-04-12 5:24 ` dawei chien 2016-04-12 5:39 ` Viresh Kumar
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).