All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
@ 2021-11-20 19:39 ` Adam Ford
  0 siblings, 0 replies; 16+ messages in thread
From: Adam Ford @ 2021-11-20 19:39 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: tharvey, aford, Adam Ford, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Lucas Stach, Peng Fan, linux-kernel

Enable the vpu-h1 clock when the domain is active because reading
or writing to the VPU-H1 IP block cause the system to hang.

Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index b8d52d8d29db..7b6dfa33dcb9 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
 			.map = IMX8MM_VPUH1_A53_DOMAIN,
 		},
 		.pgc   = BIT(IMX8MM_PGC_VPUH1),
+		.keep_clocks = true,
 	},
 
 	[IMX8MM_POWER_DOMAIN_DISPMIX] = {
-- 
2.32.0


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

* [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
@ 2021-11-20 19:39 ` Adam Ford
  0 siblings, 0 replies; 16+ messages in thread
From: Adam Ford @ 2021-11-20 19:39 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: tharvey, aford, Adam Ford, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Lucas Stach, Peng Fan, linux-kernel

Enable the vpu-h1 clock when the domain is active because reading
or writing to the VPU-H1 IP block cause the system to hang.

Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
Signed-off-by: Adam Ford <aford173@gmail.com>

diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
index b8d52d8d29db..7b6dfa33dcb9 100644
--- a/drivers/soc/imx/gpcv2.c
+++ b/drivers/soc/imx/gpcv2.c
@@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
 			.map = IMX8MM_VPUH1_A53_DOMAIN,
 		},
 		.pgc   = BIT(IMX8MM_PGC_VPUH1),
+		.keep_clocks = true,
 	},
 
 	[IMX8MM_POWER_DOMAIN_DISPMIX] = {
-- 
2.32.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] 16+ messages in thread

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
  2021-11-20 19:39 ` Adam Ford
@ 2021-11-20 20:52   ` Fabio Estevam
  -1 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2021-11-20 20:52 UTC (permalink / raw)
  To: Adam Ford
  Cc: moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Tim Harvey, Adam Ford-BE, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, Lucas Stach, Peng Fan,
	linux-kernel

Hi Adam,

On Sat, Nov 20, 2021 at 4:39 PM Adam Ford <aford173@gmail.com> wrote:
>
> Enable the vpu-h1 clock when the domain is active because reading
> or writing to the VPU-H1 IP block cause the system to hang.
>
> Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> Signed-off-by: Adam Ford <aford173@gmail.com>

This makes sense:

Reviewed-by: Fabio Estevam <festevam@gmail.com>

_______________________________________________
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] 16+ messages in thread

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
@ 2021-11-20 20:52   ` Fabio Estevam
  0 siblings, 0 replies; 16+ messages in thread
From: Fabio Estevam @ 2021-11-20 20:52 UTC (permalink / raw)
  To: Adam Ford
  Cc: moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Tim Harvey, Adam Ford-BE, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, NXP Linux Team, Lucas Stach, Peng Fan,
	linux-kernel

Hi Adam,

On Sat, Nov 20, 2021 at 4:39 PM Adam Ford <aford173@gmail.com> wrote:
>
> Enable the vpu-h1 clock when the domain is active because reading
> or writing to the VPU-H1 IP block cause the system to hang.
>
> Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> Signed-off-by: Adam Ford <aford173@gmail.com>

This makes sense:

Reviewed-by: Fabio Estevam <festevam@gmail.com>

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

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
  2021-11-20 19:39 ` Adam Ford
@ 2021-11-23 12:20   ` Shawn Guo
  -1 siblings, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2021-11-23 12:20 UTC (permalink / raw)
  To: Adam Ford
  Cc: linux-arm-kernel, tharvey, aford, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Lucas Stach, Peng Fan, linux-kernel

On Sat, Nov 20, 2021 at 01:39:16PM -0600, Adam Ford wrote:
> Enable the vpu-h1 clock when the domain is active because reading
> or writing to the VPU-H1 IP block cause the system to hang.
> 
> Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> Signed-off-by: Adam Ford <aford173@gmail.com>

Applied, thanks!

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

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
@ 2021-11-23 12:20   ` Shawn Guo
  0 siblings, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2021-11-23 12:20 UTC (permalink / raw)
  To: Adam Ford
  Cc: linux-arm-kernel, tharvey, aford, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
	Lucas Stach, Peng Fan, linux-kernel

