Re: [PATCH v3 06/14] drm/panthor: Add the devfreq logical block

2023-12-05 Thread Clément Péron
ed on the panfrost implementation, > the only difference being that we don't count device users, because > the idle/active state will be managed by the scheduler logic. > > v3: > - Add acks for the MIT/GPL2 relicensing > > v2: > - Added in v2 > > Cc: Clément Péron # MIT+GPL2

Re: [PATCH v3 00/14] drm: Add a driver for CSF-based Mali GPUs

2023-12-04 Thread Clément Péron
R adding v10 support on top of panthor is available here [6]. > > Regarding the GPL2+MIT relicensing, Liviu did an audit and found two > more people that I didn't spot initially: Clément Péron for the devfreq > code, and Alexey Sheplyakov for some bits in panthor_gpu.c. Both are > Cc-

Re: [PATCH v4 3/5] arm64: dts: allwinner: h6: Add GPU OPP table

2022-09-06 Thread Clément Péron
Hi Jernej, On Tue, 6 Sept 2022 at 21:10, Jernej Škrabec wrote: > > Dne torek, 06. september 2022 ob 17:30:32 CEST je Clément Péron napisal(a): > > Add an Operating Performance Points table for the GPU to > > enable Dynamic Voltage & Frequency Scaling on the H6. > >

[PATCH v4 5/5] arm64: dts: allwinner: beelink-gs1: Enable GPU OPP

2022-09-06 Thread Clément Péron
Enable GPU OPP table for Beelink GS1. Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts

[PATCH v4 1/5] arm64: defconfig: Enable devfreq cooling device

2022-09-06 Thread Clément Péron
Devfreq cooling device framework is used in Panfrost to throttle GPU in order to regulate its temperature. Enable this driver for ARM64 SoC. Signed-off-by: Clément Péron Acked-by: Jernej Skrabec --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64

[PATCH v4 2/5] arm64: dts: allwinner: h6: Add cooling map for GPU

2022-09-06 Thread Clément Péron
Add a simple cooling map for the GPU. This cooling map come from the vendor kernel 4.9 with a 2°C hysteresis added. Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 51 +++- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/arch/arm64

[PATCH v4 3/5] arm64: dts: allwinner: h6: Add GPU OPP table

2022-09-06 Thread Clément Péron
-off-by: Clément Péron --- .../boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi | 87 +++ 1 file changed, 87 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi b/arch/arm64/boot

[PATCH v4 4/5] drm/panfrost: devfreq: set opp to the recommended one to configure regulator

2022-09-06 Thread Clément Péron
panfrost_devfreq_init() to enable the regulator, this will properly configure and enable the regulator and will avoid any switch off by regulator_late_cleanup(). Suggested-by: Viresh Kumar Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 11 +++ 1 file changed, 11 insertions

[PATCH v4 0/5] Allwinner H6 GPU devfreq

2022-09-06 Thread Clément Péron
ix to enable regulator - Remove always-on regulator from device-tree - Update cooling map from vendor kernel Clément Péron (5): arm64: defconfig: Enable devfreq cooling device arm64: dts: allwinner: h6: Add cooling map for GPU arm64: dts: allwinner: h6: Add GPU OPP table drm/panfrost: de

Re: [PATCH v3 4/5] drm/panfrost: devfreq: set opp to the recommended one to configure and enable regulator

2022-09-06 Thread Clément Péron
tched off, which makes my > > board hang. > > Cool, From your testing looks like no one tested this feature with > mali GPU on mainline?? Or no one without always-on. Clement > > Cheers, > Biju > > > > > > Like Viresh recommends I will send an updat

Re: [PATCH v3 4/5] drm/panfrost: devfreq: set opp to the recommended one to configure and enable regulator

2022-09-06 Thread Clément Péron
ent > > > > > > > > > > > > > > Call dev_pm_opp_set_opp() with the recommend OPP in > > > > panfrost_devfreq_init() to enable the regulator and avoid any switch > > > > off by regulator_late_cleanup(). > > > > > > >

[PATCH v3 3/5] arm64: dts: allwinner: h6: Add GPU OPP table

2022-09-05 Thread Clément Péron
-off-by: Clément Péron --- .../boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi | 87 +++ 1 file changed, 87 insertions(+) create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-gpu-opp.dtsi b/arch/arm64/boot

[PATCH v3 5/5] arm64: dts: allwinner: beelink-gs1: Enable GPU OPP

