Linux-Amlogic Archive on lore.kernel.org
 help / color / 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
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2019-12-25  1:06 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: Martin Blumenstingl, linux-kernel, linux-arm-kernel

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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 6+ 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
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2019-12-25  1:06 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: Martin Blumenstingl, linux-kernel, linux-arm-kernel

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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 6+ 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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2019-12-25  1:06 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: Martin Blumenstingl, linux-kernel, linux-arm-kernel

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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 6+ 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
  2020-01-09 18:21 ` patchwork-bot+linux-amlogic
  4 siblings, 0 replies; 6+ messages in thread
From: Martin Blumenstingl @ 2019-12-25  1:06 UTC (permalink / raw)
  To: linux-amlogic, khilman
  Cc: Martin Blumenstingl, linux-kernel, linux-arm-kernel

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


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 6+ 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
  2020-01-09 18:21 ` patchwork-bot+linux-amlogic
  4 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2020-01-08 19:01 UTC (permalink / raw)
  To: Martin Blumenstingl, linux-amlogic
  Cc: Martin Blumenstingl, linux-kernel, linux-arm-kernel

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

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 6+ 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
                   ` (3 preceding siblings ...)
  2020-01-08 19:01 ` [PATCH 0/3] ARM: dts: meson: fixes for GPU DVFS Kevin Hilman
@ 2020-01-09 18:21 ` patchwork-bot+linux-amlogic
  4 siblings, 0 replies; 6+ messages in thread
From: patchwork-bot+linux-amlogic @ 2020-01-09 18:21 UTC (permalink / raw)
  To: Martin Blumenstingl; +Cc: linux-amlogic, khilman

Hello:

This series was applied to khilman/linux-amlogic.git (refs/heads/for-next).

On Wed, 25 Dec 2019 02:06:04 +0100 you wrote:
> 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
> 
> [...]


Here is a summary with links:
  - [1/3] ARM: dts: meson8b: fix the clock controller compatible string
    https://git.kernel.org/khilman/linux-amlogic/c/da256557441700d4f3f95c6e94ef57794acd6bfc
  - [2/3] ARM: dts: meson8: use the actual frequency for the GPU's 182.1MHz OPP
    https://git.kernel.org/khilman/linux-amlogic/c/fe634a7a9a57fb736e39fb71aa9adc6448a90f94
  - [3/3] ARM: dts: meson8b: use the actual frequency for the GPU's 364MHz OPP
    https://git.kernel.org/khilman/linux-amlogic/c/c3dd3315ab58b2cfa1916df55b0d0f9fbd94266f

You are awesome, thank you!

-- 
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/pwbot

_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, back to index

Thread overview: 6+ 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
2020-01-09 18:21 ` patchwork-bot+linux-amlogic

Linux-Amlogic Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-amlogic/0 linux-amlogic/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-amlogic linux-amlogic/ https://lore.kernel.org/linux-amlogic \
		linux-amlogic@lists.infradead.org
	public-inbox-index linux-amlogic

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-amlogic


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git