On Sat, Nov 20, 2021 at 01:39:16PM -0600, Adam Ford wrote:
> Enable the vpu-h1 clock when the domain is active because reading
> or writing to the VPU-H1 IP block cause the system to hang.
> 
> Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> Signed-off-by: Adam Ford <aford173@gmail.com>

Applied, thanks!

_______________________________________________
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] 16+ messages in thread

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
  2021-11-20 19:39 ` Adam Ford
@ 2022-03-31  9:28   ` Lucas Stach
  -1 siblings, 0 replies; 16+ messages in thread
From: Lucas Stach @ 2022-03-31  9:28 UTC (permalink / raw)
  To: Adam Ford, linux-arm-kernel
  Cc: tharvey, aford, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Peng Fan, linux-kernel

Hi Adam, hi Shawn,

Am Samstag, dem 20.11.2021 um 13:39 -0600 schrieb Adam Ford:
> Enable the vpu-h1 clock when the domain is active because reading
> or writing to the VPU-H1 IP block cause the system to hang.
> 
> Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> index b8d52d8d29db..7b6dfa33dcb9 100644
> --- a/drivers/soc/imx/gpcv2.c
> +++ b/drivers/soc/imx/gpcv2.c
> @@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
>  			.map = IMX8MM_VPUH1_A53_DOMAIN,
>  		},
>  		.pgc   = BIT(IMX8MM_PGC_VPUH1),
> +		.keep_clocks = true,
>  	},
> 
I missed this patch and just stumbled across it when looking at the git
history. I don't think this patch is correct. The H1 GPC domain does
not even have clocks assigned in the DT, so there is nothing to keep
active. Also H1 is not a MIX domain, so it should not keep any bus
clocks active, that is the job of the VPUMIX domain.

While this patch is a no-op, as far as I can see, it still seems wrong
and I think it should be reverted.

Regards,
Lucas


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

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
@ 2022-03-31  9:28   ` Lucas Stach
  0 siblings, 0 replies; 16+ messages in thread
From: Lucas Stach @ 2022-03-31  9:28 UTC (permalink / raw)
  To: Adam Ford, linux-arm-kernel
  Cc: tharvey, aford, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, NXP Linux Team, Peng Fan, linux-kernel

Hi Adam, hi Shawn,

Am Samstag, dem 20.11.2021 um 13:39 -0600 schrieb Adam Ford:
> Enable the vpu-h1 clock when the domain is active because reading
> or writing to the VPU-H1 IP block cause the system to hang.
> 
> Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> index b8d52d8d29db..7b6dfa33dcb9 100644
> --- a/drivers/soc/imx/gpcv2.c
> +++ b/drivers/soc/imx/gpcv2.c
> @@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
>  			.map = IMX8MM_VPUH1_A53_DOMAIN,
>  		},
>  		.pgc   = BIT(IMX8MM_PGC_VPUH1),
> +		.keep_clocks = true,
>  	},
> 
I missed this patch and just stumbled across it when looking at the git
history. I don't think this patch is correct. The H1 GPC domain does
not even have clocks assigned in the DT, so there is nothing to keep
active. Also H1 is not a MIX domain, so it should not keep any bus
clocks active, that is the job of the VPUMIX domain.

While this patch is a no-op, as far as I can see, it still seems wrong
and I think it should be reverted.

Regards,
Lucas


_______________________________________________
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] 16+ messages in thread

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
  2022-03-31  9:28   ` Lucas Stach