2022-09-05 Thread Clément Péron
Enable GPU OPP table for Beelink GS1. Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts

[PATCH v3 2/5] arm64: dts: allwinner: h6: Add cooling map for GPU

2022-09-05 Thread Clément Péron
Add a simple cooling map for the GPU. This cooling map come from the vendor kernel 4.9 with a 2°C hysteresis added. Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 51 +++- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/arch/arm64

Re: [PATCH v3 4/5] drm/panfrost: devfreq: set opp to the recommended one to configure and enable regulator

2022-09-05 Thread Clément Péron
p_set_opp() with the recommend OPP in > > panfrost_devfreq_init() to enable the regulator and avoid any switch off > > by regulator_late_cleanup(). > > > > Suggested-by: Viresh Kumar > > Signed-off-by: Clément Péron > > --- > > drivers/gpu/drm/pa

[PATCH v3 1/5] arm64: defconfig: Enable devfreq cooling device

2022-09-05 Thread Clément Péron
Devfreq cooling device framework is used in Panfrost to throttle GPU in order to regulate its temperature. Enable this driver for ARM64 SoC. Signed-off-by: Clément Péron Acked-by: Jernej Skrabec --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64

[PATCH v3 0/5] Allwinner H6 GPU devfreq

2022-09-05 Thread Clément Péron
oling map from vendor kernel Clément Péron (5): arm64: defconfig: Enable devfreq cooling device arm64: dts: allwinner: h6: Add cooling map for GPU arm64: dts: allwinner: h6: Add GPU OPP table drm/panfrost: devfreq: set opp to the recommended one to configure and enable regulator arm64

[PATCH v3 4/5] drm/panfrost: devfreq: set opp to the recommended one to configure and enable regulator

2022-09-05 Thread Clément Péron
eanup(). Suggested-by: Viresh Kumar Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gpu/drm/panfrost/panfrost_devfreq.c index 5110cd9b2425..67b242407156 100644

Re: devfreq and panfrost on Allwinner H6

2020-11-22 Thread Clément Péron
HI Tomeu, On Wed, 7 Oct 2020 at 19:49, Clément Péron wrote: > > Hi Tomeu, > > On Wed, 7 Oct 2020 at 10:58, Tomeu Vizoso wrote: > > > > Hi Clément, > > > > Have just noticed that my Pine H64 board hangs when I try to set the > > performance governor fo

Re: devfreq and panfrost on Allwinner H6

2020-10-08 Thread Clément Péron
Hi Tomeu, On Wed, 7 Oct 2020 at 10:58, Tomeu Vizoso wrote: > > Hi Clément, > > Have just noticed that my Pine H64 board hangs when I try to set the > performance governor for the GPU devfreq. > > Is this a known bug? Yes it is. I try to summarize everything in this message: https://lkml.org/lkml

Re: [PATCH v2 13/14] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table

2020-08-29 Thread Clément Péron
Hi Maxime, On Tue, 25 Aug 2020 at 15:35, Maxime Ripard wrote: > > Hi Clement, > > On Mon, Aug 03, 2020 at 09:54:05AM +0200, Clément Péron wrote: > > Hi Maxime and All, > > > > On Sat, 4 Jul 2020 at 16:56, Clément Péron wrote: > > > > > > Hi

Re: [PATCH v5 00/14] Add regulator devfreq support to Panfrost

2020-08-10 Thread Clément Péron
On Fri, 7 Aug 2020 at 18:28, Clément Péron wrote: > > Hi Rob, > > On Fri, 7 Aug 2020 at 18:13, Rob Herring wrote: > > > > On Fri, Jul 10, 2020 at 3:54 AM Clément Péron wrote: > > > > > > Hi, > > > > > > This serie cleans and adds regul

Re: [PATCH v5 00/14] Add regulator devfreq support to Panfrost

2020-08-10 Thread Clément Péron
Hi Rob, On Fri, 7 Aug 2020 at 18:13, Rob Herring wrote: > > On Fri, Jul 10, 2020 at 3:54 AM Clément Péron wrote: > > > > Hi, > > > > This serie cleans and adds regulator support to Panfrost devfreq. > > This is mostly based on comment for the freshly introduc

Re: [PATCH v2 13/14] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table

