linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RZ/G2M Power Domain Errors with GPU
@ 2023-05-20  3:12 Adam Ford
  2023-05-22  8:06 ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Adam Ford @ 2023-05-20  3:12 UTC (permalink / raw)
  To: Linux-Renesas; +Cc: Geert Uytterhoeven, Biju Das, cstevens

Hi all,

I am trying to see if the Open Source PowerVR driver [1]  for the 6250
can be made to work on the RZ/G2M, and I am having difficulty getting
the power domain to turn on.

In the GPU node, I set:
power-domains = <&sysc R8A774A1_PD_3DG_B>;

Unfortunately,  when it boots, I get the following error message:

[    8.313305] powervr fd000000.gpu: error -ENOENT: failed to add to
PM domain 3dg-b
[    8.320822] powervr: probe of fd000000.gpu failed with error -2

Is there something I need to do in order to use this?  it appears the
3DG_B starts 3DG_A if I understand this correctly.

Unfortunately, I don't see the parent child relationship between the
3DG_B and the GPU

root@beacon-rzg2m:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
domain                          status          children
            performance
    /device                                             runtime status
----------------------------------------------------------------------------------------------
clock-controller                on
            0
3dg-b                           off-0
            0
3dg-a                           off-0
            0
                                                3dg-b

If anyone has any suggestions, I'd like to try to get this
operational.  I would also expect this to be similar for the
corresponding RCAR-GEN3 SoC as well.  It appears that Mesa has
mainline support for PowerVR 6250 as well and it looks like the Mesa
side looks like it's been merged about a year ago. [2]


adam

[1] - https://gitlab.freedesktop.org/frankbinns/powervr
[2] - https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15243

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

* Re: RZ/G2M Power Domain Errors with GPU
  2023-05-20  3:12 RZ/G2M Power Domain Errors with GPU Adam Ford
@ 2023-05-22  8:06 ` Geert Uytterhoeven
  2023-05-26  4:07   ` Adam Ford
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2023-05-22  8:06 UTC (permalink / raw)
  To: Adam Ford; +Cc: Linux-Renesas, Biju Das, cstevens, Marek Vasut, Ulrich Hecht

Hi Adam,

On Sat, May 20, 2023 at 5:13 AM Adam Ford <aford173@gmail.com> wrote:
> I am trying to see if the Open Source PowerVR driver [1]  for the 6250
> can be made to work on the RZ/G2M, and I am having difficulty getting
> the power domain to turn on.
>
> In the GPU node, I set:
> power-domains = <&sysc R8A774A1_PD_3DG_B>;

LGTM...

> Unfortunately,  when it boots, I get the following error message:
>
> [    8.313305] powervr fd000000.gpu: error -ENOENT: failed to add to
> PM domain 3dg-b

That means genpd_add_device() failed (but why?)...

> [    8.320822] powervr: probe of fd000000.gpu failed with error -2
>
> Is there something I need to do in order to use this?  it appears the
> 3DG_B starts 3DG_A if I understand this correctly.
>
> Unfortunately, I don't see the parent child relationship between the
> 3DG_B and the GPU
>
> root@beacon-rzg2m:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> domain                          status          children
>             performance
>     /device                                             runtime status
> ----------------------------------------------------------------------------------------------
> clock-controller                on
>             0
> 3dg-b                           off-0
>             0
> 3dg-a                           off-0
>             0
>                                                 3dg-b

... hence the relationship does not show up.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: RZ/G2M Power Domain Errors with GPU
  2023-05-22  8:06 ` Geert Uytterhoeven
@ 2023-05-26  4:07   ` Adam Ford
  2023-05-26  7:13     ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Adam Ford @ 2023-05-26  4:07 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas, Biju Das, cstevens, Marek Vasut, Ulrich Hecht

On Mon, May 22, 2023 at 3:06 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Adam,
>
> On Sat, May 20, 2023 at 5:13 AM Adam Ford <aford173@gmail.com> wrote:
> > I am trying to see if the Open Source PowerVR driver [1]  for the 6250
> > can be made to work on the RZ/G2M, and I am having difficulty getting
> > the power domain to turn on.
> >
> > In the GPU node, I set:
> > power-domains = <&sysc R8A774A1_PD_3DG_B>;
>
> LGTM...
>
> > Unfortunately,  when it boots, I get the following error message:
> >
> > [    8.313305] powervr fd000000.gpu: error -ENOENT: failed to add to
> > PM domain 3dg-b
>
> That means genpd_add_device() failed (but why?)...