@ 2022-03-31 11:32     ` Adam Ford
  -1 siblings, 0 replies; 16+ messages in thread
From: Adam Ford @ 2022-03-31 11:32 UTC (permalink / raw)
  To: Lucas Stach
  Cc: arm-soc, Tim Harvey, Adam Ford-BE, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Peng Fan,
	Linux Kernel Mailing List

On Thu, Mar 31, 2022 at 4:28 AM Lucas Stach <l.stach@pengutronix.de> wrote:
>
> Hi Adam, hi Shawn,
>
> Am Samstag, dem 20.11.2021 um 13:39 -0600 schrieb Adam Ford:
> > Enable the vpu-h1 clock when the domain is active because reading
> > or writing to the VPU-H1 IP block cause the system to hang.
> >
> > Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> > index b8d52d8d29db..7b6dfa33dcb9 100644
> > --- a/drivers/soc/imx/gpcv2.c
> > +++ b/drivers/soc/imx/gpcv2.c
> > @@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
> >                       .map = IMX8MM_VPUH1_A53_DOMAIN,
> >               },
> >               .pgc   = BIT(IMX8MM_PGC_VPUH1),
> > +             .keep_clocks = true,
> >       },
> >
> I missed this patch and just stumbled across it when looking at the git
> history. I don't think this patch is correct. The H1 GPC domain does
> not even have clocks assigned in the DT, so there is nothing to keep
> active. Also H1 is not a MIX domain, so it should not keep any bus
> clocks active, that is the job of the VPUMIX domain.
>
> While this patch is a no-op, as far as I can see, it still seems wrong
> and I think it should be reverted.

At the time I sent this, I was working with some people in the media
group to split the G1 and G2 up in the imx8mq and add G1 and G2
support in the imx8mm.  I had inquired about the feasibility of using
the H1 encoder on the imx8mm, but I needed to read some registers from
the IP block to see which features were fused out.  I tried several
different options to get the H1 to not hang when reading registers,
and that was the only solution I found that worked.  I thought it odd
as well since the G1 and G2 decoders didn't appear to need this.
However, during the course of my investigation, I learned that the
JPEG encoder was fused out of the imx8mm, and there wasn't a plan to
add VP8 or H.264 encodering any time soon.   Since it is, as you put
it, a no-op, I have no objections to reverting it.

adam
>
> Regards,
> Lucas
>

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

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
@ 2022-03-31 11:32     ` Adam Ford
  0 siblings, 0 replies; 16+ messages in thread
From: Adam Ford @ 2022-03-31 11:32 UTC (permalink / raw)
  To: Lucas Stach
  Cc: arm-soc, Tim Harvey, Adam Ford-BE, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Peng Fan,
	Linux Kernel Mailing List

On Thu, Mar 31, 2022 at 4:28 AM Lucas Stach <l.stach@pengutronix.de> wrote:
>
> Hi Adam, hi Shawn,
>
> Am Samstag, dem 20.11.2021 um 13:39 -0600 schrieb Adam Ford:
> > Enable the vpu-h1 clock when the domain is active because reading
> > or writing to the VPU-H1 IP block cause the system to hang.
> >
> > Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> > index b8d52d8d29db..7b6dfa33dcb9 100644
> > --- a/drivers/soc/imx/gpcv2.c
> > +++ b/drivers/soc/imx/gpcv2.c
> > @@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
> >                       .map = IMX8MM_VPUH1_A53_DOMAIN,
> >               },
> >               .pgc   = BIT(IMX8MM_PGC_VPUH1),
> > +             .keep_clocks = true,
> >       },
> >
> I missed this patch and just stumbled across it when looking at the git
> history. I don't think this patch is correct. The H1 GPC domain does
> not even have clocks assigned in the DT, so there is nothing to keep
> active. Also H1 is not a MIX domain, so it should not keep any bus
> clocks active, that is the job of the VPUMIX domain.
>
> While this patch is a no-op, as far as I can see, it still seems wrong
> and I think it should be reverted.

At the time I sent this, I was working with some people in the media
group to split the G1 and G2 up in the imx8mq and add G1 and G2
support in the imx8mm.  I had inquired about the feasibility of using
the H1 encoder on the imx8mm, but I needed to read some registers from
the IP block to see which features were fused out.  I tried several
different options to get the H1 to not hang when reading registers,
and that was the only solution I found that worked.  I thought it odd
as well since the G1 and G2 decoders didn't appear to need this.
However, during the course of my investigation, I learned that the
JPEG encoder was fused out of the imx8mm, and there wasn't a plan to
add VP8 or H.264 encodering any time soon.   Since it is, as you put
it, a no-op, I have no objections to reverting it.

adam
>
> Regards,
> Lucas
>

_______________________________________________
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] 16+ messages in thread

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
  2022-03-31 11:32     ` Adam Ford
@ 2022-04-05  6:44       ` Shawn Guo
  -1 siblings, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2022-04-05  6:44 UTC (permalink / raw)
  To: Adam Ford
  Cc: Lucas Stach, arm-soc, Tim Harvey, Adam Ford-BE, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Peng Fan,
	Linux Kernel Mailing List