2020-08-03 Thread Clément Péron
Hi Maxime and All, On Sat, 4 Jul 2020 at 16:56, Clément Péron wrote: > > Hi Maxime, > > On Sat, 4 Jul 2020 at 14:13, Maxime Ripard wrote: > > > > Hi, > > > > On Sat, Jul 04, 2020 at 12:25:34PM +0200, Clément Péron wrote: > > > Add an Oper

[PATCH v5 00/14] Add regulator devfreq support to Panfrost

2020-07-14 Thread Clément Péron
rename error labels patch Clément Péron (14): drm/panfrost: avoid static declaration drm/panfrost: clean headers in devfreq drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle drm/panfrost: introduce panfrost_devfreq struct drm/panfrost: use spinlock instead of

[PATCH v4 09/14] drm/panfrost: dynamically alloc regulators

2020-07-14 Thread Clément Péron
We will later introduce regulators managed by OPP. Only alloc regulators when it's needed. This also help use to release the regulators only when they are allocated. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/pan

[PATCH v5 04/14] drm/panfrost: introduce panfrost_devfreq struct

2020-07-14 Thread Clément Péron
Introduce a proper panfrost_devfreq to deal with devfreq variables. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 76 - drivers/gpu/drm/panfrost/panfrost_devfreq.h | 20

Re: [PATCH v3 13/14] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table

2020-07-14 Thread Clément Péron
Hi, On Fri, 10 Jul 2020 at 15:45, Piotr Oniszczuk wrote: > > > > > Wiadomość napisana przez Clément Péron w dniu > > 09.07.2020, o godz. 16:03: > > > > Add an Operating Performance Points table for the GPU to > > enable Dynamic Voltage & Frequency S

[PATCH v4 03/14] drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle

2020-07-14 Thread Clément Péron
This use devfreq variable that will be lock with spinlock in future patches. We should either introduce a function to access this one but as devfreq is optional let's just remove it. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gp

[PATCH v4 05/14] drm/panfrost: use spinlock instead of atomic

2020-07-14 Thread Clément Péron
Convert busy_count to a simple int protected by spinlock. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 43 +++-- drivers/gpu/drm/panfrost/panfrost_devfreq.h | 9 - 2 files changed

[PATCH v4 07/14] drm/panfrost: rename error labels in device_init

2020-07-14 Thread Clément Péron
Rename goto labels in device_init it will be easier to maintain. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Steven Price Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_device.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a

[PATCH v5 06/14] drm/panfrost: properly handle error in probe

2020-07-14 Thread Clément Péron
Introduce a boolean to know if opp table has been added. With this, we can call panfrost_devfreq_fini() in case of error and release what has been initialised. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost

[PATCH v5 05/14] drm/panfrost: use spinlock instead of atomic

2020-07-14 Thread Clément Péron
Convert busy_count to a simple int protected by spinlock. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 43 +++-- drivers/gpu/drm/panfrost/panfrost_devfreq.h | 9 - 2 files changed

[PATCH v5 10/14] drm/panfrost: add regulators to devfreq

2020-07-14 Thread Clément Péron
Some OPP tables specify voltage for each frequency. Devfreq can handle these regulators but they should be get only 1 time to avoid issue and know who is in charge. If OPP table is probe don't init regulator. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément

[PATCH v5 09/14] drm/panfrost: dynamically alloc regulators

2020-07-14 Thread Clément Péron
We will later introduce regulators managed by OPP. Only alloc regulators when it's needed. This also help use to release the regulators only when they are allocated. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/pan

[PATCH v4 02/14] drm/panfrost: clean headers in devfreq

2020-07-14 Thread Clément Péron
Don't include not required headers and sort them. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/pan

[PATCH v4 11/14] arm64: defconfig: Enable devfreq cooling device

2020-07-14 Thread Clément Péron
Devfreq cooling device framework is used in Panfrost to throttle GPU in order to regulate its temperature. Enable this driver for ARM64 SoC. Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

[PATCH v4 08/14] drm/panfrost: move devfreq_init()/fini() in device

2020-07-14 Thread Clément Péron
_init() and devfreq_fini() here. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Steven Price Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_device.c | 12 +++- drivers/gpu/drm/panfrost/panfrost_drv.c| 15 ++- 2 files changed, 13 insertions(+), 14 dele

[PATCH v5 14/14] [DO NOT MERGE] arm64: dts: allwinner: force GPU regulator to be always

2020-07-14 Thread Clément Péron
Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts index 3f7ceeb1a767..14257f7476b8 100644

