linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] ARM: dts: meson: fixes for GPU DVFS
@ 2019-12-25  1:06 Martin Blumenstingl
  2019-12-25  1:06 ` [PATCH 1/3] ARM: dts: meson8b: fix the clock controller compatible string Martin Blumenstingl
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2019-12-25  1:06 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: linux-arm-kernel, linux-kernel, Martin Blumenstingl

While testing my patch to add DVFS support to the lima driver [0] I
found one bug and two inconveniences with the GPU clocks in the
Meson8 and Meson8b .dts:
- the first patch is an actual fix so the two mali GPU clock trees can
  actually be used on Meson8b
- patch two and three are to prevent confusion when comparing the
  frequencies from the .dts with the actual ones on the system

Neither of these patches are critical, so I based them on top of
v5.6/dt (meaning they target Linux 5.6, not v5.5/fixes).


[0] https://patchwork.kernel.org/patch/11293193/


Martin Blumenstingl (3):
  ARM: dts: meson8b: fix the clock controller compatible string
  ARM: dts: meson8: use the actual frequency for the GPU's 182.1MHz OPP
  ARM: dts: meson8b: use the actual frequency for the GPU's 364MHz OPP

 arch/arm/boot/dts/meson8.dtsi  | 4 ++--
 arch/arm/boot/dts/meson8b.dtsi | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

-- 
2.24.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/3] ARM: dts: meson8b: fix the clock controller compatible string
  2019-12-25  1:06 [PATCH 0/3] ARM: dts: meson: fixes for GPU DVFS Martin Blumenstingl
@ 2019-12-25  1:06 ` Martin Blumenstingl
  2019-12-25  1:06 ` [PATCH 2/3] ARM: dts: meson8: use the actual frequency for the GPU's 182.1MHz OPP Martin Blumenstingl
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2019-12-25  1:06 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: linux-arm-kernel, linux-kernel, Martin Blumenstingl

The Meson8b clock controller is an evolution of the Meson8 clock
controller. The clock controller on Meson8b contains two identical mali
clock trees for glitch-free rate switching.
Use the correct compatible string to make use of the glitch free mux.

Fixes: b6db3936f2833c ("ARM: dts: meson: switch the clock controller to the HHI register area")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8b.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
index 8ac8bdfaf58f..5b5791924753 100644
--- a/arch/arm/boot/dts/meson8b.dtsi
+++ b/arch/arm/boot/dts/meson8b.dtsi
@@ -442,7 +442,7 @@ &gpio_intc {
 
 &hhi {
 	clkc: clock-controller {
-		compatible = "amlogic,meson8-clkc";
+		compatible = "amlogic,meson8b-clkc";
 		clocks = <&xtal>, <&ddr_clkc DDR_CLKID_DDR_PLL>;
 		clock-names = "xtal", "ddr_pll";
 		#clock-cells = <1>;
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/3] ARM: dts: meson8: use the actual frequency for the GPU's 182.1MHz OPP
  2019-12-25  1:06 [PATCH 0/3] ARM: dts: meson: fixes for GPU DVFS Martin Blumenstingl
  2019-12-25  1:06 ` [PATCH 1/3] ARM: dts: meson8b: fix the clock controller compatible string Martin Blumenstingl