On Thu, Mar 31, 2022 at 06:32:13AM -0500, Adam Ford wrote:
> On Thu, Mar 31, 2022 at 4:28 AM Lucas Stach <l.stach@pengutronix.de> wrote:
> >
> > Hi Adam, hi Shawn,
> >
> > Am Samstag, dem 20.11.2021 um 13:39 -0600 schrieb Adam Ford:
> > > Enable the vpu-h1 clock when the domain is active because reading
> > > or writing to the VPU-H1 IP block cause the system to hang.
> > >
> > > Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > >
> > > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> > > index b8d52d8d29db..7b6dfa33dcb9 100644
> > > --- a/drivers/soc/imx/gpcv2.c
> > > +++ b/drivers/soc/imx/gpcv2.c
> > > @@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
> > >                       .map = IMX8MM_VPUH1_A53_DOMAIN,
> > >               },
> > >               .pgc   = BIT(IMX8MM_PGC_VPUH1),
> > > +             .keep_clocks = true,
> > >       },
> > >
> > I missed this patch and just stumbled across it when looking at the git
> > history. I don't think this patch is correct. The H1 GPC domain does
> > not even have clocks assigned in the DT, so there is nothing to keep
> > active. Also H1 is not a MIX domain, so it should not keep any bus
> > clocks active, that is the job of the VPUMIX domain.
> >
> > While this patch is a no-op, as far as I can see, it still seems wrong
> > and I think it should be reverted.
> 
> At the time I sent this, I was working with some people in the media
> group to split the G1 and G2 up in the imx8mq and add G1 and G2
> support in the imx8mm.  I had inquired about the feasibility of using
> the H1 encoder on the imx8mm, but I needed to read some registers from
> the IP block to see which features were fused out.  I tried several
> different options to get the H1 to not hang when reading registers,
> and that was the only solution I found that worked.  I thought it odd
> as well since the G1 and G2 decoders didn't appear to need this.
> However, during the course of my investigation, I learned that the
> JPEG encoder was fused out of the imx8mm, and there wasn't a plan to
> add VP8 or H.264 encodering any time soon.   Since it is, as you put
> it, a no-op, I have no objections to reverting it.

I do not quite follow.  You claimed that the change fixes a system hang.
Are we getting the hang back if we revert the change?

Shawn

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

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
@ 2022-04-05  6:44       ` Shawn Guo
  0 siblings, 0 replies; 16+ messages in thread
From: Shawn Guo @ 2022-04-05  6:44 UTC (permalink / raw)
  To: Adam Ford
  Cc: Lucas Stach, arm-soc, Tim Harvey, Adam Ford-BE, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Peng Fan,
	Linux Kernel Mailing List

On Thu, Mar 31, 2022 at 06:32:13AM -0500, Adam Ford wrote:
> On Thu, Mar 31, 2022 at 4:28 AM Lucas Stach <l.stach@pengutronix.de> wrote:
> >
> > Hi Adam, hi Shawn,
> >
> > Am Samstag, dem 20.11.2021 um 13:39 -0600 schrieb Adam Ford:
> > > Enable the vpu-h1 clock when the domain is active because reading
> > > or writing to the VPU-H1 IP block cause the system to hang.
> > >
> > > Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > >
> > > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> > > index b8d52d8d29db..7b6dfa33dcb9 100644
> > > --- a/drivers/soc/imx/gpcv2.c
> > > +++ b/drivers/soc/imx/gpcv2.c
> > > @@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
> > >                       .map = IMX8MM_VPUH1_A53_DOMAIN,
> > >               },
> > >               .pgc   = BIT(IMX8MM_PGC_VPUH1),
> > > +             .keep_clocks = true,
> > >       },
> > >
> > I missed this patch and just stumbled across it when looking at the git
> > history. I don't think this patch is correct. The H1 GPC domain does
> > not even have clocks assigned in the DT, so there is nothing to keep
> > active. Also H1 is not a MIX domain, so it should not keep any bus
> > clocks active, that is the job of the VPUMIX domain.
> >
> > While this patch is a no-op, as far as I can see, it still seems wrong
> > and I think it should be reverted.
> 
> At the time I sent this, I was working with some people in the media
> group to split the G1 and G2 up in the imx8mq and add G1 and G2
> support in the imx8mm.  I had inquired about the feasibility of using
> the H1 encoder on the imx8mm, but I needed to read some registers from
> the IP block to see which features were fused out.  I tried several
> different options to get the H1 to not hang when reading registers,
> and that was the only solution I found that worked.  I thought it odd
> as well since the G1 and G2 decoders didn't appear to need this.
> However, during the course of my investigation, I learned that the
> JPEG encoder was fused out of the imx8mm, and there wasn't a plan to
> add VP8 or H.264 encodering any time soon.   Since it is, as you put
> it, a no-op, I have no objections to reverting it.

I do not quite follow.  You claimed that the change fixes a system hang.
Are we getting the hang back if we revert the change?

Shawn

_______________________________________________
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] 16+ messages in thread

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
  2022-04-05  6:44       ` Shawn Guo