With a pointer from Marek V, I appear to have the necessary clock and
the power domain operational by borrowing from the down-stream RZ/G2
kernel.  Even if I cannot get the PVR driver working with this kernel,
would you accept the clock and power domain patch now, or do you want
me to wait until we have a user of these (aka PVR) working?

adam
>
> > [    8.320822] powervr: probe of fd000000.gpu failed with error -2
> >
> > Is there something I need to do in order to use this?  it appears the
> > 3DG_B starts 3DG_A if I understand this correctly.
> >
> > Unfortunately, I don't see the parent child relationship between the
> > 3DG_B and the GPU
> >
> > root@beacon-rzg2m:~# cat /sys/kernel/debug/pm_genpd/pm_genpd_summary
> > domain                          status          children
> >             performance
> >     /device                                             runtime status
> > ----------------------------------------------------------------------------------------------
> > clock-controller                on
> >             0
> > 3dg-b                           off-0
> >             0
> > 3dg-a                           off-0
> >             0
> >                                                 3dg-b
>
> ... hence the relationship does not show up.
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

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

* Re: RZ/G2M Power Domain Errors with GPU
  2023-05-26  4:07   ` Adam Ford
@ 2023-05-26  7:13     ` Geert Uytterhoeven
  2023-05-26 19:59       ` Adam Ford
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2023-05-26  7:13 UTC (permalink / raw)
  To: Adam Ford; +Cc: Linux-Renesas, Biju Das, cstevens, Marek Vasut, Ulrich Hecht

Hi Adam,

On Fri, May 26, 2023 at 6:07 AM Adam Ford <aford173@gmail.com> wrote:
> On Mon, May 22, 2023 at 3:06 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Sat, May 20, 2023 at 5:13 AM Adam Ford <aford173@gmail.com> wrote:
> > > I am trying to see if the Open Source PowerVR driver [1]  for the 6250
> > > can be made to work on the RZ/G2M, and I am having difficulty getting
> > > the power domain to turn on.
> > >
> > > In the GPU node, I set:
> > > power-domains = <&sysc R8A774A1_PD_3DG_B>;
> >
> > LGTM...
> >
> > > Unfortunately,  when it boots, I get the following error message:
> > >
> > > [    8.313305] powervr fd000000.gpu: error -ENOENT: failed to add to
> > > PM domain 3dg-b
> >
> > That means genpd_add_device() failed (but why?)...
>
> With a pointer from Marek V, I appear to have the necessary clock and
> the power domain operational by borrowing from the down-stream RZ/G2
> kernel.  Even if I cannot get the PVR driver working with this kernel,
> would you accept the clock and power domain patch now, or do you want
> me to wait until we have a user of these (aka PVR) working?

I don't think it makes much sense to add the clock and power domain
patches upstream now, as they impact system behavior, while we don't
know if they are sufficient to make the PVR work.
The clock patches are probably (more or less) OK, and they do not have
much impact when the PVR is not enabled or not used.
For the power domain patches, it's different: some of them are quite
intrusive, and we still don't know the full rationale behind them.
Out of curiosity, which power domain patch(es) did you have to apply?

Thanks!

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: RZ/G2M Power Domain Errors with GPU
  2023-05-26  7:13     ` Geert Uytterhoeven
@ 2023-05-26 19:59       ` Adam Ford
  2023-05-30  7:38         ` Geert Uytterhoeven
  0 siblings, 1 reply; 7+ messages in thread
From: Adam Ford @ 2023-05-26 19:59 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas, Biju Das, cstevens, Marek Vasut, Ulrich Hecht