@ 2019-12-25  1:06 ` Martin Blumenstingl
  2019-12-25  1:06 ` [PATCH 3/3] ARM: dts: meson8b: use the actual frequency for the GPU's 364MHz OPP Martin Blumenstingl
  2020-01-08 19:01 ` [PATCH 0/3] ARM: dts: meson: fixes for GPU DVFS Kevin Hilman
  3 siblings, 0 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2019-12-25  1:06 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: linux-arm-kernel, linux-kernel, Martin Blumenstingl

The clock setup on Meson8 cannot achieve a Mali frequency of exactly
182.15MHz. The vendor driver uses "FCLK_DIV7 / 2" for this frequency,
which translates to 2550MHz / 7 / 2 = 182142857Hz.
Update the GPU operating point to that specific frequency to not confuse
myself when comparing the frequency from the .dts with the actual clock
rate on the system.

Fixes: 7d3f6b536e72c9 ("ARM: dts: meson8: add the Mali-450 MP6 GPU")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/meson8.dtsi b/arch/arm/boot/dts/meson8.dtsi
index b35d7444c1f4..eedb92526968 100644
--- a/arch/arm/boot/dts/meson8.dtsi
+++ b/arch/arm/boot/dts/meson8.dtsi
@@ -130,8 +130,8 @@ opp-1992000000 {
 	gpu_opp_table: gpu-opp-table {
 		compatible = "operating-points-v2";
 
-		opp-182150000 {
-			opp-hz = /bits/ 64 <182150000>;
+		opp-182142857 {
+			opp-hz = /bits/ 64 <182142857>;
 			opp-microvolt = <1150000>;
 		};
 		opp-318750000 {
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 3/3] ARM: dts: meson8b: use the actual frequency for the GPU's 364MHz OPP
  2019-12-25  1:06 [PATCH 0/3] ARM: dts: meson: fixes for GPU DVFS Martin Blumenstingl
  2019-12-25  1:06 ` [PATCH 1/3] ARM: dts: meson8b: fix the clock controller compatible string Martin Blumenstingl
  2019-12-25  1:06 ` [PATCH 2/3] ARM: dts: meson8: use the actual frequency for the GPU's 182.1MHz OPP Martin Blumenstingl
@ 2019-12-25  1:06 ` Martin Blumenstingl
  2020-01-08 19:01 ` [PATCH 0/3] ARM: dts: meson: fixes for GPU DVFS Kevin Hilman
  3 siblings, 0 replies; 5+ messages in thread
From: Martin Blumenstingl @ 2019-12-25  1:06 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: linux-arm-kernel, linux-kernel, Martin Blumenstingl

The clock setup on Meson8 cannot achieve a Mali frequency of exactly
182.15MHz. The vendor driver uses "FCLK_DIV7 / 1" for this frequency,
which translates to 2550MHz / 7 / 1 = 364285714Hz.
Update the GPU operating point to that specific frequency to not confuse
myself when comparing the frequency from the .dts with the actual clock
rate on the system.

Fixes: c3ea80b6138cae ("ARM: dts: meson8b: add the Mali-450 MP2 GPU")
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 arch/arm/boot/dts/meson8b.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/meson8b.dtsi b/arch/arm/boot/dts/meson8b.dtsi
index 5b5791924753..e34b039b9357 100644
--- a/arch/arm/boot/dts/meson8b.dtsi
+++ b/arch/arm/boot/dts/meson8b.dtsi
@@ -126,8 +126,8 @@ opp-255000000 {
 			opp-hz = /bits/ 64 <255000000>;
 			opp-microvolt = <1100000>;
 		};
-		opp-364300000 {
-			opp-hz = /bits/ 64 <364300000>;
+		opp-364285714 {
+			opp-hz = /bits/ 64 <364285714>;
 			opp-microvolt = <1100000>;
 		};
 		opp-425000000 {
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 0/3] ARM: dts: meson: fixes for GPU DVFS
  2019-12-25  1:06 [PATCH 0/3] ARM: dts: meson: fixes for GPU DVFS Martin Blumenstingl
                   ` (2 preceding siblings ...)
  2019-12-25  1:06 ` [PATCH 3/3] ARM: dts: meson8b: use the actual frequency for the GPU's 364MHz OPP Martin Blumenstingl
@ 2020-01-08 19:01 ` Kevin Hilman
  3 siblings, 0 replies; 5+ messages in thread
From: Kevin Hilman @ 2020-01-08 19:01 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-amlogic
  Cc: linux-arm-kernel, linux-kernel, Martin Blumenstingl

Martin Blumenstingl <martin.blumenstingl@googlemail.com> writes:

> While testing my patch to add DVFS support to the lima driver [0] I
> found one bug and two inconveniences with the GPU clocks in the
> Meson8 and Meson8b .dts:
> - the first patch is an actual fix so the two mali GPU clock trees can
>   actually be used on Meson8b
> - patch two and three are to prevent confusion when comparing the
>   frequencies from the .dts with the actual ones on the system
>
> Neither of these patches are critical, so I based them on top of
> v5.6/dt (meaning they target Linux 5.6, not v5.5/fixes).

Queued for v5.6,

Thanks,

Kevin

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-08 19:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-25  1:06 [PATCH 0/3] ARM: dts: meson: fixes for GPU DVFS Martin Blumenstingl
2019-12-25  1:06 ` [PATCH 1/3] ARM: dts: meson8b: fix the clock controller compatible string Martin Blumenstingl
2019-12-25  1:06 ` [PATCH 2/3] ARM: dts: meson8: use the actual frequency for the GPU's 182.1MHz OPP Martin Blumenstingl
2019-12-25  1:06 ` [PATCH 3/3] ARM: dts: meson8b: use the actual frequency for the GPU's 364MHz OPP Martin Blumenstingl
2020-01-08 19:01 ` [PATCH 0/3] ARM: dts: meson: fixes for GPU DVFS Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).