@ 2022-04-05  9:55         ` Adam Ford
  -1 siblings, 0 replies; 16+ messages in thread
From: Adam Ford @ 2022-04-05  9:55 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Lucas Stach, arm-soc, Tim Harvey, Adam Ford-BE, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Peng Fan,
	Linux Kernel Mailing List

On Tue, Apr 5, 2022 at 1:45 AM Shawn Guo <shawnguo@kernel.org> wrote:
>
> On Thu, Mar 31, 2022 at 06:32:13AM -0500, Adam Ford wrote:
> > On Thu, Mar 31, 2022 at 4:28 AM Lucas Stach <l.stach@pengutronix.de> wrote:
> > >
> > > Hi Adam, hi Shawn,
> > >
> > > Am Samstag, dem 20.11.2021 um 13:39 -0600 schrieb Adam Ford:
> > > > Enable the vpu-h1 clock when the domain is active because reading
> > > > or writing to the VPU-H1 IP block cause the system to hang.
> > > >
> > > > Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> > > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > > >
> > > > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> > > > index b8d52d8d29db..7b6dfa33dcb9 100644
> > > > --- a/drivers/soc/imx/gpcv2.c
> > > > +++ b/drivers/soc/imx/gpcv2.c
> > > > @@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
> > > >                       .map = IMX8MM_VPUH1_A53_DOMAIN,
> > > >               },
> > > >               .pgc   = BIT(IMX8MM_PGC_VPUH1),
> > > > +             .keep_clocks = true,
> > > >       },
> > > >
> > > I missed this patch and just stumbled across it when looking at the git
> > > history. I don't think this patch is correct. The H1 GPC domain does
> > > not even have clocks assigned in the DT, so there is nothing to keep
> > > active. Also H1 is not a MIX domain, so it should not keep any bus
> > > clocks active, that is the job of the VPUMIX domain.
> > >
> > > While this patch is a no-op, as far as I can see, it still seems wrong
> > > and I think it should be reverted.
> >
> > At the time I sent this, I was working with some people in the media
> > group to split the G1 and G2 up in the imx8mq and add G1 and G2
> > support in the imx8mm.  I had inquired about the feasibility of using
> > the H1 encoder on the imx8mm, but I needed to read some registers from
> > the IP block to see which features were fused out.  I tried several
> > different options to get the H1 to not hang when reading registers,
> > and that was the only solution I found that worked.  I thought it odd
> > as well since the G1 and G2 decoders didn't appear to need this.
> > However, during the course of my investigation, I learned that the
> > JPEG encoder was fused out of the imx8mm, and there wasn't a plan to
> > add VP8 or H.264 encodering any time soon.   Since it is, as you put
> > it, a no-op, I have no objections to reverting it.
>
> I do not quite follow.  You claimed that the change fixes a system hang.
> Are we getting the hang back if we revert the change?

It was hanging when I has trying to use the H1 VPU, and this did fix
it, but it seemed weird to me.  Unfortunately, Hantro H1 driver that
is currently in Linux only supports JPEG, and the H1 VPU in the imx8mm
has JPEG fused out.  As of right now, there is no H1 VPU consumer, so
there is nobody attempting to enable the H1 power domain, so it
remains a no-op.  If it's reverted, we'll have to revisit the issue in
the future to prevent the hanging, but that will also require a new
Hantro driver.

adam
>
> Shawn

_______________________________________________
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] 16+ messages in thread

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
@ 2022-04-05  9:55         ` Adam Ford
  0 siblings, 0 replies; 16+ messages in thread