Re: [PATCH v4 04/14] drm/panfrost: introduce panfrost_devfreq struct

2020-07-14 Thread Clément Péron
Hi, On Fri, 10 Jul 2020 at 11:25, Clément Péron wrote: > > Introduce a proper panfrost_devfreq to deal with devfreq variables. > > Reviewed-by: Steven Price > Reviewed-by: Alyssa Rosenzweig > Signed-off-by: Clément Péron > --- > drivers/gpu/drm/panfrost

[PATCH v4 10/14] drm/panfrost: add regulators to devfreq

2020-07-14 Thread Clément Péron
Some OPP tables specify voltage for each frequency. Devfreq can handle these regulators but they should be get only 1 time to avoid issue and know who is in charge. If OPP table is probe don't init regulator. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément

[PATCH v4 14/14] [DO NOT MERGE] arm64: dts: allwinner: force GPU regulator to be always

2020-07-14 Thread Clément Péron
Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts index 3f7ceeb1a767..14257f7476b8 100644

[PATCH v5 11/14] arm64: defconfig: Enable devfreq cooling device

2020-07-14 Thread Clément Péron
Devfreq cooling device framework is used in Panfrost to throttle GPU in order to regulate its temperature. Enable this driver for ARM64 SoC. Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

[PATCH v5 12/14] arm64: dts: allwinner: h6: Add cooling map for GPU

2020-07-14 Thread Clément Péron
Add a simple cooling map for the GPU. Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 22 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts

[PATCH v5 08/14] drm/panfrost: move devfreq_init()/fini() in device

2020-07-14 Thread Clément Péron
_init() and devfreq_fini() here. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Steven Price Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_device.c | 12 +++- drivers/gpu/drm/panfrost/panfrost_drv.c| 15 ++- 2 files changed, 13 insertions(+), 14 dele

[PATCH v4 12/14] arm64: dts: allwinner: h6: Add cooling map for GPU

2020-07-14 Thread Clément Péron
Add a simple cooling map for the GPU. Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 22 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts

[PATCH v5 07/14] drm/panfrost: rename error labels in device_init

2020-07-14 Thread Clément Péron
Rename goto labels in device_init it will be easier to maintain. Reviewed-by: Alyssa Rosenzweig Reviewed-by: Steven Price Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_device.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a

[PATCH v4 06/14] drm/panfrost: properly handle error in probe

2020-07-14 Thread Clément Péron
Introduce a boolean to know if opp table has been added. With this, we can call panfrost_devfreq_fini() in case of error and release what has been initialised. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost

[PATCH v5 01/14] drm/panfrost: avoid static declaration

2020-07-14 Thread Clément Péron
This declaration can be avoided so change it. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 38 ++--- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v5 03/14] drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle

2020-07-14 Thread Clément Péron
This use devfreq variable that will be lock with spinlock in future patches. We should either introduce a function to access this one but as devfreq is optional let's just remove it. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gp

[PATCH v5 13/14] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table

2020-07-14 Thread Clément Péron
-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 80 1 file changed, 80 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 1c939c55aaea..16c3ad8abd9d 100644 --- a/arch/arm64/

[PATCH v4 13/14] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table

2020-07-14 Thread Clément Péron
-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 80 1 file changed, 80 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 1c939c55aaea..16c3ad8abd9d 100644 --- a/arch/arm64/

[PATCH v4 04/14] drm/panfrost: introduce panfrost_devfreq struct

2020-07-14 Thread Clément Péron
Introduce a proper panfrost_devfreq to deal with devfreq variables. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 76 - drivers/gpu/drm/panfrost/panfrost_devfreq.h | 20

[PATCH v4 00/14] Add regulator devfreq support to Panfrost

2020-07-14 Thread Clément Péron
(introduce in v2) - Call err_fini in case opp_add_table failed Changes since v1: - Collect Steven Price reviewed-by tags - Fix spinlock comment - Drop OPP clock-name patch - Drop device_property_test patch - Add rename error labels patch Clément Péron (14): drm/panfrost: avoid static

[PATCH v5 02/14] drm/panfrost: clean headers in devfreq

2020-07-14 Thread Clément Péron
Don't include not required headers and sort them. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/pan

[PATCH v4 01/14] drm/panfrost: avoid static declaration