On Fri, May 26, 2023 at 2:13 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Adam,
>
> On Fri, May 26, 2023 at 6:07 AM Adam Ford <aford173@gmail.com> wrote:
> > On Mon, May 22, 2023 at 3:06 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Sat, May 20, 2023 at 5:13 AM Adam Ford <aford173@gmail.com> wrote:
> > > > I am trying to see if the Open Source PowerVR driver [1]  for the 6250
> > > > can be made to work on the RZ/G2M, and I am having difficulty getting
> > > > the power domain to turn on.
> > > >
> > > > In the GPU node, I set:
> > > > power-domains = <&sysc R8A774A1_PD_3DG_B>;
> > >
> > > LGTM...
> > >
> > > > Unfortunately,  when it boots, I get the following error message:
> > > >
> > > > [    8.313305] powervr fd000000.gpu: error -ENOENT: failed to add to
> > > > PM domain 3dg-b
> > >
> > > That means genpd_add_device() failed (but why?)...
> >
> > With a pointer from Marek V, I appear to have the necessary clock and
> > the power domain operational by borrowing from the down-stream RZ/G2
> > kernel.  Even if I cannot get the PVR driver working with this kernel,
> > would you accept the clock and power domain patch now, or do you want
> > me to wait until we have a user of these (aka PVR) working?
>
> I don't think it makes much sense to add the clock and power domain
> patches upstream now, as they impact system behavior, while we don't
> know if they are sufficient to make the PVR work.
> The clock patches are probably (more or less) OK, and they do not have
> much impact when the PVR is not enabled or not used.
> For the power domain patches, it's different: some of them are quite
> intrusive, and we still don't know the full rationale behind them.
> Out of curiosity, which power domain patch(es) did you have to apply?

I didn't really have to change the power domains per se, but I had to
add the clocks that the GPU power domains needed and I refereneced the
power-domain from the GPU node.

Do you want me to send the patch as an RFC?

adam
>
> Thanks!
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

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

* Re: RZ/G2M Power Domain Errors with GPU
  2023-05-26 19:59       ` Adam Ford
@ 2023-05-30  7:38         ` Geert Uytterhoeven
  2023-05-30 11:16           ` Adam Ford
  0 siblings, 1 reply; 7+ messages in thread
From: Geert Uytterhoeven @ 2023-05-30  7:38 UTC (permalink / raw)
  To: Adam Ford; +Cc: Linux-Renesas, Biju Das, cstevens, Marek Vasut, Ulrich Hecht

Hi Adam,

On Fri, May 26, 2023 at 9:59 PM Adam Ford <aford173@gmail.com> wrote:
> On Fri, May 26, 2023 at 2:13 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Fri, May 26, 2023 at 6:07 AM Adam Ford <aford173@gmail.com> wrote:
> > > On Mon, May 22, 2023 at 3:06 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > On Sat, May 20, 2023 at 5:13 AM Adam Ford <aford173@gmail.com> wrote:
> > > > > I am trying to see if the Open Source PowerVR driver [1]  for the 6250
> > > > > can be made to work on the RZ/G2M, and I am having difficulty getting
> > > > > the power domain to turn on.
> > > > >
> > > > > In the GPU node, I set:
> > > > > power-domains = <&sysc R8A774A1_PD_3DG_B>;
> > > >
> > > > LGTM...
> > > >
> > > > > Unfortunately,  when it boots, I get the following error message:
> > > > >
> > > > > [    8.313305] powervr fd000000.gpu: error -ENOENT: failed to add to
> > > > > PM domain 3dg-b
> > > >
> > > > That means genpd_add_device() failed (but why?)...
> > >
> > > With a pointer from Marek V, I appear to have the necessary clock and
> > > the power domain operational by borrowing from the down-stream RZ/G2
> > > kernel.  Even if I cannot get the PVR driver working with this kernel,
> > > would you accept the clock and power domain patch now, or do you want
> > > me to wait until we have a user of these (aka PVR) working?
> >
> > I don't think it makes much sense to add the clock and power domain
> > patches upstream now, as they impact system behavior, while we don't
> > know if they are sufficient to make the PVR work.
> > The clock patches are probably (more or less) OK, and they do not have
> > much impact when the PVR is not enabled or not used.
> > For the power domain patches, it's different: some of them are quite
> > intrusive, and we still don't know the full rationale behind them.
> > Out of curiosity, which power domain patch(es) did you have to apply?
>
> I didn't really have to change the power domains per se, but I had to
> add the clocks that the GPU power domains needed and I refereneced the
> power-domain from the GPU node.

OK.

> Do you want me to send the patch as an RFC?

I guess you mean patch series[1], submitted by Marek?
That one is marked "Chances Requested" in patchwork[2].  Moving it
forward means fixing the issues pointed out.

Thanks!

[1] https://lore.kernel.org/all/20220314220012.218731-1-marek.vasut@gmail.com/
[2] https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=623329&state=*

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: RZ/G2M Power Domain Errors with GPU
  2023-05-30  7:38         ` Geert Uytterhoeven