From: Adam Ford @ 2022-04-05  9:55 UTC (permalink / raw)
  To: Shawn Guo
  Cc: Lucas Stach, arm-soc, Tim Harvey, Adam Ford-BE, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Peng Fan,
	Linux Kernel Mailing List

On Tue, Apr 5, 2022 at 1:45 AM Shawn Guo <shawnguo@kernel.org> wrote:
>
> On Thu, Mar 31, 2022 at 06:32:13AM -0500, Adam Ford wrote:
> > On Thu, Mar 31, 2022 at 4:28 AM Lucas Stach <l.stach@pengutronix.de> wrote:
> > >
> > > Hi Adam, hi Shawn,
> > >
> > > Am Samstag, dem 20.11.2021 um 13:39 -0600 schrieb Adam Ford:
> > > > Enable the vpu-h1 clock when the domain is active because reading
> > > > or writing to the VPU-H1 IP block cause the system to hang.
> > > >
> > > > Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> > > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > > >
> > > > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> > > > index b8d52d8d29db..7b6dfa33dcb9 100644
> > > > --- a/drivers/soc/imx/gpcv2.c
> > > > +++ b/drivers/soc/imx/gpcv2.c
> > > > @@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
> > > >                       .map = IMX8MM_VPUH1_A53_DOMAIN,
> > > >               },
> > > >               .pgc   = BIT(IMX8MM_PGC_VPUH1),
> > > > +             .keep_clocks = true,
> > > >       },
> > > >
> > > I missed this patch and just stumbled across it when looking at the git
> > > history. I don't think this patch is correct. The H1 GPC domain does
> > > not even have clocks assigned in the DT, so there is nothing to keep
> > > active. Also H1 is not a MIX domain, so it should not keep any bus
> > > clocks active, that is the job of the VPUMIX domain.
> > >
> > > While this patch is a no-op, as far as I can see, it still seems wrong
> > > and I think it should be reverted.
> >
> > At the time I sent this, I was working with some people in the media
> > group to split the G1 and G2 up in the imx8mq and add G1 and G2
> > support in the imx8mm.  I had inquired about the feasibility of using
> > the H1 encoder on the imx8mm, but I needed to read some registers from
> > the IP block to see which features were fused out.  I tried several
> > different options to get the H1 to not hang when reading registers,
> > and that was the only solution I found that worked.  I thought it odd
> > as well since the G1 and G2 decoders didn't appear to need this.
> > However, during the course of my investigation, I learned that the
> > JPEG encoder was fused out of the imx8mm, and there wasn't a plan to
> > add VP8 or H.264 encodering any time soon.   Since it is, as you put
> > it, a no-op, I have no objections to reverting it.
>
> I do not quite follow.  You claimed that the change fixes a system hang.
> Are we getting the hang back if we revert the change?

It was hanging when I has trying to use the H1 VPU, and this did fix
it, but it seemed weird to me.  Unfortunately, Hantro H1 driver that
is currently in Linux only supports JPEG, and the H1 VPU in the imx8mm
has JPEG fused out.  As of right now, there is no H1 VPU consumer, so
there is nobody attempting to enable the H1 power domain, so it
remains a no-op.  If it's reverted, we'll have to revisit the issue in
the future to prevent the hanging, but that will also require a new
Hantro driver.

adam
>
> Shawn

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

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
  2022-04-05  9:55         ` Adam Ford
@ 2022-04-05 10:07           ` Lucas Stach
  -1 siblings, 0 replies; 16+ messages in thread
From: Lucas Stach @ 2022-04-05 10:07 UTC (permalink / raw)
  To: Adam Ford, Shawn Guo
  Cc: arm-soc, Tim Harvey, Adam Ford-BE, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Peng Fan,
	Linux Kernel Mailing List

