* [PATCH 1/2] ARM: dts: rockchip: Limit GPU frequency on veyron mickey to 300 MHz when the CPU gets very hot @ 2019-05-20 17:01 ` Matthias Kaehlcke 0 siblings, 0 replies; 14+ messages in thread From: Matthias Kaehlcke @ 2019-05-20 17:01 UTC (permalink / raw) To: Heiko Stuebner, Rob Herring, Mark Rutland Cc: linux-arm-kernel, linux-rockchip, devicetree, linux-kernel, Douglas Anderson, Matthias Kaehlcke On rk3288 the CPU and GPU temperatures are correlated. Limit the GPU frequency on veyron mickey to 300 MHz for CPU temperatures >= 85°C. This matches the configuration of the downstream Chrome OS 3.14 kernel, the 'official' kernel for mickey. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> --- Note: this patch depends on "ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU" (https://lore.kernel.org/patchwork/patch/1075005/) --- arch/arm/boot/dts/rk3288-veyron-mickey.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts index d889ab3c8235..f118d92a49d0 100644 --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts @@ -125,6 +125,12 @@ <&cpu2 8 THERMAL_NO_LIMIT>, <&cpu3 8 THERMAL_NO_LIMIT>; }; + + /* At very hot, don't let GPU go over 300 MHz */ + cpu_very_hot_limit_gpu { + trip = <&cpu_alert_very_hot>; + cooling-device = <&gpu 2 2>; + }; }; }; -- 2.21.0.1020.gf2820cf01a-goog ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 1/2] ARM: dts: rockchip: Limit GPU frequency on veyron mickey to 300 MHz when the CPU gets very hot @ 2019-05-20 17:01 ` Matthias Kaehlcke 0 siblings, 0 replies; 14+ messages in thread From: Matthias Kaehlcke @ 2019-05-20 17:01 UTC (permalink / raw) To: Heiko Stuebner, Rob Herring, Mark Rutland Cc: devicetree, Douglas Anderson, linux-kernel, linux-rockchip, Matthias Kaehlcke, linux-arm-kernel On rk3288 the CPU and GPU temperatures are correlated. Limit the GPU frequency on veyron mickey to 300 MHz for CPU temperatures >= 85°C. This matches the configuration of the downstream Chrome OS 3.14 kernel, the 'official' kernel for mickey. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> --- Note: this patch depends on "ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU" (https://lore.kernel.org/patchwork/patch/1075005/) --- arch/arm/boot/dts/rk3288-veyron-mickey.dts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts index d889ab3c8235..f118d92a49d0 100644 --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts @@ -125,6 +125,12 @@ <&cpu2 8 THERMAL_NO_LIMIT>, <&cpu3 8 THERMAL_NO_LIMIT>; }; + + /* At very hot, don't let GPU go over 300 MHz */ + cpu_very_hot_limit_gpu { + trip = <&cpu_alert_very_hot>; + cooling-device = <&gpu 2 2>; + }; }; }; -- 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 related [flat|nested] 14+ messages in thread
* [PATCH 2/2] ARM: dts: rockchip: Configure the GPU thermal zone for mickey 2019-05-20 17:01 ` Matthias Kaehlcke @ 2019-05-20 17:01 ` Matthias Kaehlcke -1 siblings, 0 replies; 14+ messages in thread From: Matthias Kaehlcke @ 2019-05-20 17:01 UTC (permalink / raw) To: Heiko Stuebner, Rob Herring, Mark Rutland Cc: linux-arm-kernel, linux-rockchip, devicetree, linux-kernel, Douglas Anderson, Matthias Kaehlcke mickey crams a lot of hardware into a tiny package, which requires more aggressive thermal throttling than for devices with a larger footprint. Configure the GPU thermal zone to throttle the GPU progressively at temperatures >= 60°C. Heat dissipated by the CPUs also affects the GPU temperature, hence we cap the CPU frequency to 1.4 GHz for temperatures above 65°C. Further throttling of the CPUs may be performed by the CPU thermal zone. The configuration matches that of the downstram Chrome OS 3.14 kernel, the 'official' kernel for mickey. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> --- Note: this patch depends on "ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU" (https://lore.kernel.org/patchwork/patch/1075005/) --- arch/arm/boot/dts/rk3288-veyron-mickey.dts | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts index f118d92a49d0..f0b83afa2a60 100644 --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts @@ -138,6 +138,70 @@ /delete-property/mmc-hs200-1_8v; }; +&gpu_thermal { + /delete-node/ trips; + /delete-node/ cooling-maps; + + trips { + gpu_alert_warmish: gpu_alert_warmish { + temperature = <60000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + gpu_alert_warm: gpu_alert_warm { + temperature = <65000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + gpu_alert_hotter: gpu_alert_hotter { + temperature = <84000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + gpu_alert_very_very_hot: gpu_alert_very_very_hot { + temperature = <86000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + gpu_crit: gpu_crit { + temperature = <90000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "critical"; + }; + }; + + cooling-maps { + /* After 1st level throttle the GPU down to as low as 400 MHz */ + gpu_warmish_limit_gpu { + trip = <&gpu_alert_warmish>; + cooling-device = <&gpu THERMAL_NO_LIMIT 1>; + }; + + /* + * Slightly after we throttle the GPU, we'll also make sure that + * the CPU can't go faster than 1.4 GHz. Note that we won't + * throttle the CPU lower than 1.4 GHz due to GPU heat--we'll + * let the CPU do the rest itself. + */ + gpu_warm_limit_cpu { + trip = <&gpu_alert_warm>; + cooling-device = <&cpu0 4 4>; + }; + + /* When hot, GPU goes down to 300 MHz */ + gpu_hotter_limit_gpu { + trip = <&gpu_alert_hotter>; + cooling-device = <&gpu 2 2>; + }; + + /* When really hot, don't let GPU go _above_ 300 MHz */ + gpu_very_very_hot_limit_gpu { + trip = <&gpu_alert_very_very_hot>; + cooling-device = <&gpu 2 THERMAL_NO_LIMIT>; + }; + }; +}; + &i2c2 { status = "disabled"; }; -- 2.21.0.1020.gf2820cf01a-goog ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 2/2] ARM: dts: rockchip: Configure the GPU thermal zone for mickey @ 2019-05-20 17:01 ` Matthias Kaehlcke 0 siblings, 0 replies; 14+ messages in thread From: Matthias Kaehlcke @ 2019-05-20 17:01 UTC (permalink / raw) To: Heiko Stuebner, Rob Herring, Mark Rutland Cc: devicetree, Douglas Anderson, linux-kernel, linux-rockchip, Matthias Kaehlcke, linux-arm-kernel mickey crams a lot of hardware into a tiny package, which requires more aggressive thermal throttling than for devices with a larger footprint. Configure the GPU thermal zone to throttle the GPU progressively at temperatures >= 60°C. Heat dissipated by the CPUs also affects the GPU temperature, hence we cap the CPU frequency to 1.4 GHz for temperatures above 65°C. Further throttling of the CPUs may be performed by the CPU thermal zone. The configuration matches that of the downstram Chrome OS 3.14 kernel, the 'official' kernel for mickey. Signed-off-by: Matthias Kaehlcke <mka@chromium.org> --- Note: this patch depends on "ARM: dts: rockchip: Add #cooling-cells entry for rk3288 GPU" (https://lore.kernel.org/patchwork/patch/1075005/) --- arch/arm/boot/dts/rk3288-veyron-mickey.dts | 64 ++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts index f118d92a49d0..f0b83afa2a60 100644 --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts @@ -138,6 +138,70 @@ /delete-property/mmc-hs200-1_8v; }; +&gpu_thermal { + /delete-node/ trips; + /delete-node/ cooling-maps; + + trips { + gpu_alert_warmish: gpu_alert_warmish { + temperature = <60000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + gpu_alert_warm: gpu_alert_warm { + temperature = <65000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + gpu_alert_hotter: gpu_alert_hotter { + temperature = <84000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + gpu_alert_very_very_hot: gpu_alert_very_very_hot { + temperature = <86000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "passive"; + }; + gpu_crit: gpu_crit { + temperature = <90000>; /* millicelsius */ + hysteresis = <2000>; /* millicelsius */ + type = "critical"; + }; + }; + + cooling-maps { + /* After 1st level throttle the GPU down to as low as 400 MHz */ + gpu_warmish_limit_gpu { + trip = <&gpu_alert_warmish>; + cooling-device = <&gpu THERMAL_NO_LIMIT 1>; + }; + + /* + * Slightly after we throttle the GPU, we'll also make sure that + * the CPU can't go faster than 1.4 GHz. Note that we won't + * throttle the CPU lower than 1.4 GHz due to GPU heat--we'll + * let the CPU do the rest itself. + */ + gpu_warm_limit_cpu { + trip = <&gpu_alert_warm>; + cooling-device = <&cpu0 4 4>; + }; + + /* When hot, GPU goes down to 300 MHz */ + gpu_hotter_limit_gpu { + trip = <&gpu_alert_hotter>; + cooling-device = <&gpu 2 2>; + }; + + /* When really hot, don't let GPU go _above_ 300 MHz */ + gpu_very_very_hot_limit_gpu { + trip = <&gpu_alert_very_very_hot>; + cooling-device = <&gpu 2 THERMAL_NO_LIMIT>; + }; + }; +}; + &i2c2 { 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 related [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] ARM: dts: rockchip: Configure the GPU thermal zone for mickey 2019-05-20 17:01 ` Matthias Kaehlcke @ 2019-05-20 20:21 ` Doug Anderson -1 siblings, 0 replies; 14+ messages in thread From: Doug Anderson @ 2019-05-20 20:21 UTC (permalink / raw) To: Matthias Kaehlcke Cc: Heiko Stuebner, Rob Herring, Mark Rutland, Linux ARM, open list:ARM/Rockchip SoC..., devicetree, LKML Hi, On Mon, May 20, 2019 at 10:01 AM Matthias Kaehlcke <mka@chromium.org> wrote: > > mickey crams a lot of hardware into a tiny package, which requires > more aggressive thermal throttling than for devices with a larger > footprint. Configure the GPU thermal zone to throttle the GPU > progressively at temperatures >= 60°C. Heat dissipated by the > CPUs also affects the GPU temperature, hence we cap the CPU > frequency to 1.4 GHz for temperatures above 65°C. Further throttling > of the CPUs may be performed by the CPU thermal zone. > > The configuration matches that of the downstram Chrome OS 3.14 s/downstram/downstream > + cooling-maps { > + /* After 1st level throttle the GPU down to as low as 400 MHz */ > + gpu_warmish_limit_gpu { > + trip = <&gpu_alert_warmish>; > + cooling-device = <&gpu THERMAL_NO_LIMIT 1>; As per my comment in patch #1, you are probably ending up throttling to 500 MHz, not 400 MHz. Below will all have similar problems unless we actually delete the 500 MHz operating point. > + }; > + > + /* > + * Slightly after we throttle the GPU, we'll also make sure that > + * the CPU can't go faster than 1.4 GHz. Note that we won't > + * throttle the CPU lower than 1.4 GHz due to GPU heat--we'll > + * let the CPU do the rest itself. > + */ > + gpu_warm_limit_cpu { > + trip = <&gpu_alert_warm>; > + cooling-device = <&cpu0 4 4>; Shouldn't you list cpu1, cpu2, and cpu3 too? That'd match what upstream did elsewhere in this file? ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] ARM: dts: rockchip: Configure the GPU thermal zone for mickey @ 2019-05-20 20:21 ` Doug Anderson 0 siblings, 0 replies; 14+ messages in thread From: Doug Anderson @ 2019-05-20 20:21 UTC (permalink / raw) To: Matthias Kaehlcke Cc: Mark Rutland, devicetree, Heiko Stuebner, LKML, open list:ARM/Rockchip SoC..., Rob Herring, Linux ARM Hi, On Mon, May 20, 2019 at 10:01 AM Matthias Kaehlcke <mka@chromium.org> wrote: > > mickey crams a lot of hardware into a tiny package, which requires > more aggressive thermal throttling than for devices with a larger > footprint. Configure the GPU thermal zone to throttle the GPU > progressively at temperatures >= 60°C. Heat dissipated by the > CPUs also affects the GPU temperature, hence we cap the CPU > frequency to 1.4 GHz for temperatures above 65°C. Further throttling > of the CPUs may be performed by the CPU thermal zone. > > The configuration matches that of the downstram Chrome OS 3.14 s/downstram/downstream > + cooling-maps { > + /* After 1st level throttle the GPU down to as low as 400 MHz */ > + gpu_warmish_limit_gpu { > + trip = <&gpu_alert_warmish>; > + cooling-device = <&gpu THERMAL_NO_LIMIT 1>; As per my comment in patch #1, you are probably ending up throttling to 500 MHz, not 400 MHz. Below will all have similar problems unless we actually delete the 500 MHz operating point. > + }; > + > + /* > + * Slightly after we throttle the GPU, we'll also make sure that > + * the CPU can't go faster than 1.4 GHz. Note that we won't > + * throttle the CPU lower than 1.4 GHz due to GPU heat--we'll > + * let the CPU do the rest itself. > + */ > + gpu_warm_limit_cpu { > + trip = <&gpu_alert_warm>; > + cooling-device = <&cpu0 4 4>; Shouldn't you list cpu1, cpu2, and cpu3 too? That'd match what upstream did elsewhere in this file? _______________________________________________ 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] 14+ messages in thread
* Re: [PATCH 2/2] ARM: dts: rockchip: Configure the GPU thermal zone for mickey 2019-05-20 20:21 ` Doug Anderson @ 2019-05-20 21:21 ` Matthias Kaehlcke -1 siblings, 0 replies; 14+ messages in thread From: Matthias Kaehlcke @ 2019-05-20 21:21 UTC (permalink / raw) To: Doug Anderson Cc: Heiko Stuebner, Rob Herring, Mark Rutland, Linux ARM, open list:ARM/Rockchip SoC..., devicetree, LKML On Mon, May 20, 2019 at 01:21:33PM -0700, Doug Anderson wrote: > Hi, > > On Mon, May 20, 2019 at 10:01 AM Matthias Kaehlcke <mka@chromium.org> wrote: > > > > mickey crams a lot of hardware into a tiny package, which requires > > more aggressive thermal throttling than for devices with a larger > > footprint. Configure the GPU thermal zone to throttle the GPU > > progressively at temperatures >= 60°C. Heat dissipated by the > > CPUs also affects the GPU temperature, hence we cap the CPU > > frequency to 1.4 GHz for temperatures above 65°C. Further throttling > > of the CPUs may be performed by the CPU thermal zone. > > > > The configuration matches that of the downstram Chrome OS 3.14 > > s/downstram/downstream ack > > > + cooling-maps { > > + /* After 1st level throttle the GPU down to as low as 400 MHz */ > > + gpu_warmish_limit_gpu { > > + trip = <&gpu_alert_warmish>; > > + cooling-device = <&gpu THERMAL_NO_LIMIT 1>; > > As per my comment in patch #1, you are probably ending up throttling > to 500 MHz, not 400 MHz. Below will all have similar problems unless > we actually delete the 500 MHz operating point. Thanks for pointing that out. As per disussion on patch #1 we'll disable the 500 MHz OPP to stay in sync with downstream and avoid problems in case someone decides to re-purpose NPLL. > > + }; > > + > > + /* > > + * Slightly after we throttle the GPU, we'll also make sure that > > + * the CPU can't go faster than 1.4 GHz. Note that we won't > > + * throttle the CPU lower than 1.4 GHz due to GPU heat--we'll > > + * let the CPU do the rest itself. > > + */ > > + gpu_warm_limit_cpu { > > + trip = <&gpu_alert_warm>; > > + cooling-device = <&cpu0 4 4>; > > Shouldn't you list cpu1, cpu2, and cpu3 too? That'd match what > upstream did elsewhere in this file? ack, should have noticed, I 'yelled' at others before for not doing this ... ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 2/2] ARM: dts: rockchip: Configure the GPU thermal zone for mickey @ 2019-05-20 21:21 ` Matthias Kaehlcke 0 siblings, 0 replies; 14+ messages in thread From: Matthias Kaehlcke @ 2019-05-20 21:21 UTC (permalink / raw) To: Doug Anderson Cc: Mark Rutland, devicetree, Heiko Stuebner, LKML, open list:ARM/Rockchip SoC..., Rob Herring, Linux ARM On Mon, May 20, 2019 at 01:21:33PM -0700, Doug Anderson wrote: > Hi, > > On Mon, May 20, 2019 at 10:01 AM Matthias Kaehlcke <mka@chromium.org> wrote: > > > > mickey crams a lot of hardware into a tiny package, which requires > > more aggressive thermal throttling than for devices with a larger > > footprint. Configure the GPU thermal zone to throttle the GPU > > progressively at temperatures >= 60°C. Heat dissipated by the > > CPUs also affects the GPU temperature, hence we cap the CPU > > frequency to 1.4 GHz for temperatures above 65°C. Further throttling > > of the CPUs may be performed by the CPU thermal zone. > > > > The configuration matches that of the downstram Chrome OS 3.14 > > s/downstram/downstream ack > > > + cooling-maps { > > + /* After 1st level throttle the GPU down to as low as 400 MHz */ > > + gpu_warmish_limit_gpu { > > + trip = <&gpu_alert_warmish>; > > + cooling-device = <&gpu THERMAL_NO_LIMIT 1>; > > As per my comment in patch #1, you are probably ending up throttling > to 500 MHz, not 400 MHz. Below will all have similar problems unless > we actually delete the 500 MHz operating point. Thanks for pointing that out. As per disussion on patch #1 we'll disable the 500 MHz OPP to stay in sync with downstream and avoid problems in case someone decides to re-purpose NPLL. > > + }; > > + > > + /* > > + * Slightly after we throttle the GPU, we'll also make sure that > > + * the CPU can't go faster than 1.4 GHz. Note that we won't > > + * throttle the CPU lower than 1.4 GHz due to GPU heat--we'll > > + * let the CPU do the rest itself. > > + */ > > + gpu_warm_limit_cpu { > > + trip = <&gpu_alert_warm>; > > + cooling-device = <&cpu0 4 4>; > > Shouldn't you list cpu1, cpu2, and cpu3 too? That'd match what > upstream did elsewhere in this file? ack, should have noticed, I 'yelled' at others before for not doing this ... _______________________________________________ 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] 14+ messages in thread
* Re: [PATCH 1/2] ARM: dts: rockchip: Limit GPU frequency on veyron mickey to 300 MHz when the CPU gets very hot 2019-05-20 17:01 ` Matthias Kaehlcke @ 2019-05-20 20:16 ` Doug Anderson -1 siblings, 0 replies; 14+ messages in thread From: Doug Anderson @ 2019-05-20 20:16 UTC (permalink / raw) To: Matthias Kaehlcke Cc: Heiko Stuebner, Rob Herring, Mark Rutland, Linux ARM, open list:ARM/Rockchip SoC..., devicetree, LKML Hi, On Mon, May 20, 2019 at 10:01 AM Matthias Kaehlcke <mka@chromium.org> wrote: > > On rk3288 the CPU and GPU temperatures are correlated. Limit the GPU > frequency on veyron mickey to 300 MHz for CPU temperatures >= 85°C. > > This matches the configuration of the downstream Chrome OS 3.14 kernel, > the 'official' kernel for mickey. > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org> > --- > Note: this patch depends on "ARM: dts: rockchip: Add #cooling-cells > entry for rk3288 GPU" (https://lore.kernel.org/patchwork/patch/1075005/) > --- > arch/arm/boot/dts/rk3288-veyron-mickey.dts | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts > index d889ab3c8235..f118d92a49d0 100644 > --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts > +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts > @@ -125,6 +125,12 @@ > <&cpu2 8 THERMAL_NO_LIMIT>, > <&cpu3 8 THERMAL_NO_LIMIT>; > }; > + > + /* At very hot, don't let GPU go over 300 MHz */ > + cpu_very_hot_limit_gpu { > + trip = <&cpu_alert_very_hot>; > + cooling-device = <&gpu 2 2>; > + }; Two things: A) If I'm reading things properly, you're actually limiting things to 400 MHz. This is because you don't have <https://crrev.com/c/1574579> which deletes the 500 MHz GPU operating point. So on upstream the available points are: 0: 600 MHz 1: 500 MHz 2: 400 MHz 3: 300 MHz 4: 200 MHz 5: 100 MHz ...and downstream: 0: 600 MHz 1: 400 MHz 2: 300 MHz 3: 200 MHz 4: 100 MHz Thinking about it more, I bet Heiko would actually be OK deleting the 500 MHz GPU operating point for veyron. Technically it's not needed upstream because upstream doesn't have our hacks to allow re-purposing NPLL for HDMI (so they _can_ make 500 MHz) but maybe we can make the argument that these laptops have only ever been tested with the 500 MHz operating point removed and also that eventually someonje will probably figure out a way to re-purpose NPLL for HDMI even upstream... B) It seems like in the same patch you'd want to introduce "cpu_warm_limit_gpu", AKA: cpu_warm_limit_gpu { trip = <&cpu_alert_warm>; cooling-device = <&gpu 1 1>; }; -Doug ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] ARM: dts: rockchip: Limit GPU frequency on veyron mickey to 300 MHz when the CPU gets very hot @ 2019-05-20 20:16 ` Doug Anderson 0 siblings, 0 replies; 14+ messages in thread From: Doug Anderson @ 2019-05-20 20:16 UTC (permalink / raw) To: Matthias Kaehlcke Cc: Mark Rutland, devicetree, Heiko Stuebner, LKML, open list:ARM/Rockchip SoC..., Rob Herring, Linux ARM Hi, On Mon, May 20, 2019 at 10:01 AM Matthias Kaehlcke <mka@chromium.org> wrote: > > On rk3288 the CPU and GPU temperatures are correlated. Limit the GPU > frequency on veyron mickey to 300 MHz for CPU temperatures >= 85°C. > > This matches the configuration of the downstream Chrome OS 3.14 kernel, > the 'official' kernel for mickey. > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org> > --- > Note: this patch depends on "ARM: dts: rockchip: Add #cooling-cells > entry for rk3288 GPU" (https://lore.kernel.org/patchwork/patch/1075005/) > --- > arch/arm/boot/dts/rk3288-veyron-mickey.dts | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts > index d889ab3c8235..f118d92a49d0 100644 > --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts > +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts > @@ -125,6 +125,12 @@ > <&cpu2 8 THERMAL_NO_LIMIT>, > <&cpu3 8 THERMAL_NO_LIMIT>; > }; > + > + /* At very hot, don't let GPU go over 300 MHz */ > + cpu_very_hot_limit_gpu { > + trip = <&cpu_alert_very_hot>; > + cooling-device = <&gpu 2 2>; > + }; Two things: A) If I'm reading things properly, you're actually limiting things to 400 MHz. This is because you don't have <https://crrev.com/c/1574579> which deletes the 500 MHz GPU operating point. So on upstream the available points are: 0: 600 MHz 1: 500 MHz 2: 400 MHz 3: 300 MHz 4: 200 MHz 5: 100 MHz ...and downstream: 0: 600 MHz 1: 400 MHz 2: 300 MHz 3: 200 MHz 4: 100 MHz Thinking about it more, I bet Heiko would actually be OK deleting the 500 MHz GPU operating point for veyron. Technically it's not needed upstream because upstream doesn't have our hacks to allow re-purposing NPLL for HDMI (so they _can_ make 500 MHz) but maybe we can make the argument that these laptops have only ever been tested with the 500 MHz operating point removed and also that eventually someonje will probably figure out a way to re-purpose NPLL for HDMI even upstream... B) It seems like in the same patch you'd want to introduce "cpu_warm_limit_gpu", AKA: cpu_warm_limit_gpu { trip = <&cpu_alert_warm>; cooling-device = <&gpu 1 1>; }; -Doug _______________________________________________ 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] 14+ messages in thread
* Re: [PATCH 1/2] ARM: dts: rockchip: Limit GPU frequency on veyron mickey to 300 MHz when the CPU gets very hot 2019-05-20 20:16 ` Doug Anderson @ 2019-05-20 20:28 ` Heiko Stübner -1 siblings, 0 replies; 14+ messages in thread From: Heiko Stübner @ 2019-05-20 20:28 UTC (permalink / raw) To: Doug Anderson Cc: Matthias Kaehlcke, Rob Herring, Mark Rutland, Linux ARM, open list:ARM/Rockchip SoC..., devicetree, LKML Am Montag, 20. Mai 2019, 22:16:46 CEST schrieb Doug Anderson: > Hi, > > On Mon, May 20, 2019 at 10:01 AM Matthias Kaehlcke <mka@chromium.org> wrote: > > > > On rk3288 the CPU and GPU temperatures are correlated. Limit the GPU > > frequency on veyron mickey to 300 MHz for CPU temperatures >= 85°C. > > > > This matches the configuration of the downstream Chrome OS 3.14 kernel, > > the 'official' kernel for mickey. > > > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org> > > --- > > Note: this patch depends on "ARM: dts: rockchip: Add #cooling-cells > > entry for rk3288 GPU" (https://lore.kernel.org/patchwork/patch/1075005/) > > --- > > arch/arm/boot/dts/rk3288-veyron-mickey.dts | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts > > index d889ab3c8235..f118d92a49d0 100644 > > --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts > > +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts > > @@ -125,6 +125,12 @@ > > <&cpu2 8 THERMAL_NO_LIMIT>, > > <&cpu3 8 THERMAL_NO_LIMIT>; > > }; > > + > > + /* At very hot, don't let GPU go over 300 MHz */ > > + cpu_very_hot_limit_gpu { > > + trip = <&cpu_alert_very_hot>; > > + cooling-device = <&gpu 2 2>; > > + }; > > Two things: > > A) If I'm reading things properly, you're actually limiting things to > 400 MHz. This is because you don't have <https://crrev.com/c/1574579> > which deletes the 500 MHz GPU operating point. So on upstream the > available points are: > > 0: 600 MHz > 1: 500 MHz > 2: 400 MHz > 3: 300 MHz > 4: 200 MHz > 5: 100 MHz > > ...and downstream: > > 0: 600 MHz > 1: 400 MHz > 2: 300 MHz > 3: 200 MHz > 4: 100 MHz > > Thinking about it more, I bet Heiko would actually be OK deleting the > 500 MHz GPU operating point for veyron. Technically it's not needed > upstream because upstream doesn't have our hacks to allow re-purposing > NPLL for HDMI (so they _can_ make 500 MHz) but maybe we can make the > argument that these laptops have only ever been tested with the 500 > MHz operating point removed and also that eventually someonje will > probably figure out a way to re-purpose NPLL for HDMI even upstream... Yeah. Dropping the opp sounds sensible ... for the npll-related thing and also if you're really running into thermal constraints it might be good to give the system a bit more breathing room? Heiko > B) It seems like in the same patch you'd want to introduce > "cpu_warm_limit_gpu", AKA: > > cpu_warm_limit_gpu { > trip = <&cpu_alert_warm>; > cooling-device = > <&gpu 1 1>; > }; > > > -Doug ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] ARM: dts: rockchip: Limit GPU frequency on veyron mickey to 300 MHz when the CPU gets very hot @ 2019-05-20 20:28 ` Heiko Stübner 0 siblings, 0 replies; 14+ messages in thread From: Heiko Stübner @ 2019-05-20 20:28 UTC (permalink / raw) To: Doug Anderson Cc: Mark Rutland, devicetree, LKML, Rob Herring, open list:ARM/Rockchip SoC..., Matthias Kaehlcke, Linux ARM Am Montag, 20. Mai 2019, 22:16:46 CEST schrieb Doug Anderson: > Hi, > > On Mon, May 20, 2019 at 10:01 AM Matthias Kaehlcke <mka@chromium.org> wrote: > > > > On rk3288 the CPU and GPU temperatures are correlated. Limit the GPU > > frequency on veyron mickey to 300 MHz for CPU temperatures >= 85°C. > > > > This matches the configuration of the downstream Chrome OS 3.14 kernel, > > the 'official' kernel for mickey. > > > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org> > > --- > > Note: this patch depends on "ARM: dts: rockchip: Add #cooling-cells > > entry for rk3288 GPU" (https://lore.kernel.org/patchwork/patch/1075005/) > > --- > > arch/arm/boot/dts/rk3288-veyron-mickey.dts | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts > > index d889ab3c8235..f118d92a49d0 100644 > > --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts > > +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts > > @@ -125,6 +125,12 @@ > > <&cpu2 8 THERMAL_NO_LIMIT>, > > <&cpu3 8 THERMAL_NO_LIMIT>; > > }; > > + > > + /* At very hot, don't let GPU go over 300 MHz */ > > + cpu_very_hot_limit_gpu { > > + trip = <&cpu_alert_very_hot>; > > + cooling-device = <&gpu 2 2>; > > + }; > > Two things: > > A) If I'm reading things properly, you're actually limiting things to > 400 MHz. This is because you don't have <https://crrev.com/c/1574579> > which deletes the 500 MHz GPU operating point. So on upstream the > available points are: > > 0: 600 MHz > 1: 500 MHz > 2: 400 MHz > 3: 300 MHz > 4: 200 MHz > 5: 100 MHz > > ...and downstream: > > 0: 600 MHz > 1: 400 MHz > 2: 300 MHz > 3: 200 MHz > 4: 100 MHz > > Thinking about it more, I bet Heiko would actually be OK deleting the > 500 MHz GPU operating point for veyron. Technically it's not needed > upstream because upstream doesn't have our hacks to allow re-purposing > NPLL for HDMI (so they _can_ make 500 MHz) but maybe we can make the > argument that these laptops have only ever been tested with the 500 > MHz operating point removed and also that eventually someonje will > probably figure out a way to re-purpose NPLL for HDMI even upstream... Yeah. Dropping the opp sounds sensible ... for the npll-related thing and also if you're really running into thermal constraints it might be good to give the system a bit more breathing room? Heiko > B) It seems like in the same patch you'd want to introduce > "cpu_warm_limit_gpu", AKA: > > cpu_warm_limit_gpu { > trip = <&cpu_alert_warm>; > cooling-device = > <&gpu 1 1>; > }; > > > -Doug _______________________________________________ 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] 14+ messages in thread
* Re: [PATCH 1/2] ARM: dts: rockchip: Limit GPU frequency on veyron mickey to 300 MHz when the CPU gets very hot 2019-05-20 20:16 ` Doug Anderson @ 2019-05-20 21:12 ` Matthias Kaehlcke -1 siblings, 0 replies; 14+ messages in thread From: Matthias Kaehlcke @ 2019-05-20 21:12 UTC (permalink / raw) To: Doug Anderson Cc: Heiko Stuebner, Rob Herring, Mark Rutland, Linux ARM, open list:ARM/Rockchip SoC..., devicetree, LKML On Mon, May 20, 2019 at 01:16:46PM -0700, Doug Anderson wrote: > Hi, > > On Mon, May 20, 2019 at 10:01 AM Matthias Kaehlcke <mka@chromium.org> wrote: > > > > On rk3288 the CPU and GPU temperatures are correlated. Limit the GPU > > frequency on veyron mickey to 300 MHz for CPU temperatures >= 85°C. > > > > This matches the configuration of the downstream Chrome OS 3.14 kernel, > > the 'official' kernel for mickey. > > > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org> > > --- > > Note: this patch depends on "ARM: dts: rockchip: Add #cooling-cells > > entry for rk3288 GPU" (https://lore.kernel.org/patchwork/patch/1075005/) > > --- > > arch/arm/boot/dts/rk3288-veyron-mickey.dts | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts > > index d889ab3c8235..f118d92a49d0 100644 > > --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts > > +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts > > @@ -125,6 +125,12 @@ > > <&cpu2 8 THERMAL_NO_LIMIT>, > > <&cpu3 8 THERMAL_NO_LIMIT>; > > }; > > + > > + /* At very hot, don't let GPU go over 300 MHz */ > > + cpu_very_hot_limit_gpu { > > + trip = <&cpu_alert_very_hot>; > > + cooling-device = <&gpu 2 2>; > > + }; > > Two things: > > A) If I'm reading things properly, you're actually limiting things to > 400 MHz. This is because you don't have <https://crrev.com/c/1574579> > which deletes the 500 MHz GPU operating point. So on upstream the > available points are: > > 0: 600 MHz > 1: 500 MHz > 2: 400 MHz > 3: 300 MHz > 4: 200 MHz > 5: 100 MHz > > ...and downstream: > > 0: 600 MHz > 1: 400 MHz > 2: 300 MHz > 3: 200 MHz > 4: 100 MHz Thanks spotting this! > Thinking about it more, I bet Heiko would actually be OK deleting the > 500 MHz GPU operating point for veyron. Technically it's not needed > upstream because upstream doesn't have our hacks to allow re-purposing > NPLL for HDMI (so they _can_ make 500 MHz) but maybe we can make the > argument that these laptops have only ever been tested with the 500 > MHz operating point removed and also that eventually someonje will > probably figure out a way to re-purpose NPLL for HDMI even upstream... Looks like Heiko is indeed ok with it, so let's remove the OPP and be in sync with downstream on this. > B) It seems like in the same patch you'd want to introduce > "cpu_warm_limit_gpu", AKA: > > cpu_warm_limit_gpu { > trip = <&cpu_alert_warm>; > cooling-device = > <&gpu 1 1>; > }; Makes sense to do it in the same patch, will add it in v2. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 1/2] ARM: dts: rockchip: Limit GPU frequency on veyron mickey to 300 MHz when the CPU gets very hot @ 2019-05-20 21:12 ` Matthias Kaehlcke 0 siblings, 0 replies; 14+ messages in thread From: Matthias Kaehlcke @ 2019-05-20 21:12 UTC (permalink / raw) To: Doug Anderson Cc: Mark Rutland, devicetree, Heiko Stuebner, LKML, open list:ARM/Rockchip SoC..., Rob Herring, Linux ARM On Mon, May 20, 2019 at 01:16:46PM -0700, Doug Anderson wrote: > Hi, > > On Mon, May 20, 2019 at 10:01 AM Matthias Kaehlcke <mka@chromium.org> wrote: > > > > On rk3288 the CPU and GPU temperatures are correlated. Limit the GPU > > frequency on veyron mickey to 300 MHz for CPU temperatures >= 85°C. > > > > This matches the configuration of the downstream Chrome OS 3.14 kernel, > > the 'official' kernel for mickey. > > > > Signed-off-by: Matthias Kaehlcke <mka@chromium.org> > > --- > > Note: this patch depends on "ARM: dts: rockchip: Add #cooling-cells > > entry for rk3288 GPU" (https://lore.kernel.org/patchwork/patch/1075005/) > > --- > > arch/arm/boot/dts/rk3288-veyron-mickey.dts | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/arch/arm/boot/dts/rk3288-veyron-mickey.dts b/arch/arm/boot/dts/rk3288-veyron-mickey.dts > > index d889ab3c8235..f118d92a49d0 100644 > > --- a/arch/arm/boot/dts/rk3288-veyron-mickey.dts > > +++ b/arch/arm/boot/dts/rk3288-veyron-mickey.dts > > @@ -125,6 +125,12 @@ > > <&cpu2 8 THERMAL_NO_LIMIT>, > > <&cpu3 8 THERMAL_NO_LIMIT>; > > }; > > + > > + /* At very hot, don't let GPU go over 300 MHz */ > > + cpu_very_hot_limit_gpu { > > + trip = <&cpu_alert_very_hot>; > > + cooling-device = <&gpu 2 2>; > > + }; > > Two things: > > A) If I'm reading things properly, you're actually limiting things to > 400 MHz. This is because you don't have <https://crrev.com/c/1574579> > which deletes the 500 MHz GPU operating point. So on upstream the > available points are: > > 0: 600 MHz > 1: 500 MHz > 2: 400 MHz > 3: 300 MHz > 4: 200 MHz > 5: 100 MHz > > ...and downstream: > > 0: 600 MHz > 1: 400 MHz > 2: 300 MHz > 3: 200 MHz > 4: 100 MHz Thanks spotting this! > Thinking about it more, I bet Heiko would actually be OK deleting the > 500 MHz GPU operating point for veyron. Technically it's not needed > upstream because upstream doesn't have our hacks to allow re-purposing > NPLL for HDMI (so they _can_ make 500 MHz) but maybe we can make the > argument that these laptops have only ever been tested with the 500 > MHz operating point removed and also that eventually someonje will > probably figure out a way to re-purpose NPLL for HDMI even upstream... Looks like Heiko is indeed ok with it, so let's remove the OPP and be in sync with downstream on this. > B) It seems like in the same patch you'd want to introduce > "cpu_warm_limit_gpu", AKA: > > cpu_warm_limit_gpu { > trip = <&cpu_alert_warm>; > cooling-device = > <&gpu 1 1>; > }; Makes sense to do it in the same patch, will add it in v2. _______________________________________________ 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] 14+ messages in thread
end of thread, other threads:[~2019-05-20 21:21 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-05-20 17:01 [PATCH 1/2] ARM: dts: rockchip: Limit GPU frequency on veyron mickey to 300 MHz when the CPU gets very hot Matthias Kaehlcke 2019-05-20 17:01 ` Matthias Kaehlcke 2019-05-20 17:01 ` [PATCH 2/2] ARM: dts: rockchip: Configure the GPU thermal zone for mickey Matthias Kaehlcke 2019-05-20 17:01 ` Matthias Kaehlcke 2019-05-20 20:21 ` Doug Anderson 2019-05-20 20:21 ` Doug Anderson 2019-05-20 21:21 ` Matthias Kaehlcke 2019-05-20 21:21 ` Matthias Kaehlcke 2019-05-20 20:16 ` [PATCH 1/2] ARM: dts: rockchip: Limit GPU frequency on veyron mickey to 300 MHz when the CPU gets very hot Doug Anderson 2019-05-20 20:16 ` Doug Anderson 2019-05-20 20:28 ` Heiko Stübner 2019-05-20 20:28 ` Heiko Stübner 2019-05-20 21:12 ` Matthias Kaehlcke 2019-05-20 21:12 ` Matthias Kaehlcke
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.