Re: [PATCH] devfreq: Register devfreq as a cooling device

2021-03-04 Thread Lukasz Luba
On 3/4/21 4:53 PM, Daniel Lezcano wrote: Hi Lukasz, thanks for commenting this patch, On 04/03/2021 14:47, Lukasz Luba wrote: Hi Daniel, On 3/4/21 12:50 PM, Daniel Lezcano wrote: Currently the default behavior is to manually having the devfreq backend to register themselves as a devfreq

Re: [PATCH] devfreq: Register devfreq as a cooling device

2021-03-04 Thread Lukasz Luba
Hi Daniel, On 3/4/21 12:50 PM, Daniel Lezcano wrote: Currently the default behavior is to manually having the devfreq backend to register themselves as a devfreq cooling device. There are no so many and actually it makes more sense to register the devfreq device when adding it. Consequently,

Re: [PATCH] drm/lima: Use delayed timer as default in devfreq profile

2021-02-04 Thread Lukasz Luba
On 2/4/21 1:39 PM, Robin Murphy wrote: On 2021-02-03 02:01, Qiang Yu wrote: On Tue, Feb 2, 2021 at 10:02 PM Lukasz Luba wrote: On 2/2/21 1:01 AM, Qiang Yu wrote: Hi Lukasz, Thanks for the explanation. So the deferred timer option makes a mistake that when GPU goes from idle to busy

Re: [PATCH] drm/lima: Use delayed timer as default in devfreq profile

2021-02-03 Thread Lukasz Luba
tay in suspend. Regards, Lukasz Regards, Qiang On Mon, Feb 1, 2021 at 5:53 PM Lukasz Luba wrote: Hi Qiang, On 1/30/21 1:51 PM, Qiang Yu wrote: Thanks for the patch. But I can't observe any difference on glmark2 with or without this patch. Maybe you can provide other test which can benefit f

Re: [PATCH v2] drm/lima: add governor data with pre-defined thresholds

2021-02-02 Thread Lukasz Luba
On 1/30/21 1:57 PM, Qiang Yu wrote: This patch gets minor improvement on glmark2 (160->162). It has bigger impact when the load is changing and the frequency is stuck to min w/o this patch. Seems there's no way for user to change this value, do we? Or there's work pending to expose it to

Re: [PATCH] drm/lima: Use delayed timer as default in devfreq profile

2021-02-02 Thread Lukasz Luba
Hi Qiang, On 1/30/21 1:51 PM, Qiang Yu wrote: Thanks for the patch. But I can't observe any difference on glmark2 with or without this patch. Maybe you can provide other test which can benefit from it. This is a design problem and has impact on the whole system. There is a few issues. When

Re: [PATCH v2] drm/lima: add governor data with pre-defined thresholds

2021-01-28 Thread Lukasz Luba
emand_data gov_data; ktime_t busy_time; ktime_t idle_time; It looks good. Reviewed-by: Lukasz Luba Regards, Lukasz ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/lima: add governor data with pre-defined thresholds

2021-01-28 Thread Lukasz Luba
On 1/27/21 7:35 PM, Christian Hewitt wrote: On 27 Jan 2021, at 3:11 pm, Lukasz Luba wrote: On 1/27/21 10:24 AM, Lukasz Luba wrote: Hi Christian, On 1/25/21 8:18 AM, Christian Hewitt wrote: This patch adapts the panfrost pre-defined thresholds change [0] to the lima driver to improve real

[PATCH] drm/lima: Use delayed timer as default in devfreq profile

2021-01-28 Thread Lukasz Luba
Devfreq framework supports 2 modes for monitoring devices. Use delayed timer as default instead of deferrable timer in order to monitor the GPU status regardless of CPU idle. Signed-off-by: Lukasz Luba --- Hi all, I've missed the Lima driver while working on Panfrost patch for fixing the issue

Re: [PATCH] drm/lima: add governor data with pre-defined thresholds

2021-01-28 Thread Lukasz Luba
Hi Christian, On 1/25/21 8:18 AM, Christian Hewitt wrote: This patch adapts the panfrost pre-defined thresholds change [0] to the lima driver to improve real-world performance. The upthreshold value has been set to ramp GPU frequency to max freq faster (compared to panfrost) to compensate for

Re: [PATCH] drm/lima: add governor data with pre-defined thresholds

2021-01-28 Thread Lukasz Luba
On 1/27/21 10:24 AM, Lukasz Luba wrote: Hi Christian, On 1/25/21 8:18 AM, Christian Hewitt wrote: This patch adapts the panfrost pre-defined thresholds change [0] to the lima driver to improve real-world performance. The upthreshold value has been set to ramp GPU frequency to max freq

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-23 Thread Lukasz Luba
On 1/22/21 10:24 AM, Steven Price wrote: On 22/01/2021 10:00, Lukasz Luba wrote: On 1/22/21 8:21 AM, Steven Price wrote: On 21/01/2021 17:04, Lukasz Luba wrote: The simple_ondemand devfreq governor uses two thresholds to decide about the frequency change: upthreshold, downdifferential

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-23 Thread Lukasz Luba
On 1/21/21 5:15 PM, Daniel Lezcano wrote: On 21/01/2021 18:04, Lukasz Luba wrote: The simple_ondemand devfreq governor uses two thresholds to decide about the frequency change: upthreshold, downdifferential. These two tunable change the behavior of the governor decision, e.g. how fast

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-23 Thread Lukasz Luba
On 1/22/21 8:21 AM, Steven Price wrote: On 21/01/2021 17:04, Lukasz Luba wrote: The simple_ondemand devfreq governor uses two thresholds to decide about the frequency change: upthreshold, downdifferential. These two tunable change the behavior of the governor decision, e.g. how fast

[PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-22 Thread Lukasz Luba
data with thresholds values gathered experimentally in different workloads. Signed-off-by: Lukasz Luba --- Hi all, This patch aims to improve the panfrost performance in various workloads, (benchmarks, games). The simple_ondemand devfreq governor supports tunables to tweak the behaviour

Re: [PATCH] drm/panfrost: Use delayed timer as default in devfreq profile

2021-01-14 Thread Lukasz Luba
On 1/13/21 3:35 PM, Steven Price wrote: On 05/01/2021 16:41, Lukasz Luba wrote: Devfreq framework supports 2 modes for monitoring devices. Use delayed timer as default instead of deferrable timer in order to monitor the GPU status regardless of CPU idle. Signed-off-by: Lukasz Luba Looks

[PATCH] drm/panfrost: Use delayed timer as default in devfreq profile

2021-01-06 Thread Lukasz Luba
Devfreq framework supports 2 modes for monitoring devices. Use delayed timer as default instead of deferrable timer in order to monitor the GPU status regardless of CPU idle. Signed-off-by: Lukasz Luba --- Hi all, This is just a simple change but has impact on reliable polling mode

Re: [PATCH v4 0/5] Thermal devfreq cooling improvements with Energy Model

2020-12-14 Thread Lukasz Luba
On 12/11/20 3:15 PM, Daniel Lezcano wrote: On 11/12/2020 16:11, Lukasz Luba wrote: Hi Daniel, Do you think it has chance to go to as material for v5.11? Yes, it is in the thermal/linux-next material ATM. Thank you! Regards, Lukasz ___ dri

Re: [PATCH v4 0/5] Thermal devfreq cooling improvements with Energy Model

2020-12-14 Thread Lukasz Luba
Hi Daniel, Do you think it has chance to go to as material for v5.11? Regards, Lukasz On 12/10/20 2:30 PM, Lukasz Luba wrote: Hi all, This patch set is a continuation of my previous work, which aimed to add Energy Model to all devices [1]. This series is a follow up for the patches which

[PATCH v4 0/5] Thermal devfreq cooling improvements with Energy Model

2020-12-10 Thread Lukasz Luba
wer() (as missed to do it in v2) - collected all Reviewed-by tags v2 [3]: - renamed freq_get_state() and related to perf_idx pattern as suggested by Ionela v1 [2] Regards, Lukasz Luba Lukasz Luba (5): thermal: devfreq_cooling: change tracing function and arguments thermal: devfreq_cooling:

[PATCH v4 1/5] thermal: devfreq_cooling: change tracing function and arguments

2020-12-10 Thread Lukasz Luba
Prepare for deleting the static and dynamic power calculation and clean the trace function. These two fields are going to be removed in the next changes. Reviewed-by: Ionela Voinescu Reviewed-by: Steven Rostedt (VMware) # for tracing code Signed-off-by: Lukasz Luba --- drivers/thermal

[PATCH v4 4/5] thermal: devfreq_cooling: remove old power model and use EM

2020-12-10 Thread Lukasz Luba
the needed structures. Reviewed-by: Ionela Voinescu Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 307 ++ include/linux/devfreq_cooling.h | 17 -- 2 files changed, 97 insertions(+), 227 deletions(-) diff --git a/drivers/thermal/devfreq_cooling.c b

[PATCH v4 5/5] drm/panfrost: Register devfreq cooling and attempt to add Energy Model

2020-12-10 Thread Lukasz Luba
'dynamic-power-coefficient'. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Lukasz Luba --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm

[PATCH v4 3/5] thermal: devfreq_cooling: add new registration functions with Energy Model

2020-12-10 Thread Lukasz Luba
-by: Ionela Voinescu Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 54 ++- include/linux/devfreq_cooling.h | 10 ++ 2 files changed, 63 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c

[PATCH v4 2/5] thermal: devfreq_cooling: use a copy of device status

2020-12-10 Thread Lukasz Luba
, which also makes sure that whatever data comes from the device, the load will be in range from 1 to 1024. Reviewed-by: Ionela Voinescu Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 47 --- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git

Re: [PATCH v3 0/5] Thermal devfreq cooling improvements with Energy Model

2020-12-10 Thread Lukasz Luba
Hi Daniel, On 12/9/20 10:30 AM, Lukasz Luba wrote: Hi all, This patch set is a continuation of my previous work, which aimed to add Energy Model to all devices [1]. This series is a follow up for the patches which got merged to v5.9-rc1. It aims to change the thermal devfreq cooling and use

[PATCH v3 0/5] Thermal devfreq cooling improvements with Energy Model

2020-12-10 Thread Lukasz Luba
ved dfc_em_get_requested_power() (as missed to do it in v2) - collected all Reviewed-by tags v2 [3]: - renamed freq_get_state() and related to perf_idx pattern as suggested by Ionela v1 [2] Regards, Lukasz Luba [1] https://lkml.org/lkml/2020/5/11/326 [2] https://lore.kernel.org/linux-pm/20200921122007.2961

[PATCH 0/2] Add DT bindings with dynamic-power-coefficient for Mali GPUs

2020-12-10 Thread Lukasz Luba
Hi all, The patch set aims to add a new property dynamic-power-coefficient to Mali GPU DT bindings. This property is known from CPUs and they are both aligned. It is used for Energy Model registration. Regards, Lukasz Luba Lukasz Luba (2): dt-bindings: mali-midgard: Add dynamic-power

[PATCH 2/2] dt-bindings: mali-bifrost: Add dynamic-power-coefficient

2020-12-10 Thread Lukasz Luba
Add a property dynamic-power-coefficient which allows to register Energy Model for the Mali Bifrost devices. Signed-off-by: Lukasz Luba --- .../bindings/gpu/arm,mali-bifrost.yaml | 17 + 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings

[PATCH v3 5/5] drm/panfrost: Register devfreq cooling and attempt to add Energy Model

2020-12-10 Thread Lukasz Luba
and created based on DT 'dynamic-power-coefficient', voltage and frequency. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Lukasz Luba --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost

[PATCH 1/2] dt-bindings: mali-midgard: Add dynamic-power-coefficient

2020-12-10 Thread Lukasz Luba
Add a property dynamic-power-coefficient which allows to register Energy Model for the Mali Midgard devices. Signed-off-by: Lukasz Luba --- .../bindings/gpu/arm,mali-midgard.yaml | 17 + 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings

[PATCH v3 2/5] thermal: devfreq_cooling: use a copy of device status

2020-12-10 Thread Lukasz Luba
, which also makes sure that whatever data comes from the device, the load will be in range from 1 to 1024. Reviewed-by: Ionela Voinescu Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 47 --- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git

[PATCH v3 4/5] thermal: devfreq_cooling: remove old power model and use EM

2020-12-10 Thread Lukasz Luba
the needed structures. Reviewed-by: Ionela Voinescu Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 307 ++ include/linux/devfreq_cooling.h | 17 -- 2 files changed, 97 insertions(+), 227 deletions(-) diff --git a/drivers/thermal/devfreq_cooling.c b

[PATCH v3 3/5] thermal: devfreq_cooling: add new registration functions with Energy Model

2020-12-10 Thread Lukasz Luba
-by: Ionela Voinescu Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 83 ++- include/linux/devfreq_cooling.h | 23 + 2 files changed, 105 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal

[PATCH v3 1/5] thermal: devfreq_cooling: change tracing function and arguments

2020-12-10 Thread Lukasz Luba
Prepare for deleting the static and dynamic power calculation and clean the trace function. These two fields are going to be removed in the next changes. Reviewed-by: Ionela Voinescu Reviewed-by: Steven Rostedt (VMware) # for tracing code Signed-off-by: Lukasz Luba --- drivers/thermal

Re: [PATCH v2 2/5] thermal: devfreq_cooling: get a copy of device status

2020-12-09 Thread Lukasz Luba
Hi Daniel, On 12/7/20 12:41 PM, Lukasz Luba wrote: On 12/3/20 4:09 PM, Daniel Lezcano wrote: On 03/12/2020 16:38, Lukasz Luba wrote: On 12/3/20 1:09 PM, Daniel Lezcano wrote: On 18/11/2020 13:03, Lukasz Luba wrote: Devfreq cooling needs to now the correct status of the device in order

Re: [PATCH v2 2/5] thermal: devfreq_cooling: get a copy of device status

2020-12-08 Thread Lukasz Luba
On 12/3/20 4:09 PM, Daniel Lezcano wrote: On 03/12/2020 16:38, Lukasz Luba wrote: On 12/3/20 1:09 PM, Daniel Lezcano wrote: On 18/11/2020 13:03, Lukasz Luba wrote: Devfreq cooling needs to now the correct status of the device in order to operate. Do not rely on Devfreq last_status which

Re: [PATCH v2 3/5] thermal: devfreq_cooling: add new registration functions with Energy Model

2020-12-08 Thread Lukasz Luba
On 12/3/20 3:40 PM, Daniel Lezcano wrote: On 18/11/2020 13:03, Lukasz Luba wrote: The Energy Model (EM) framework supports devices such as Devfreq. Create new registration functions which automatically register EM for the thermal devfreq_cooling devices. This patch prepares the code

Re: [PATCH v2 2/5] thermal: devfreq_cooling: get a copy of device status

2020-12-04 Thread Lukasz Luba
On 12/3/20 1:09 PM, Daniel Lezcano wrote: On 18/11/2020 13:03, Lukasz Luba wrote: Devfreq cooling needs to now the correct status of the device in order to operate. Do not rely on Devfreq last_status which might be a stale data and get more up-to-date values of the load. Devfreq framework

Re: [PATCH v2 3/5] thermal: devfreq_cooling: add new registration functions with Energy Model

2020-12-03 Thread Lukasz Luba
Hi Ionela, On 12/2/20 10:24 AM, Ionela Voinescu wrote: Hi Lukasz, On Wednesday 18 Nov 2020 at 12:03:56 (+), Lukasz Luba wrote: [snip] + struct device_node *np = NULL; [snip] + + if (dev->of_node) + np = of_node_get(dev->of_node); + Should np be c

Re: [PATCH v2 3/5] thermal: devfreq_cooling: add new registration functions with Energy Model

2020-12-03 Thread Lukasz Luba
On 12/2/20 11:49 AM, Ionela Voinescu wrote: On Wednesday 02 Dec 2020 at 11:14:02 (+), Lukasz Luba wrote: Hi Ionela, On 12/2/20 10:24 AM, Ionela Voinescu wrote: Hi Lukasz, On Wednesday 18 Nov 2020 at 12:03:56 (+), Lukasz Luba wrote: [snip] + struct device_node *np = NULL

Re: [PATCH 2/5] thermal: devfreq_cooling: get a copy of device status

2020-12-02 Thread Lukasz Luba
On 12/1/20 10:36 AM, Ionela Voinescu wrote: Hi, Sorry for the delay and for the noise on this older version. I first want to understand the code better. On Thursday 22 Oct 2020 at 11:55:28 (+0100), Lukasz Luba wrote: [..] +{ + /* Make some space if needed */ + if (status

Re: [PATCH 3/5] thermal: devfreq_cooling: add new registration functions with Energy Model

2020-12-02 Thread Lukasz Luba
On 12/1/20 2:05 PM, Ionela Voinescu wrote: Hi, On Thursday 22 Oct 2020 at 12:17:31 (+0100), Lukasz Luba wrote: [..] +/** + * devfreq_cooling_em_register_power() - Register devfreq cooling device with + * power information and attempt to register Energy Model (EM) It took me

[PATCH v2 0/5] Thermal devfreq cooling improvements with Energy Model

2020-11-19 Thread Lukasz Luba
tree, but it's here for consistency. The patch set is based on current next-20201118, which has new EM API in the pm/linux-next tree. changes: v2: - renamed freq_get_state() and related to perf_idx pattern as suggested by Ionela v1 [2] Regards, Lukasz Luba [1] https://lkml.org/lkml/2020/5/11

[PATCH v2 4/5] thermal: devfreq_cooling: remove old power model and use EM

2020-11-19 Thread Lukasz Luba
the needed structures. Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 302 ++ include/linux/devfreq_cooling.h | 17 -- 2 files changed, 96 insertions(+), 223 deletions(-) diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal

[PATCH v2 5/5] drm/panfrost: Register devfreq cooling and attempt to add Energy Model

2020-11-19 Thread Lukasz Luba
and created based on DT 'dynamic-power-coefficient', voltage and frequency. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Lukasz Luba --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost

[PATCH v2 1/5] thermal: devfreq_cooling: change tracing function and arguments

2020-11-19 Thread Lukasz Luba
Prepare for deleting the static and dynamic power calculation and clean the trace function. These two fields are going to be removed in the next changes. Reviewed-by: Steven Rostedt (VMware) # for tracing code Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 3 +-- include

[PATCH v2 2/5] thermal: devfreq_cooling: get a copy of device status

2020-11-19 Thread Lukasz Luba
of the status structure and use it for internal calculations. In addition this patch adds normalization function, which also makes sure that whatever data comes from the device, it is in a sane range. Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 52

[PATCH v2 3/5] thermal: devfreq_cooling: add new registration functions with Energy Model

2020-11-19 Thread Lukasz Luba
-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 99 ++- include/linux/devfreq_cooling.h | 22 +++ 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c index 925523694462

Re: [PATCH 2/5] thermal: devfreq_cooling: get a copy of device status

2020-10-23 Thread Lukasz Luba
Hi Daniel, On 10/14/20 3:34 PM, Daniel Lezcano wrote: On 21/09/2020 14:20, Lukasz Luba wrote: Devfreq cooling needs to now the correct status of the device in order to operate. Do not rely on Devfreq last_status which might be a stale data and get more up-to-date values of the load. Devfreq

Re: [PATCH 3/5] thermal: devfreq_cooling: add new registration functions with Energy Model

2020-10-23 Thread Lukasz Luba
On 10/7/20 1:07 PM, Ionela Voinescu wrote: Hi Lukasz, On Monday 21 Sep 2020 at 13:20:05 (+0100), Lukasz Luba wrote: The Energy Model (EM) framework supports devices such as Devfreq. Create new registration functions which automatically register EM for the thermal devfreq_cooling devices

Re: [PATCH 4/5] thermal: devfreq_cooling: remove old power model and use EM

2020-10-23 Thread Lukasz Luba
On 10/7/20 4:12 PM, Ionela Voinescu wrote: Hi Lukasz, On Monday 21 Sep 2020 at 13:20:06 (+0100), Lukasz Luba wrote: [..] /** - * freq_get_state() - get the cooling state corresponding to a frequency + * freq_get_state() - get the performance index corresponding to a frequency If we

Re: [PATCH 2/5] thermal: devfreq_cooling: get a copy of device status

2020-10-23 Thread Lukasz Luba
Hi Ionela, On 10/7/20 5:11 PM, Ionela Voinescu wrote: On Monday 21 Sep 2020 at 13:20:04 (+0100), Lukasz Luba wrote: Devfreq cooling needs to now the correct status of the device in order to operate. Do not rely on Devfreq last_status which might be a stale data and get more up-to-date values

[PATCH 2/5] thermal: devfreq_cooling: get a copy of device status

2020-09-22 Thread Lukasz Luba
of the status structure and use it for internal calculations. In addition this patch adds normalization function, which also makes sure that whatever data comes from the device, it is in a sane range. Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 52

[PATCH 3/5] thermal: devfreq_cooling: add new registration functions with Energy Model

2020-09-22 Thread Lukasz Luba
-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 99 ++- include/linux/devfreq_cooling.h | 22 +++ 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c index cf045bd4d16b

[PATCH 4/5] thermal: devfreq_cooling: remove old power model and use EM

2020-09-22 Thread Lukasz Luba
the needed structures. Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 282 +- include/linux/devfreq_cooling.h | 17 -- 2 files changed, 86 insertions(+), 213 deletions(-) diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal

[PATCH 0/5] Thermal devfreq cooling improvements with Energy Model

2020-09-22 Thread Lukasz Luba
tree, but it's here to consistency. The patch set is based on current next (next-20200921). Regards, Lukasz Luba [1] https://lkml.org/lkml/2020/5/11/326 Lukasz Luba (5): thermal: devfreq_cooling: change tracing function and arguments thermal: devfreq_cooling: get a copy of device status

[PATCH 5/5] drm/panfrost: Register devfreq cooling and attempt to add Energy Model

2020-09-22 Thread Lukasz Luba
and created based on DT 'dynamic-power-coefficient', voltage and frequency. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Lukasz Luba --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost

[PATCH 1/5] thermal: devfreq_cooling: change tracing function and arguments

2020-09-22 Thread Lukasz Luba
Prepare for deleting the static and dynamic power calculation and clean the trace function. These two fields are going to be removed in the next changes. Reviewed-by: Steven Rostedt (VMware) # for tracing code Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 3 +-- include

Re: [RESEND][PATCH v8 4/8] PM / EM: add support for other devices than CPUs in Energy Model

2020-06-25 Thread Lukasz Luba
On 6/24/20 4:21 PM, Rafael J. Wysocki wrote: On Wed, Jun 10, 2020 at 12:12 PM Lukasz Luba wrote: Add support for other devices than CPUs. The registration function does not require a valid cpumask pointer and is ready to handle new devices. Some of the internal structures has been

Re: [PATCH v8 0/8] Add support for devices in the Energy Model

2020-06-18 Thread Lukasz Luba
Hi Rafael, On 5/29/20 5:18 PM, Rafael J. Wysocki wrote: On Fri, May 29, 2020 at 5:01 PM Lukasz Luba wrote: Hi Rafael, On 5/27/20 10:58 AM, Lukasz Luba wrote: Hi all, Background of this version: This is the v8 of the patch set and is has smaller scope. I had to split the series into two

[RESEND][PATCH v8 4/8] PM / EM: add support for other devices than CPUs in Energy Model

2020-06-11 Thread Lukasz Luba
Add support for other devices than CPUs. The registration function does not require a valid cpumask pointer and is ready to handle new devices. Some of the internal structures has been reorganized in order to keep consistent view (like removing per_cpu pd pointers). Signed-off-by: Lukasz Luba

Re: [PATCH v8 4/8] PM / EM: add support for other devices than CPUs in Energy Model

2020-06-09 Thread Lukasz Luba
On 6/8/20 2:25 PM, Dan Carpenter wrote: It's not really a proper bug report so it doesn't deserve a reported-by. Thanks, though! regards, dan carpenter Thank you Dan for your work. This is very much appreciated! Lukasz ___ dri-devel mailing

Re: [PATCH v8 4/8] PM / EM: add support for other devices than CPUs in Energy Model

2020-06-09 Thread Lukasz Luba
On 6/8/20 1:51 PM, Dan Carpenter wrote: On Mon, Jun 08, 2020 at 01:34:37PM +0100, Lukasz Luba wrote: Hi Dan, Thank you for your analyzes. On 6/8/20 12:51 PM, Dan Carpenter wrote: Hi Lukasz, I love your patch! Perhaps something to improve: url: https://github.com/0day-ci/linux

Re: [PATCH v8 4/8] PM / EM: add support for other devices than CPUs in Energy Model

2020-06-09 Thread Lukasz Luba
Hi Dan, Thank you for your analyzes. On 6/8/20 12:51 PM, Dan Carpenter wrote: Hi Lukasz, I love your patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Lukasz-Luba/Add-support-for-devices-in-the-Energy-Model/20200527-180614 base: https://git.kernel.org

Re: [PATCH v8 4/8] PM / EM: add support for other devices than CPUs in Energy Model

2020-06-04 Thread Lukasz Luba
On 6/3/20 5:22 PM, Rafael J. Wysocki wrote: On Wed, Jun 3, 2020 at 6:12 PM Lukasz Luba wrote: On 6/3/20 4:40 PM, Rafael J. Wysocki wrote: On Wed, Jun 3, 2020 at 5:26 PM Lukasz Luba wrote: On 6/3/20 4:13 PM, Rafael J. Wysocki wrote: On Tue, Jun 2, 2020 at 1:31 PM Lukasz Luba wrote

Re: [PATCH v8 4/8] PM / EM: add support for other devices than CPUs in Energy Model

2020-06-04 Thread Lukasz Luba
On 6/3/20 4:13 PM, Rafael J. Wysocki wrote: On Tue, Jun 2, 2020 at 1:31 PM Lukasz Luba wrote: Hi Daniel, On 6/1/20 10:44 PM, Daniel Lezcano wrote: On 27/05/2020 11:58, Lukasz Luba wrote: Add support for other devices than CPUs. The registration function does not require a valid cpumask

Re: [PATCH v8 4/8] PM / EM: add support for other devices than CPUs in Energy Model

2020-06-04 Thread Lukasz Luba
On 6/3/20 4:40 PM, Rafael J. Wysocki wrote: On Wed, Jun 3, 2020 at 5:26 PM Lukasz Luba wrote: On 6/3/20 4:13 PM, Rafael J. Wysocki wrote: On Tue, Jun 2, 2020 at 1:31 PM Lukasz Luba wrote: Hi Daniel, On 6/1/20 10:44 PM, Daniel Lezcano wrote: On 27/05/2020 11:58, Lukasz Luba wrote

Re: [PATCH v8 4/8] PM / EM: add support for other devices than CPUs in Energy Model

2020-06-03 Thread Lukasz Luba
Hi Daniel, On 6/1/20 10:44 PM, Daniel Lezcano wrote: On 27/05/2020 11:58, Lukasz Luba wrote: Add support for other devices than CPUs. The registration function does not require a valid cpumask pointer and is ready to handle new devices. Some of the internal structures has been reorganized

Re: [PATCH v8 3/8] PM / EM: update callback structure and add device pointer

2020-06-02 Thread Lukasz Luba
On 5/29/20 6:43 PM, Daniel Lezcano wrote: On 27/05/2020 11:58, Lukasz Luba wrote: The Energy Model framework is going to support devices other that CPUs. In order to make this happen change the callback function and add pointer to a device as an argument. Update the related users to use new

Re: [PATCH v8 0/8] Add support for devices in the Energy Model

2020-05-30 Thread Lukasz Luba
Hi Rafael, On 5/27/20 10:58 AM, Lukasz Luba wrote: Hi all, Background of this version: This is the v8 of the patch set and is has smaller scope. I had to split the series into two: EM changes and thermal changes due to devfreq dependencies. The patches from v7 9-14 which change devfreq

Re: [PATCH v8 0/8] Add support for devices in the Energy Model

2020-05-30 Thread Lukasz Luba
On 5/29/20 5:18 PM, Rafael J. Wysocki wrote: On Fri, May 29, 2020 at 5:01 PM Lukasz Luba wrote: Hi Rafael, On 5/27/20 10:58 AM, Lukasz Luba wrote: Hi all, Background of this version: This is the v8 of the patch set and is has smaller scope. I had to split the series into two: EM

[PATCH v8 8/8] OPP: refactor dev_pm_opp_of_register_em() and update related drivers

2020-05-28 Thread Lukasz Luba
-by: Daniel Lezcano Signed-off-by: Lukasz Luba --- drivers/cpufreq/cpufreq-dt.c | 2 +- drivers/cpufreq/imx6q-cpufreq.c| 2 +- drivers/cpufreq/mediatek-cpufreq.c | 2 +- drivers/cpufreq/omap-cpufreq.c | 2 +- drivers/cpufreq/qcom-cpufreq-hw.c | 2

[PATCH v8 2/8] PM / EM: introduce em_dev_register_perf_domain function

2020-05-28 Thread Lukasz Luba
-by: Daniel Lezcano Acked-by: Quentin Perret Signed-off-by: Lukasz Luba --- include/linux/energy_model.h | 13 ++-- kernel/power/energy_model.c | 40 ++-- 2 files changed, 45 insertions(+), 8 deletions(-) diff --git a/include/linux/energy_model.h b

[PATCH v8 7/8] Documentation: power: update Energy Model description

2020-05-28 Thread Lukasz Luba
The Energy Model framework supports also other devices than CPUs. Update related information and add description for the new usage. Acked-by: Daniel Lezcano Acked-by: Quentin Perret Signed-off-by: Lukasz Luba --- Documentation/power/energy-model.rst | 135 +++ 1 file

[PATCH v8 0/8] Add support for devices in the Energy Model

2020-05-28 Thread Lukasz Luba
req driver which needs to be updated to the new API The v1 can be found here [1]. Regards, Lukasz Luba [1] https://lkml.org/lkml/2020/1/16/619 [2] https://lkml.org/lkml/2020/2/6/377 [3] https://lkml.org/lkml/2020/2/21/1910 [4] https://lkml.org/lkml/2020/3/9/471 [5] https://lkml.org/lkml/2020/3/18/351

[PATCH v8 4/8] PM / EM: add support for other devices than CPUs in Energy Model

2020-05-28 Thread Lukasz Luba
Add support for other devices than CPUs. The registration function does not require a valid cpumask pointer and is ready to handle new devices. Some of the internal structures has been reorganized in order to keep consistent view (like removing per_cpu pd pointers). Signed-off-by: Lukasz Luba

[PATCH v8 5/8] PM / EM: remove em_register_perf_domain

2020-05-28 Thread Lukasz Luba
Remove old function em_register_perf_domain which is no longer needed. There is em_dev_register_perf_domain that covers old use cases and new as well. Acked-by: Daniel Lezcano Acked-by: Quentin Perret Signed-off-by: Lukasz Luba --- include/linux/energy_model.h | 7 --- kernel/power

[PATCH v8 1/8] PM / EM: change naming convention from 'capacity' to 'performance'

2020-05-28 Thread Lukasz Luba
Acked-by: Quentin Perret Signed-off-by: Lukasz Luba --- drivers/thermal/cpufreq_cooling.c | 12 ++--- include/linux/energy_model.h | 86 +-- kernel/power/energy_model.c | 44 kernel/sched/topology.c | 20 +++ 4 files changed, 84

[PATCH v8 3/8] PM / EM: update callback structure and add device pointer

2020-05-28 Thread Lukasz Luba
-by: Lukasz Luba --- drivers/cpufreq/scmi-cpufreq.c | 11 +++ drivers/opp/of.c | 9 ++--- include/linux/energy_model.h | 15 --- kernel/power/energy_model.c| 9 + 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/drivers/cpufreq

[PATCH v8 6/8] PM / EM: change name of em_pd_energy to em_cpu_energy

2020-05-28 Thread Lukasz Luba
description to warn of potential wrong usage for other devices. Acked-by: Daniel Lezcano Acked-by: Quentin Perret Signed-off-by: Lukasz Luba --- include/linux/energy_model.h | 11 --- kernel/sched/fair.c | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git

Re: [PATCH v7 00/15] Add support for devices in the Energy Model

2020-05-23 Thread Lukasz Luba
Hi Daniel, On 5/22/20 11:43 AM, Daniel Lezcano wrote: Hi Lukasz, On 11/05/2020 13:18, Lukasz Luba wrote: Hi all, This patch set introduces support for devices in the Energy Model (EM) framework. It will unify the power model for thermal subsystem. It will make simpler to add support for new

Re: [PATCH v7 04/15] PM / EM: add support for other devices than CPUs in Energy Model

2020-05-13 Thread Lukasz Luba
On 5/11/20 2:43 PM, Quentin Perret wrote: Hey Lukasz, On Monday 11 May 2020 at 12:19:01 (+0100), Lukasz Luba wrote: @@ -27,12 +29,15 @@ struct em_perf_state { * em_perf_domain - Performance domain * @table:List of performance states, in ascending order

Re: [PATCH v7 03/15] PM / EM: update callback structure and add device pointer

2020-05-13 Thread Lukasz Luba
Hi Quentin, On 5/11/20 12:57 PM, Quentin Perret wrote: On Monday 11 May 2020 at 12:19:00 (+0100), Lukasz Luba wrote: diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c index 61623e2ff149..11ee24e06d12 100644 --- a/drivers/cpufreq/scmi-cpufreq.c +++ b/drivers/cpufreq

[PATCH v7 13/15] thermal: devfreq_cooling: remove old power model and use EM

2020-05-12 Thread Lukasz Luba
the needed structures. Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 282 +- include/linux/devfreq_cooling.h | 17 -- 2 files changed, 86 insertions(+), 213 deletions(-) diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal

[PATCH v7 08/15] OPP: refactor dev_pm_opp_of_register_em() and update related drivers

2020-05-12 Thread Lukasz Luba
-by: Daniel Lezcano Signed-off-by: Lukasz Luba --- drivers/cpufreq/cpufreq-dt.c | 2 +- drivers/cpufreq/imx6q-cpufreq.c| 2 +- drivers/cpufreq/mediatek-cpufreq.c | 2 +- drivers/cpufreq/omap-cpufreq.c | 2 +- drivers/cpufreq/qcom-cpufreq-hw.c | 2

[PATCH v7 01/15] PM / EM: change naming convention from 'capacity' to 'performance'

2020-05-12 Thread Lukasz Luba
Signed-off-by: Lukasz Luba --- drivers/thermal/cpufreq_cooling.c | 12 ++--- include/linux/energy_model.h | 86 +-- kernel/power/energy_model.c | 44 kernel/sched/topology.c | 20 +++ 4 files changed, 84 insertions(+), 78 deletions

[PATCH v7 09/15] thermal: devfreq_cooling: change tracing function and arguments

2020-05-12 Thread Lukasz Luba
Prepare for deleting the static and dynamic power calculation and clean the trace function. These two fields are going to be removed in the next changes. Reviewed-by: Steven Rostedt (VMware) # for tracing code Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 3 +-- include

[PATCH v7 03/15] PM / EM: update callback structure and add device pointer

2020-05-12 Thread Lukasz Luba
The Energy Model framework is going to support devices other that CPUs. In order to make this happen change the callback function and add pointer to a device as an argument. Update the related users to use new function and new callback from the Energy Model. Signed-off-by: Lukasz Luba

[PATCH v7 00/15] Add support for devices in the Energy Model

2020-05-12 Thread Lukasz Luba
ich did not provide EM - added Steven's Reviewed-by to trace code in thermal - added another CPUFreq driver which needs to be updated to the new API The v1 can be found here [1]. Regards, Lukasz Luba [1] https://lkml.org/lkml/2020/1/16/619 [2] https://lkml.org/lkml/2020/2/6/377 [3] https://lkml.

[PATCH v7 04/15] PM / EM: add support for other devices than CPUs in Energy Model

2020-05-12 Thread Lukasz Luba
Model structures, they are protected with kref. Signed-off-by: Lukasz Luba --- include/linux/device.h | 5 + include/linux/energy_model.h | 28 +++-- kernel/power/energy_model.c | 237 --- 3 files changed, 187 insertions(+), 83 deletions(-) diff --git

[PATCH v7 05/15] PM / EM: remove em_register_perf_domain

2020-05-12 Thread Lukasz Luba
Remove old function em_register_perf_domain which is no longer needed. There is em_dev_register_perf_domain that covers old use cases and new as well. Acked-by: Daniel Lezcano Signed-off-by: Lukasz Luba --- include/linux/energy_model.h | 7 --- kernel/power/energy_model.c | 25

[PATCH v7 10/15] thermal: devfreq_cooling: get device load and frequency directly

2020-05-12 Thread Lukasz Luba
comes from the device, it is in a sane range. Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 38 +++ 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c index 52694d4bd819

[PATCH v7 14/15] thermal: devfreq_cooling: update license to use SPDX

2020-05-12 Thread Lukasz Luba
Change the license headers and use SPDX standard. Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 12 ++-- include/linux/devfreq_cooling.h | 12 ++-- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/drivers/thermal/devfreq_cooling.c b/drivers

[PATCH v7 02/15] PM / EM: introduce em_dev_register_perf_domain function

2020-05-12 Thread Lukasz Luba
-by: Daniel Lezcano Signed-off-by: Lukasz Luba --- include/linux/energy_model.h | 13 ++-- kernel/power/energy_model.c | 40 ++-- 2 files changed, 45 insertions(+), 8 deletions(-) diff --git a/include/linux/energy_model.h b/include/linux/energy_model.h

[PATCH v7 15/15] drm/panfrost: Register devfreq cooling and attempt to add Energy Model

2020-05-12 Thread Lukasz Luba
and created based on DT 'dynamic-power-coefficient', voltage and frequency. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Lukasz Luba --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panfrost

[PATCH v7 12/15] thermal: devfreq_cooling: add new registration functions with Energy Model

2020-05-12 Thread Lukasz Luba
-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 99 ++- include/linux/devfreq_cooling.h | 22 +++ 2 files changed, 120 insertions(+), 1 deletion(-) diff --git a/drivers/thermal/devfreq_cooling.c b/drivers/thermal/devfreq_cooling.c index 36ec6a48606c

[PATCH v7 11/15] thermal: devfreq_cooling: work on a copy of device status

2020-05-12 Thread Lukasz Luba
Devfreq framework can change the device status in the background. To mitigate this situation make a copy of the status structure and use it for internal calculations. Signed-off-by: Lukasz Luba --- drivers/thermal/devfreq_cooling.c | 14 ++ 1 file changed, 10 insertions(+), 4

[PATCH v7 07/15] Documentation: power: update Energy Model description

2020-05-12 Thread Lukasz Luba
The Energy Model framework supports also other devices than CPUs. Update related information and add description for the new usage. Acked-by: Daniel Lezcano Signed-off-by: Lukasz Luba --- Documentation/power/energy-model.rst | 135 +++ 1 file changed, 75 insertions

[PATCH v7 06/15] PM / EM: change name of em_pd_energy to em_cpu_energy

2020-05-12 Thread Lukasz Luba
description to warn of potential wrong usage for other devices. Acked-by: Daniel Lezcano Signed-off-by: Lukasz Luba --- include/linux/energy_model.h | 11 --- kernel/sched/fair.c | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/linux

  1   2   >