Am Dienstag, dem 05.04.2022 um 04:55 -0500 schrieb Adam Ford:
> On Tue, Apr 5, 2022 at 1:45 AM Shawn Guo <shawnguo@kernel.org> wrote:
> > 
> > On Thu, Mar 31, 2022 at 06:32:13AM -0500, Adam Ford wrote:
> > > On Thu, Mar 31, 2022 at 4:28 AM Lucas Stach <l.stach@pengutronix.de> wrote:
> > > > 
> > > > Hi Adam, hi Shawn,
> > > > 
> > > > Am Samstag, dem 20.11.2021 um 13:39 -0600 schrieb Adam Ford:
> > > > > Enable the vpu-h1 clock when the domain is active because reading
> > > > > or writing to the VPU-H1 IP block cause the system to hang.
> > > > > 
> > > > > Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> > > > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > > > > 
> > > > > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> > > > > index b8d52d8d29db..7b6dfa33dcb9 100644
> > > > > --- a/drivers/soc/imx/gpcv2.c
> > > > > +++ b/drivers/soc/imx/gpcv2.c
> > > > > @@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
> > > > >                       .map = IMX8MM_VPUH1_A53_DOMAIN,
> > > > >               },
> > > > >               .pgc   = BIT(IMX8MM_PGC_VPUH1),
> > > > > +             .keep_clocks = true,
> > > > >       },
> > > > > 
> > > > I missed this patch and just stumbled across it when looking at the git
> > > > history. I don't think this patch is correct. The H1 GPC domain does
> > > > not even have clocks assigned in the DT, so there is nothing to keep
> > > > active. Also H1 is not a MIX domain, so it should not keep any bus
> > > > clocks active, that is the job of the VPUMIX domain.
> > > > 
> > > > While this patch is a no-op, as far as I can see, it still seems wrong
> > > > and I think it should be reverted.
> > > 
> > > At the time I sent this, I was working with some people in the media
> > > group to split the G1 and G2 up in the imx8mq and add G1 and G2
> > > support in the imx8mm.  I had inquired about the feasibility of using
> > > the H1 encoder on the imx8mm, but I needed to read some registers from
> > > the IP block to see which features were fused out.  I tried several
> > > different options to get the H1 to not hang when reading registers,
> > > and that was the only solution I found that worked.  I thought it odd
> > > as well since the G1 and G2 decoders didn't appear to need this.
> > > However, during the course of my investigation, I learned that the
> > > JPEG encoder was fused out of the imx8mm, and there wasn't a plan to
> > > add VP8 or H.264 encodering any time soon.   Since it is, as you put
> > > it, a no-op, I have no objections to reverting it.
> > 
> > I do not quite follow.  You claimed that the change fixes a system hang.
> > Are we getting the hang back if we revert the change?
> 
> It was hanging when I has trying to use the H1 VPU, and this did fix
> it, but it seemed weird to me.  Unfortunately, Hantro H1 driver that
> is currently in Linux only supports JPEG, and the H1 VPU in the imx8mm
> has JPEG fused out.  As of right now, there is no H1 VPU consumer, so
> there is nobody attempting to enable the H1 power domain, so it
> remains a no-op.  If it's reverted, we'll have to revisit the issue in
> the future to prevent the hanging, but that will also require a new
> Hantro driver.

The H1 clock is not a bus clock, so there is nothing else that depends
on this clock than the H1 encoder peripheral, which is why it should be
handled by the future driver and not the power domain.

Regards,
Lucas


_______________________________________________
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] 16+ messages in thread