2020-07-14 Thread Clément Péron
This declaration can be avoided so change it. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 38 ++--- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v3 04/14] drm/panfrost: introduce panfrost_devfreq struct

2020-07-10 Thread Clément Péron
Introduce a proper panfrost_devfreq to deal with devfreq variables. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 76 - drivers/gpu/drm/panfrost/panfrost_devfreq.h | 20

[PATCH v3 14/14] [DO NOT MERGE] arm64: dts: allwinner: force GPU regulator to be always

2020-07-10 Thread Clément Péron
Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts index 3f7ceeb1a767..14257f7476b8 100644

[PATCH v3 13/14] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table

2020-07-10 Thread Clément Péron
-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 80 1 file changed, 80 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 8f514a2169aa..a69f9e09a829 100644 --- a/arch/arm64/

[PATCH v3 10/14] drm/panfrost: add regulators to devfreq

2020-07-10 Thread Clément Péron
Some OPP tables specify voltage for each frequency. Devfreq can handle these regulators but they should be get only 1 time to avoid issue and know who is in charge. If OPP table is probe don't init regulator. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément

[PATCH v3 12/14] arm64: dts: allwinner: h6: Add cooling map for GPU

2020-07-10 Thread Clément Péron
Add a simple cooling map for the GPU. Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 22 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts

[PATCH v3 06/14] drm/panfrost: properly handle error in probe

2020-07-10 Thread Clément Péron
Introduce a boolean to know if opp table has been added. With this, we can call panfrost_devfreq_fini() in case of error and release what has been initialised. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost

[PATCH v3 08/14] drm/panfrost: move devfreq_init()/fini() in device

2020-07-10 Thread Clément Péron
_init() and devfreq_fini() here. Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_device.c | 12 +++- drivers/gpu/drm/panfrost/panfrost_drv.c| 15 ++- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/driver

[PATCH v3 11/14] arm64: defconfig: Enable devfreq cooling device

2020-07-10 Thread Clément Péron
Devfreq cooling device framework is used in Panfrost to throttle GPU in order to regulate its temperature. Enable this driver for ARM64 SoC. Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

Re: [PATCH v3 00/14] Add regulator devfreq support to Panfrost

2020-07-10 Thread Clément Péron
Hi, On Thu, 9 Jul 2020 at 16:03, Clément Péron wrote: > > Hi, > > This serie cleans and adds regulator support to Panfrost devfreq. > This is mostly based on comment for the freshly introduced lima > devfreq. > > We need to add regulator support because on Allwinner the

[PATCH v3 07/14] drm/panfrost: rename error labels in device_init

2020-07-10 Thread Clément Péron
Rename goto labels in device_init it will be easier to maintain. Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_device.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/panfrost

[PATCH v3 00/14] Add regulator devfreq support to Panfrost

2020-07-10 Thread Clément Péron
Price reviewed-by tags - Fix spinlock comment - Drop OPP clock-name path - Drop device_property_test patch - Add rename error labels patch Clément Péron (14): drm/panfrost: avoid static declaration drm/panfrost: clean headers in devfreq drm/panfrost: don't use pfdevfreq.busy_cou

[PATCH v3 05/14] drm/panfrost: use spinlock instead of atomic

2020-07-10 Thread Clément Péron
Convert busy_count to a simple int protected by spinlock. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 43 +++-- drivers/gpu/drm/panfrost/panfrost_devfreq.h | 9 - 2 files changed

[PATCH v3 09/14] drm/panfrost: dynamically alloc regulators

2020-07-10 Thread Clément Péron
We will later introduce regulators managed by OPP. Only alloc regulators when it's needed. This also help use to release the regulators only when they are allocated. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/pan

[PATCH v3 01/14] drm/panfrost: avoid static declaration

2020-07-10 Thread Clément Péron
This declaration can be avoided so change it. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 38 ++--- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v3 02/14] drm/panfrost: clean headers in devfreq

2020-07-10 Thread Clément Péron
Don't include not required headers and sort them. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/pan

[PATCH v3 03/14] drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle

2020-07-10 Thread Clément Péron
This use devfreq variable that will be lock with spinlock in future patches. We should either introduce a function to access this one but as devfreq is optional let's just remove it. Reviewed-by: Steven Price Reviewed-by: Alyssa Rosenzweig Signed-off-by: Clément Péron --- drivers/gp

[PATCH v2 04/14] drm/panfrost: introduce panfrost_devfreq struct