@ 2023-05-30 11:16           ` Adam Ford
  0 siblings, 0 replies; 7+ messages in thread
From: Adam Ford @ 2023-05-30 11:16 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Linux-Renesas, Biju Das, cstevens, Marek Vasut, Ulrich Hecht

On Tue, May 30, 2023 at 2:38 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Adam,
>
> On Fri, May 26, 2023 at 9:59 PM Adam Ford <aford173@gmail.com> wrote:
> > On Fri, May 26, 2023 at 2:13 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Fri, May 26, 2023 at 6:07 AM Adam Ford <aford173@gmail.com> wrote:
> > > > On Mon, May 22, 2023 at 3:06 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > > > On Sat, May 20, 2023 at 5:13 AM Adam Ford <aford173@gmail.com> wrote:
> > > > > > I am trying to see if the Open Source PowerVR driver [1]  for the 6250
> > > > > > can be made to work on the RZ/G2M, and I am having difficulty getting
> > > > > > the power domain to turn on.
> > > > > >
> > > > > > In the GPU node, I set:
> > > > > > power-domains = <&sysc R8A774A1_PD_3DG_B>;
> > > > >
> > > > > LGTM...
> > > > >
> > > > > > Unfortunately,  when it boots, I get the following error message:
> > > > > >
> > > > > > [    8.313305] powervr fd000000.gpu: error -ENOENT: failed to add to
> > > > > > PM domain 3dg-b
> > > > >
> > > > > That means genpd_add_device() failed (but why?)...
> > > >
> > > > With a pointer from Marek V, I appear to have the necessary clock and
> > > > the power domain operational by borrowing from the down-stream RZ/G2
> > > > kernel.  Even if I cannot get the PVR driver working with this kernel,
> > > > would you accept the clock and power domain patch now, or do you want
> > > > me to wait until we have a user of these (aka PVR) working?
> > >
> > > I don't think it makes much sense to add the clock and power domain
> > > patches upstream now, as they impact system behavior, while we don't
> > > know if they are sufficient to make the PVR work.
> > > The clock patches are probably (more or less) OK, and they do not have
> > > much impact when the PVR is not enabled or not used.
> > > For the power domain patches, it's different: some of them are quite
> > > intrusive, and we still don't know the full rationale behind them.
> > > Out of curiosity, which power domain patch(es) did you have to apply?
> >
> > I didn't really have to change the power domains per se, but I had to
> > add the clocks that the GPU power domains needed and I refereneced the
> > power-domain from the GPU node.
>
> OK.
>
> > Do you want me to send the patch as an RFC?
>
> I guess you mean patch series[1], submitted by Marek?
> That one is marked "Chances Requested" in patchwork[2].  Moving it
> forward means fixing the issues pointed out.

I edited different files based on the downstream kernel from Renesas.
It also modifies different files, but in a similar way.  I was doing
this on an r8a774a1 (RZ/G2M).  I tried to address the concerns you
sent to Marek.

I'll post the RFC momentarily.  It's a 3-part update to add a generic
Rcar-gen3 clock, add the 3dge clock, then the add GPU node.

adam
>
> Thanks!
>
> [1] https://lore.kernel.org/all/20220314220012.218731-1-marek.vasut@gmail.com/
> [2] https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=623329&state=*
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

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

end of thread, other threads:[~2023-05-30 11:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-20  3:12 RZ/G2M Power Domain Errors with GPU Adam Ford
2023-05-22  8:06 ` Geert Uytterhoeven
2023-05-26  4:07   ` Adam Ford
2023-05-26  7:13     ` Geert Uytterhoeven
2023-05-26 19:59       ` Adam Ford
2023-05-30  7:38         ` Geert Uytterhoeven
2023-05-30 11:16           ` Adam Ford

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