* Re: [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active
@ 2022-04-05 10:07           ` Lucas Stach
  0 siblings, 0 replies; 16+ messages in thread
From: Lucas Stach @ 2022-04-05 10:07 UTC (permalink / raw)
  To: Adam Ford, Shawn Guo
  Cc: arm-soc, Tim Harvey, Adam Ford-BE, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team, Peng Fan,
	Linux Kernel Mailing List

Am Dienstag, dem 05.04.2022 um 04:55 -0500 schrieb Adam Ford:
> On Tue, Apr 5, 2022 at 1:45 AM Shawn Guo <shawnguo@kernel.org> wrote:
> > 
> > On Thu, Mar 31, 2022 at 06:32:13AM -0500, Adam Ford wrote:
> > > On Thu, Mar 31, 2022 at 4:28 AM Lucas Stach <l.stach@pengutronix.de> wrote:
> > > > 
> > > > Hi Adam, hi Shawn,
> > > > 
> > > > Am Samstag, dem 20.11.2021 um 13:39 -0600 schrieb Adam Ford:
> > > > > Enable the vpu-h1 clock when the domain is active because reading
> > > > > or writing to the VPU-H1 IP block cause the system to hang.
> > > > > 
> > > > > Fixes: 656ade7aa42a ("soc: imx: gpcv2: keep i.MX8M* bus clocks enabled")
> > > > > Signed-off-by: Adam Ford <aford173@gmail.com>
> > > > > 
> > > > > diff --git a/drivers/soc/imx/gpcv2.c b/drivers/soc/imx/gpcv2.c
> > > > > index b8d52d8d29db..7b6dfa33dcb9 100644
> > > > > --- a/drivers/soc/imx/gpcv2.c
> > > > > +++ b/drivers/soc/imx/gpcv2.c
> > > > > @@ -734,6 +734,7 @@ static const struct imx_pgc_domain imx8mm_pgc_domains[] = {
> > > > >                       .map = IMX8MM_VPUH1_A53_DOMAIN,
> > > > >               },
> > > > >               .pgc   = BIT(IMX8MM_PGC_VPUH1),
> > > > > +             .keep_clocks = true,
> > > > >       },
> > > > > 
> > > > I missed this patch and just stumbled across it when looking at the git
> > > > history. I don't think this patch is correct. The H1 GPC domain does
> > > > not even have clocks assigned in the DT, so there is nothing to keep
> > > > active. Also H1 is not a MIX domain, so it should not keep any bus
> > > > clocks active, that is the job of the VPUMIX domain.
> > > > 
> > > > While this patch is a no-op, as far as I can see, it still seems wrong
> > > > and I think it should be reverted.
> > > 
> > > At the time I sent this, I was working with some people in the media
> > > group to split the G1 and G2 up in the imx8mq and add G1 and G2
> > > support in the imx8mm.  I had inquired about the feasibility of using
> > > the H1 encoder on the imx8mm, but I needed to read some registers from
> > > the IP block to see which features were fused out.  I tried several
> > > different options to get the H1 to not hang when reading registers,
> > > and that was the only solution I found that worked.  I thought it odd
> > > as well since the G1 and G2 decoders didn't appear to need this.
> > > However, during the course of my investigation, I learned that the
> > > JPEG encoder was fused out of the imx8mm, and there wasn't a plan to
> > > add VP8 or H.264 encodering any time soon.   Since it is, as you put
> > > it, a no-op, I have no objections to reverting it.
> > 
> > I do not quite follow.  You claimed that the change fixes a system hang.
> > Are we getting the hang back if we revert the change?
> 
> It was hanging when I has trying to use the H1 VPU, and this did fix
> it, but it seemed weird to me.  Unfortunately, Hantro H1 driver that
> is currently in Linux only supports JPEG, and the H1 VPU in the imx8mm
> has JPEG fused out.  As of right now, there is no H1 VPU consumer, so
> there is nobody attempting to enable the H1 power domain, so it
> remains a no-op.  If it's reverted, we'll have to revisit the issue in
> the future to prevent the hanging, but that will also require a new
> Hantro driver.

The H1 clock is not a bus clock, so there is nothing else that depends
on this clock than the H1 encoder peripheral, which is why it should be
handled by the future driver and not the power domain.

Regards,
Lucas


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

end of thread, other threads:[~2022-04-06  1:42 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-20 19:39 [PATCH] soc: imx: gpcv2: keep i.MX8MM VPU-H1 bus clock active Adam Ford
2021-11-20 19:39 ` Adam Ford
2021-11-20 20:52 ` Fabio Estevam
2021-11-20 20:52   ` Fabio Estevam
2021-11-23 12:20 ` Shawn Guo
2021-11-23 12:20   ` Shawn Guo
2022-03-31  9:28 ` Lucas Stach
2022-03-31  9:28   ` Lucas Stach
2022-03-31 11:32   ` Adam Ford
2022-03-31 11:32     ` Adam Ford
2022-04-05  6:44     ` Shawn Guo
2022-04-05  6:44       ` Shawn Guo
2022-04-05  9:55       ` Adam Ford
2022-04-05  9:55         ` Adam Ford
2022-04-05 10:07         ` Lucas Stach
2022-04-05 10:07           ` Lucas Stach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.