2020-07-06 Thread Clément Péron
Introduce a proper panfrost_devfreq to deal with devfreq variables. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 76 - drivers/gpu/drm/panfrost/panfrost_devfreq.h | 20 +- drivers/gpu/drm/panfrost

[PATCH v2 09/14] drm/panfrost: dynamically alloc regulators

2020-07-06 Thread Clément Péron
We will later introduce regulators managed by OPP. Only alloc regulators when it's needed. This also help use to release the regulators only when they are allocated. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_device.c

[PATCH v2 02/14] drm/panfrost: clean headers in devfreq

2020-07-06 Thread Clément Péron
Don't include not required headers and sort them. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b/drivers/gp

[PATCH v2 05/14] drm/panfrost: use spinlock instead of atomic

2020-07-06 Thread Clément Péron
Convert busy_count to a simple int protected by spinlock. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 43 +++-- drivers/gpu/drm/panfrost/panfrost_devfreq.h | 9 - 2 files changed, 40 insertions(+), 12 deletions

[PATCH v2 03/14] drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle

2020-07-06 Thread Clément Péron
This use devfreq variable that will be lock with spinlock in future patches. We should either introduce a function to access this one but as devfreq is optional let's just remove it. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_job.c | 4 --

Re: [PATCH v2 14/14] [DO NOT MERGE] arm64: dts: allwinner: force GPU regulator to be always

2020-07-06 Thread Clément Péron
Hi, On Sat, 4 Jul 2020 at 12:25, Clément Péron wrote: > > Signed-off-by: Clément Péron > --- > arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts &g

[PATCH v2 11/14] arm64: defconfig: Enable devfreq cooling device

2020-07-06 Thread Clément Péron
Devfreq cooling device framework is used in Panfrost to throttle GPU in order to regulate its temperature. Enable this driver for ARM64 SoC. Signed-off-by: Clément Péron --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch

[PATCH v2 13/14] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table

2020-07-06 Thread Clément Péron
-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 80 1 file changed, 80 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index 8f514a2169aa..a69f9e09a829 100644 --- a/arch/arm64/

Re: [PATCH v2 13/14] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table

2020-07-06 Thread Clément Péron
Hi Maxime, On Sat, 4 Jul 2020 at 14:13, Maxime Ripard wrote: > > Hi, > > On Sat, Jul 04, 2020 at 12:25:34PM +0200, Clément Péron wrote: > > Add an Operating Performance Points table for the GPU to > > enable Dynamic Voltage & Frequency Scaling on the H6. > >

[PATCH v2 10/14] drm/panfrost: add regulators to devfreq

2020-07-06 Thread Clément Péron
Some OPP tables specify voltage for each frequency. Devfreq can handle these regulators but they should be get only 1 time to avoid issue and know who is in charge. If OPP table is probe don't init regulator. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/pan

[PATCH v2 12/14] arm64: dts: allwinner: h6: Add cooling map for GPU

2020-07-06 Thread Clément Péron
Add a simple cooling map for the GPU. Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 22 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index

[PATCH v2 00/14] Add regulator devfreq support to Panfrost

2020-07-06 Thread Clément Péron
the actual behavior and introduce a proper panfrost_devfreq struct. Regards, Clément Clément Péron (14): drm/panfrost: avoid static declaration drm/panfrost: clean headers in devfreq drm/panfrost: don't use pfdevfreq.busy_count to know if hw is idle drm/panfrost: introduce panfrost_de

Re: [PATCH v2 00/14] Add regulator devfreq support to Panfrost

2020-07-06 Thread Clément Péron
Hi, On Sat, 4 Jul 2020 at 12:25, Clément Péron wrote: > > Hi, > > This serie cleans and adds regulator support to Panfrost devfreq. > This is mostly based on comment for the freshly introduced lima > devfreq. > > We need to add regulator support because on Allwinner the

[PATCH v2 07/14] drm/panfrost: rename error labels in device_init

2020-07-06 Thread Clément Péron
Rename goto labels in device_init it will be easier to maintain. Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_device.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm

[PATCH v2 01/14] drm/panfrost: avoid static declaration

2020-07-06 Thread Clément Péron
This declaration can be avoided so change it. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 38 ++--- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_devfreq.c b

[PATCH v2 08/14] drm/panfrost: move devfreq_init()/fini() in device

