linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: allwinner: a64: set GPU clock to 432 MHz
@ 2019-12-03  2:14 Vasily Khoruzhick
  2019-12-09 19:31 ` Maxime Ripard
  0 siblings, 1 reply; 5+ messages in thread
From: Vasily Khoruzhick @ 2019-12-03  2:14 UTC (permalink / raw)
  To: Maxime Ripard, Chen-Yu Tsai, Rob Herring, Mark Rutland,
	linux-arm-kernel, devicetree

That's what BSP kernel sets it to and it seems to work fine.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
 arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
index 27e48234f1c2..0051f39b3d98 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
@@ -976,6 +976,9 @@ mali: gpu@1c40000 {
 			clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
 			clock-names = "bus", "core";
 			resets = <&ccu RST_BUS_GPU>;
+
+			assigned-clocks = <&ccu CLK_GPU>;
+			assigned-clock-rates = <432000000>;
 		};
 
 		gic: interrupt-controller@1c81000 {
-- 
2.24.0


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

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

* Re: [PATCH] arm64: dts: allwinner: a64: set GPU clock to 432 MHz
  2019-12-03  2:14 [PATCH] arm64: dts: allwinner: a64: set GPU clock to 432 MHz Vasily Khoruzhick
@ 2019-12-09 19:31 ` Maxime Ripard
  2019-12-09 20:23   ` Vasily Khoruzhick
  0 siblings, 1 reply; 5+ messages in thread
From: Maxime Ripard @ 2019-12-09 19:31 UTC (permalink / raw)
  To: Vasily Khoruzhick
  Cc: Mark Rutland, devicetree, Chen-Yu Tsai, Rob Herring, linux-arm-kernel

Hi,

On Mon, Dec 02, 2019 at 06:14:20PM -0800, Vasily Khoruzhick wrote:
> That's what BSP kernel sets it to and it seems to work fine.
>
> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> index 27e48234f1c2..0051f39b3d98 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> @@ -976,6 +976,9 @@ mali: gpu@1c40000 {
>  			clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
>  			clock-names = "bus", "core";
>  			resets = <&ccu RST_BUS_GPU>;
> +
> +			assigned-clocks = <&ccu CLK_GPU>;
> +			assigned-clock-rates = <432000000>;
>  		};

This doesn't really guarantee anything. If the GPU needs to remain at
that rate, it should be set in the driver. I just saw that you did
send a PR in github, I just merged it.

Maxime

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

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

* Re: [PATCH] arm64: dts: allwinner: a64: set GPU clock to 432 MHz
  2019-12-09 19:31 ` Maxime Ripard
@ 2019-12-09 20:23   ` Vasily Khoruzhick
  2019-12-10  8:33     ` Maxime Ripard
  0 siblings, 1 reply; 5+ messages in thread
From: Vasily Khoruzhick @ 2019-12-09 20:23 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Mark Rutland, devicetree, Chen-Yu Tsai, Rob Herring, arm-linux

On Mon, Dec 9, 2019 at 12:03 PM Maxime Ripard <mripard@kernel.org> wrote:
>
> Hi,
>
> On Mon, Dec 02, 2019 at 06:14:20PM -0800, Vasily Khoruzhick wrote:
> > That's what BSP kernel sets it to and it seems to work fine.
> >
> > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> > ---
> >  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> > index 27e48234f1c2..0051f39b3d98 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> > @@ -976,6 +976,9 @@ mali: gpu@1c40000 {
> >                       clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
> >                       clock-names = "bus", "core";
> >                       resets = <&ccu RST_BUS_GPU>;
> > +
> > +                     assigned-clocks = <&ccu CLK_GPU>;
> > +                     assigned-clock-rates = <432000000>;
> >               };
>
> This doesn't really guarantee anything. If the GPU needs to remain at
> that rate, it should be set in the driver. I just saw that you did
> send a PR in github, I just merged it.

Lima doesn't set GPU frequency at all since it's different for
different SoCs and we don't support operation points nor frequency
scaling yet.

So this change effectively sets GPU frequency to 432MHz on A64 when using lima.

>
> Maxime

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

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