2020-07-06 Thread Clément Péron
_init() and devfreq_fini() here. Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_device.c | 12 +++- drivers/gpu/drm/panfrost/panfrost_drv.c| 15 ++- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/panfrost/panfrost_device

[PATCH v2 14/14] [DO NOT MERGE] arm64: dts: allwinner: force GPU regulator to be always

2020-07-06 Thread Clément Péron
Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts index 3f7ceeb1a767..14257f7476b8 100644

[PATCH v2 06/14] drm/panfrost: properly handle error in probe

2020-07-06 Thread Clément Péron
Introduce a boolean to know if opp table has been added. With this, we can call panfrost_devfreq_fini() in case of error and release what has been initialised. Signed-off-by: Clément Péron Reviewed-by: Steven Price --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 25

Re: [PATCH 08/15] drm/panfrost: move devfreq_init()/fini() in device

2020-05-30 Thread Clément Péron
Hi Steven On Thu, 28 May 2020 at 15:22, Steven Price wrote: > > On 10/05/2020 17:55, Clément Péron wrote: > > Later we will introduce devfreq probing regulator if they > > are present. As regulator should be probe only one time we > > need to get this

Re: [PATCH 07/15] drm/panfrost: use device_property_present to check for OPP

2020-05-30 Thread Clément Péron
Hi Steven, On Thu, 28 May 2020 at 15:22, Steven Price wrote: > > On 10/05/2020 17:55, Clément Péron wrote: > > Instead of expecting an error from dev_pm_opp_of_add_table() > > do a simple device_property_present() check. > > > > Signed-off-by: Clément Péron >

Re: [PATCH 10/15] drm/panfrost: add regulators to devfreq

2020-05-30 Thread Clément Péron
Hi Steven, On Thu, 28 May 2020 at 15:23, Steven Price wrote: > > On 10/05/2020 17:55, Clément Péron wrote: > > Some OPP tables specify voltage for each frequency. Devfreq can > > handle these regulators but they should be get only 1 time to avoid > > issue and know who

Re: [PATCH 11/15] drm/panfrost: set devfreq clock name

2020-05-30 Thread Clément Péron
Hi Steven, On Thu, 28 May 2020 at 15:23, Steven Price wrote: > > On 10/05/2020 17:55, Clément Péron wrote: > > Some SoCs have several clocks defined and the OPP core > > needs to know the exact name of the clk to use. > > > > Set the clock name to "core&quo

Re: [PATCH 05/15] drm/panfrost: use spinlock instead of atomic

2020-05-30 Thread Clément Péron
Hi Robin, On Fri, 29 May 2020 at 14:20, Robin Murphy wrote: > > On 2020-05-10 17:55, Clément Péron wrote: > > Convert busy_count to a simple int protected by spinlock. > > A little more reasoning might be nice. I have follow the modification requested for lima devfreq and clea

[PATCH 14/15] [DO NOT MERGE] arm64: dts: allwinner: h6: Add GPU OPP table

2020-05-11 Thread Clément Péron
-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 80 1 file changed, 80 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index b26f735201c7..85f43a4b651f 100644 --- a/arch/arm64/

[PATCH 06/15] drm/panfrost: properly handle error in probe

2020-05-11 Thread Clément Péron
Introduce a boolean to know if opp table has been added. With this, we can call panfrost_devfreq_fini() in case of error and release what has been initialised. Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 25 - drivers/gpu/drm/panfrost

[PATCH 04/15] drm/panfrost: introduce panfrost_devfreq struct

2020-05-11 Thread Clément Péron
Introduce a proper panfrost_devfreq to deal with devfreq variables. Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c | 76 - drivers/gpu/drm/panfrost/panfrost_devfreq.h | 20 +- drivers/gpu/drm/panfrost/panfrost_device.h | 11 +-- drivers/gpu

[PATCH 13/15] arm64: dts: allwinner: h6: Add cooling map for GPU

2020-05-11 Thread Clément Péron
Add a simple cooling map for the GPU. Signed-off-by: Clément Péron --- arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 22 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi index

[PATCH 10/15] drm/panfrost: add regulators to devfreq

2020-05-11 Thread Clément Péron
Some OPP tables specify voltage for each frequency. Devfreq can handle these regulators but they should be get only 1 time to avoid issue and know who is in charge. If OPP table is probe don't init regulator. Signed-off-by: Clément Péron --- drivers/gpu/drm/panfrost/panfrost_devfreq.c

  1   2   >