* Re: [PATCH] arm64: dts: allwinner: a64: set GPU clock to 432 MHz
  2019-12-09 20:23   ` Vasily Khoruzhick
@ 2019-12-10  8:33     ` Maxime Ripard
  2019-12-10 11:48       ` Robin Murphy
  0 siblings, 1 reply; 5+ messages in thread
From: Maxime Ripard @ 2019-12-10  8:33 UTC (permalink / raw)
  To: Vasily Khoruzhick
  Cc: Mark Rutland, devicetree, Chen-Yu Tsai, Rob Herring, arm-linux

On Mon, Dec 09, 2019 at 12:23:18PM -0800, Vasily Khoruzhick wrote:
> On Mon, Dec 9, 2019 at 12:03 PM Maxime Ripard <mripard@kernel.org> wrote:
> > On Mon, Dec 02, 2019 at 06:14:20PM -0800, Vasily Khoruzhick wrote:
> > > That's what BSP kernel sets it to and it seems to work fine.
> > >
> > > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
> > > ---
> > >  arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> > > index 27e48234f1c2..0051f39b3d98 100644
> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
> > > @@ -976,6 +976,9 @@ mali: gpu@1c40000 {
> > >                       clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
> > >                       clock-names = "bus", "core";
> > >                       resets = <&ccu RST_BUS_GPU>;
> > > +
> > > +                     assigned-clocks = <&ccu CLK_GPU>;
> > > +                     assigned-clock-rates = <432000000>;
> > >               };
> >
> > This doesn't really guarantee anything. If the GPU needs to remain at
> > that rate, it should be set in the driver. I just saw that you did
> > send a PR in github, I just merged it.
>
> Lima doesn't set GPU frequency at all since it's different for
> different SoCs and we don't support operation points nor frequency
> scaling yet.

You don't really need frequency scaling though, you just need to set
it to any of the OPP. And if that's still too complicated, the binding
mandates to associate a vendor compatible, so you can base the
information on that.

> So this change effectively sets GPU frequency to 432MHz on A64 when
> using lima.

Right before the driver is probed. For all you now, that frequency can
be changed to anything else at the very next operation and you'd end
up in the exact same situation than the one you're trying to fix.

Maxime

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

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

* Re: [PATCH] arm64: dts: allwinner: a64: set GPU clock to 432 MHz
  2019-12-10  8:33     ` Maxime Ripard
@ 2019-12-10 11:48       ` Robin Murphy
  0 siblings, 0 replies; 5+ messages in thread
From: Robin Murphy @ 2019-12-10 11:48 UTC (permalink / raw)
  To: Maxime Ripard, Vasily Khoruzhick
  Cc: Mark Rutland, devicetree, Chen-Yu Tsai, Rob Herring, arm-linux

On 10/12/2019 8:33 am, Maxime Ripard wrote:
> On Mon, Dec 09, 2019 at 12:23:18PM -0800, Vasily Khoruzhick wrote:
>> On Mon, Dec 9, 2019 at 12:03 PM Maxime Ripard <mripard@kernel.org> wrote:
>>> On Mon, Dec 02, 2019 at 06:14:20PM -0800, Vasily Khoruzhick wrote:
>>>> That's what BSP kernel sets it to and it seems to work fine.
>>>>
>>>> Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
>>>> ---
>>>>   arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 3 +++
>>>>   1 file changed, 3 insertions(+)
>>>>
>>>> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
>>>> index 27e48234f1c2..0051f39b3d98 100644
>>>> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
>>>> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi
>>>> @@ -976,6 +976,9 @@ mali: gpu@1c40000 {
>>>>                        clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
>>>>                        clock-names = "bus", "core";
>>>>                        resets = <&ccu RST_BUS_GPU>;
>>>> +
>>>> +                     assigned-clocks = <&ccu CLK_GPU>;
>>>> +                     assigned-clock-rates = <432000000>;
>>>>                };
>>>
>>> This doesn't really guarantee anything. If the GPU needs to remain at
>>> that rate, it should be set in the driver. I just saw that you did
>>> send a PR in github, I just merged it.
>>
>> Lima doesn't set GPU frequency at all since it's different for
>> different SoCs and we don't support operation points nor frequency
>> scaling yet.
> 
> You don't really need frequency scaling though, you just need to set
> it to any of the OPP. And if that's still too complicated, the binding
> mandates to associate a vendor compatible, so you can base the
> information on that.

Right, even just wiring up minimal OPP support with the userspace 
governor would be really useful for SoCs like RK3328, where the GPU PLL 
defaults to something pathetic, but the most useful upper frequencies 
typically require regulator adjustment as well.

Robin.

>> So this change effectively sets GPU frequency to 432MHz on A64 when
>> using lima.
> 
> Right before the driver is probed. For all you now, that frequency can
> be changed to anything else at the very next operation and you'd end
> up in the exact same situation than the one you're trying to fix.
> 
> Maxime
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

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

end of thread, other threads:[~2019-12-10 11:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03  2:14 [PATCH] arm64: dts: allwinner: a64: set GPU clock to 432 MHz Vasily Khoruzhick
2019-12-09 19:31 ` Maxime Ripard
2019-12-09 20:23   ` Vasily Khoruzhick
2019-12-10  8:33     ` Maxime Ripard
2019-12-10 11:48       ` Robin Murphy

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).