linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] media: imx-pxp: Fix operation on i.MX7
@ 2020-05-10 22:30 Laurent Pinchart
  2020-05-10 22:30 ` [PATCH 1/2] media: imx-pxp: Fix routing configuration for i.MX7 Laurent Pinchart
  2020-05-10 22:31 ` [PATCH 2/2] media: imx-pxp: Disable LUT and Rotation 0 blocks Laurent Pinchart
  0 siblings, 2 replies; 6+ messages in thread
From: Laurent Pinchart @ 2020-05-10 22:30 UTC (permalink / raw)
  To: linux-media; +Cc: linux-imx, kernel, Philipp Zabel

The i.MX7 includes a PXP that is an evolution from the i.MX6 version. It
offers more processing block in its pipeline, and by default operates in
legacy mode for i.MX6 compatibility.

To enable the extra processing blocks, the i.MX7 PXP has two extra
registers to configure routing in the internal pipeline. The values
currently programmed in these registers don't match the blocks enabled
by the driver, which makes the PXP hang without producing any frame.

This patch series fixes the issue. Patch 1/2 fixes the routing
configuration, and patch 2/2 disables unused blocks and configures
routing accordingly. The first patch is enough to use the PXP on i.MX7,
but the second patch may offer additional power saving.

The patches have been tested on an i.MX7D. Philipp, would you be able to
give them a try on i.MX6 ?

Laurent Pinchart (2):
  media: imx-pxp: Fix routing configuration for i.MX7
  media: imx-pxp: Disable LUT and Rotation 0 blocks

 drivers/media/platform/imx-pxp.c | 37 ++++++++++++++++++--------------
 1 file changed, 21 insertions(+), 16 deletions(-)

-- 
Regards,

Laurent Pinchart


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

* [PATCH 1/2] media: imx-pxp: Fix routing configuration for i.MX7
  2020-05-10 22:30 [PATCH 0/2] media: imx-pxp: Fix operation on i.MX7 Laurent Pinchart
@ 2020-05-10 22:30 ` Laurent Pinchart
  2020-05-18 13:33   ` Philipp Zabel
  2020-05-10 22:31 ` [PATCH 2/2] media: imx-pxp: Disable LUT and Rotation 0 blocks Laurent Pinchart
  1 sibling, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2020-05-10 22:30 UTC (permalink / raw)
  To: linux-media; +Cc: linux-imx, kernel, Philipp Zabel

The PXP hangs without producing any frame on the i.MX7. This is caused
by a mismatch between the routing configuration and the modules
configuration. Fix the routing configuration by

- Selecting Composite Alpha Blending/Color Key 0 (main path) as the
  input to CSC2 (MUX6).
- Connecting the Rotation 0 block in the pipeline by feeding it with
  data (MUX12) and selecting its output (MUX14).
- Disabling all other muxes () by selecting the "no output" option. The
  datasheet doesn't explicitly require this, but the PXP has been
  noticed to hang after several hundreds frames when testing routing
  with the LUT disabled and the LUT input mux (MUX9) set to MUX8. It's
  thus safer to explicitly disable all unused paths.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/media/platform/imx-pxp.c | 34 +++++++++++++++++++-------------
 1 file changed, 20 insertions(+), 14 deletions(-)

diff --git a/drivers/media/platform/imx-pxp.c b/drivers/media/platform/imx-pxp.c
index 74e16011fc09..53e3f8c8435f 100644
--- a/drivers/media/platform/imx-pxp.c
+++ b/drivers/media/platform/imx-pxp.c
@@ -911,26 +911,32 @@ static int pxp_start(struct pxp_ctx *ctx, struct vb2_v4l2_buffer *in_vb,
 	/* bypass LUT */
 	pxp_write(dev, HW_PXP_LUT_CTRL, BM_PXP_LUT_CTRL_BYPASS);
 
+	/*
+	 * Configure routing, disabling all paths that are not used by
+	 * selecting the "no output" (3) option. The datasheet doesn't
+	 * explicitly require this, but the PXP has been seen to hand after
+	 * processing a few hundreds of frames otherwise.
+	 */
 	pxp_write(dev, HW_PXP_DATA_PATH_CTRL0,
-		  BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(0)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(1)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(0)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(0)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(3)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(0)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(3)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(1)|
 		  BF_PXP_DATA_PATH_CTRL0_MUX11_SEL(0)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(0)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(3)|
 		  BF_PXP_DATA_PATH_CTRL0_MUX9_SEL(1)|
 		  BF_PXP_DATA_PATH_CTRL0_MUX8_SEL(0)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(0)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(0)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX5_SEL(0)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX4_SEL(0)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(3)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(1)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX5_SEL(3)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX4_SEL(3)|
 		  BF_PXP_DATA_PATH_CTRL0_MUX3_SEL(0)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX2_SEL(0)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX1_SEL(0)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX0_SEL(0));
+		  BF_PXP_DATA_PATH_CTRL0_MUX2_SEL(3)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX1_SEL(3)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX0_SEL(3));
 	pxp_write(dev, HW_PXP_DATA_PATH_CTRL1,
-		  BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(1) |
-		  BF_PXP_DATA_PATH_CTRL1_MUX16_SEL(1));
+		  BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(3) |
+		  BF_PXP_DATA_PATH_CTRL1_MUX16_SEL(3));
 
 	pxp_write(dev, HW_PXP_IRQ_MASK, 0xffff);
 
-- 
Regards,

Laurent Pinchart


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

* [PATCH 2/2] media: imx-pxp: Disable LUT and Rotation 0 blocks
  2020-05-10 22:30 [PATCH 0/2] media: imx-pxp: Fix operation on i.MX7 Laurent Pinchart
  2020-05-10 22:30 ` [PATCH 1/2] media: imx-pxp: Fix routing configuration for i.MX7 Laurent Pinchart
@ 2020-05-10 22:31 ` Laurent Pinchart
  1 sibling, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2020-05-10 22:31 UTC (permalink / raw)
  To: linux-media; +Cc: linux-imx, kernel, Philipp Zabel

The LUT block is configured in bypass mode, and the Rotation 0 block has
a harcoded 0 degrees rotation. Disable those two blocks, and update
routing accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/media/platform/imx-pxp.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/media/platform/imx-pxp.c b/drivers/media/platform/imx-pxp.c
index 53e3f8c8435f..f34317e4a6ed 100644
--- a/drivers/media/platform/imx-pxp.c
+++ b/drivers/media/platform/imx-pxp.c
@@ -919,12 +919,12 @@ static int pxp_start(struct pxp_ctx *ctx, struct vb2_v4l2_buffer *in_vb,
 	 */
 	pxp_write(dev, HW_PXP_DATA_PATH_CTRL0,
 		  BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(3)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(0)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(1)|
 		  BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(3)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(1)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX11_SEL(0)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(3)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX11_SEL(1)|
 		  BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(3)|
-		  BF_PXP_DATA_PATH_CTRL0_MUX9_SEL(1)|
+		  BF_PXP_DATA_PATH_CTRL0_MUX9_SEL(3)|
 		  BF_PXP_DATA_PATH_CTRL0_MUX8_SEL(0)|
 		  BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(3)|
 		  BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(1)|
@@ -944,7 +944,6 @@ static int pxp_start(struct pxp_ctx *ctx, struct vb2_v4l2_buffer *in_vb,
 	pxp_write(dev, HW_PXP_CTRL_SET, BM_PXP_CTRL_IRQ_ENABLE);
 	pxp_write(dev, HW_PXP_CTRL_SET,
 		  BM_PXP_CTRL_ENABLE | BM_PXP_CTRL_ENABLE_CSC2 |
-		  BM_PXP_CTRL_ENABLE_LUT | BM_PXP_CTRL_ENABLE_ROTATE0 |
 		  BM_PXP_CTRL_ENABLE_PS_AS_OUT);
 
 	return 0;
-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH 1/2] media: imx-pxp: Fix routing configuration for i.MX7
  2020-05-10 22:30 ` [PATCH 1/2] media: imx-pxp: Fix routing configuration for i.MX7 Laurent Pinchart
@ 2020-05-18 13:33   ` Philipp Zabel
  2020-05-18 13:54     ` Laurent Pinchart
  0 siblings, 1 reply; 6+ messages in thread
From: Philipp Zabel @ 2020-05-18 13:33 UTC (permalink / raw)
  To: Laurent Pinchart, linux-media; +Cc: linux-imx, kernel

Hi Laurent,

On Mon, 2020-05-11 at 01:30 +0300, Laurent Pinchart wrote:
> The PXP hangs without producing any frame on the i.MX7. This is caused
> by a mismatch between the routing configuration and the modules
> configuration. Fix the routing configuration by
> 
> - Selecting Composite Alpha Blending/Color Key 0 (main path) as the
>   input to CSC2 (MUX6).
> - Connecting the Rotation 0 block in the pipeline by feeding it with
>   data (MUX12) and selecting its output (MUX14).
> - Disabling all other muxes () by selecting the "no output" option. The
>   datasheet doesn't explicitly require this, but the PXP has been
>   noticed to hang after several hundreds frames when testing routing
>   with the LUT disabled and the LUT input mux (MUX9) set to MUX8. It's
>   thus safer to explicitly disable all unused paths.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  drivers/media/platform/imx-pxp.c | 34 +++++++++++++++++++-------------
>  1 file changed, 20 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/media/platform/imx-pxp.c b/drivers/media/platform/imx-pxp.c
> index 74e16011fc09..53e3f8c8435f 100644
> --- a/drivers/media/platform/imx-pxp.c
> +++ b/drivers/media/platform/imx-pxp.c
> @@ -911,26 +911,32 @@ static int pxp_start(struct pxp_ctx *ctx, struct vb2_v4l2_buffer *in_vb,
>  	/* bypass LUT */
>  	pxp_write(dev, HW_PXP_LUT_CTRL, BM_PXP_LUT_CTRL_BYPASS);
>  
> +	/*
> +	 * Configure routing, disabling all paths that are not used by
> +	 * selecting the "no output" (3) option. The datasheet doesn't
> +	 * explicitly require this, but the PXP has been seen to hand after
> +	 * processing a few hundreds of frames otherwise.
> +	 */
>  	pxp_write(dev, HW_PXP_DATA_PATH_CTRL0,

Which commit should this patch be applied on? I have a writel() here.

> -		  BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(0)|
> -		  BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(1)|
> -		  BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(0)|
> -		  BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(0)|
> +		  BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(3)|
> +		  BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(0)|
> +		  BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(3)|
> +		  BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(1)|
>  		  BF_PXP_DATA_PATH_CTRL0_MUX11_SEL(0)|
> -		  BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(0)|
> +		  BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(3)|
>  		  BF_PXP_DATA_PATH_CTRL0_MUX9_SEL(1)|
>  		  BF_PXP_DATA_PATH_CTRL0_MUX8_SEL(0)|
> -		  BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(0)|
> -		  BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(0)|
> -		  BF_PXP_DATA_PATH_CTRL0_MUX5_SEL(0)|
> -		  BF_PXP_DATA_PATH_CTRL0_MUX4_SEL(0)|
> +		  BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(3)|
> +		  BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(1)|
> +		  BF_PXP_DATA_PATH_CTRL0_MUX5_SEL(3)|
> +		  BF_PXP_DATA_PATH_CTRL0_MUX4_SEL(3)|
>  		  BF_PXP_DATA_PATH_CTRL0_MUX3_SEL(0)|
> -		  BF_PXP_DATA_PATH_CTRL0_MUX2_SEL(0)|
> -		  BF_PXP_DATA_PATH_CTRL0_MUX1_SEL(0)|
> -		  BF_PXP_DATA_PATH_CTRL0_MUX0_SEL(0));
> +		  BF_PXP_DATA_PATH_CTRL0_MUX2_SEL(3)|
> +		  BF_PXP_DATA_PATH_CTRL0_MUX1_SEL(3)|
> +		  BF_PXP_DATA_PATH_CTRL0_MUX0_SEL(3));
>  	pxp_write(dev, HW_PXP_DATA_PATH_CTRL1,
> -		  BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(1) |
> -		  BF_PXP_DATA_PATH_CTRL1_MUX16_SEL(1));
> +		  BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(3) |
> +		  BF_PXP_DATA_PATH_CTRL1_MUX16_SEL(3));

I have tried this change on i.MX6ULL / v5.6, it does not work.
The PXP interrupt never triggers.

regards
Philipp

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

* Re: [PATCH 1/2] media: imx-pxp: Fix routing configuration for i.MX7
  2020-05-18 13:33   ` Philipp Zabel
@ 2020-05-18 13:54     ` Laurent Pinchart
  2020-05-18 15:22       ` Philipp Zabel
  0 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2020-05-18 13:54 UTC (permalink / raw)
  To: Philipp Zabel; +Cc: linux-media, linux-imx, kernel

Hi Philipp,

On Mon, May 18, 2020 at 03:33:09PM +0200, Philipp Zabel wrote:
> On Mon, 2020-05-11 at 01:30 +0300, Laurent Pinchart wrote:
> > The PXP hangs without producing any frame on the i.MX7. This is caused
> > by a mismatch between the routing configuration and the modules
> > configuration. Fix the routing configuration by
> > 
> > - Selecting Composite Alpha Blending/Color Key 0 (main path) as the
> >   input to CSC2 (MUX6).
> > - Connecting the Rotation 0 block in the pipeline by feeding it with
> >   data (MUX12) and selecting its output (MUX14).
> > - Disabling all other muxes () by selecting the "no output" option. The
> >   datasheet doesn't explicitly require this, but the PXP has been
> >   noticed to hang after several hundreds frames when testing routing
> >   with the LUT disabled and the LUT input mux (MUX9) set to MUX8. It's
> >   thus safer to explicitly disable all unused paths.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > ---
> >  drivers/media/platform/imx-pxp.c | 34 +++++++++++++++++++-------------
> >  1 file changed, 20 insertions(+), 14 deletions(-)
> > 
> > diff --git a/drivers/media/platform/imx-pxp.c b/drivers/media/platform/imx-pxp.c
> > index 74e16011fc09..53e3f8c8435f 100644
> > --- a/drivers/media/platform/imx-pxp.c
> > +++ b/drivers/media/platform/imx-pxp.c
> > @@ -911,26 +911,32 @@ static int pxp_start(struct pxp_ctx *ctx, struct vb2_v4l2_buffer *in_vb,
> >  	/* bypass LUT */
> >  	pxp_write(dev, HW_PXP_LUT_CTRL, BM_PXP_LUT_CTRL_BYPASS);
> >  
> > +	/*
> > +	 * Configure routing, disabling all paths that are not used by
> > +	 * selecting the "no output" (3) option. The datasheet doesn't
> > +	 * explicitly require this, but the PXP has been seen to hand after
> > +	 * processing a few hundreds of frames otherwise.
> > +	 */
> >  	pxp_write(dev, HW_PXP_DATA_PATH_CTRL0,
> 
> Which commit should this patch be applied on? I have a writel() here.

My bad, I have a commit in my tree that wraps writel() and readl() into
inline accessors, as it made it easier during debugging to add printk()
calls there to log all register accesses. Would you accept that ? If so
I'll include it in v2.

> > -		  BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(0)|
> > -		  BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(1)|
> > -		  BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(0)|
> > -		  BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(0)|
> > +		  BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(3)|
> > +		  BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(0)|
> > +		  BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(3)|
> > +		  BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(1)|
> >  		  BF_PXP_DATA_PATH_CTRL0_MUX11_SEL(0)|
> > -		  BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(0)|
> > +		  BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(3)|
> >  		  BF_PXP_DATA_PATH_CTRL0_MUX9_SEL(1)|
> >  		  BF_PXP_DATA_PATH_CTRL0_MUX8_SEL(0)|
> > -		  BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(0)|
> > -		  BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(0)|
> > -		  BF_PXP_DATA_PATH_CTRL0_MUX5_SEL(0)|
> > -		  BF_PXP_DATA_PATH_CTRL0_MUX4_SEL(0)|
> > +		  BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(3)|
> > +		  BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(1)|
> > +		  BF_PXP_DATA_PATH_CTRL0_MUX5_SEL(3)|
> > +		  BF_PXP_DATA_PATH_CTRL0_MUX4_SEL(3)|
> >  		  BF_PXP_DATA_PATH_CTRL0_MUX3_SEL(0)|
> > -		  BF_PXP_DATA_PATH_CTRL0_MUX2_SEL(0)|
> > -		  BF_PXP_DATA_PATH_CTRL0_MUX1_SEL(0)|
> > -		  BF_PXP_DATA_PATH_CTRL0_MUX0_SEL(0));
> > +		  BF_PXP_DATA_PATH_CTRL0_MUX2_SEL(3)|
> > +		  BF_PXP_DATA_PATH_CTRL0_MUX1_SEL(3)|
> > +		  BF_PXP_DATA_PATH_CTRL0_MUX0_SEL(3));
> >  	pxp_write(dev, HW_PXP_DATA_PATH_CTRL1,
> > -		  BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(1) |
> > -		  BF_PXP_DATA_PATH_CTRL1_MUX16_SEL(1));
> > +		  BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(3) |
> > +		  BF_PXP_DATA_PATH_CTRL1_MUX16_SEL(3));
> 
> I have tried this change on i.MX6ULL / v5.6, it does not work.
> The PXP interrupt never triggers.

:-( Could you try the combination of 1/2 and 2/2 ?

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 1/2] media: imx-pxp: Fix routing configuration for i.MX7
  2020-05-18 13:54     ` Laurent Pinchart
@ 2020-05-18 15:22       ` Philipp Zabel
  0 siblings, 0 replies; 6+ messages in thread
From: Philipp Zabel @ 2020-05-18 15:22 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media, linux-imx, kernel

Hi Laurent,

On Mon, 2020-05-18 at 16:54 +0300, Laurent Pinchart wrote:
[...] 
> > > +	/*
> > > +	 * Configure routing, disabling all paths that are not used by
> > > +	 * selecting the "no output" (3) option. The datasheet doesn't
> > > +	 * explicitly require this, but the PXP has been seen to hand after
> > > +	 * processing a few hundreds of frames otherwise.
> > > +	 */
> > >  	pxp_write(dev, HW_PXP_DATA_PATH_CTRL0,
> > 
> > Which commit should this patch be applied on? I have a writel() here.
> 
> My bad, I have a commit in my tree that wraps writel() and readl() into
> inline accessors, as it made it easier during debugging to add printk()
> calls there to log all register accesses. Would you accept that ? If so
> I'll include it in v2.

Sure, go ahead.

> > > -		  BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(0)|
> > > -		  BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(1)|
> > > -		  BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(0)|
> > > -		  BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(0)|
> > > +		  BF_PXP_DATA_PATH_CTRL0_MUX15_SEL(3)|
> > > +		  BF_PXP_DATA_PATH_CTRL0_MUX14_SEL(0)|
> > > +		  BF_PXP_DATA_PATH_CTRL0_MUX13_SEL(3)|
> > > +		  BF_PXP_DATA_PATH_CTRL0_MUX12_SEL(1)|
> > >  		  BF_PXP_DATA_PATH_CTRL0_MUX11_SEL(0)|
> > > -		  BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(0)|
> > > +		  BF_PXP_DATA_PATH_CTRL0_MUX10_SEL(3)|
> > >  		  BF_PXP_DATA_PATH_CTRL0_MUX9_SEL(1)|
> > >  		  BF_PXP_DATA_PATH_CTRL0_MUX8_SEL(0)|
> > > -		  BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(0)|
> > > -		  BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(0)|
> > > -		  BF_PXP_DATA_PATH_CTRL0_MUX5_SEL(0)|
> > > -		  BF_PXP_DATA_PATH_CTRL0_MUX4_SEL(0)|
> > > +		  BF_PXP_DATA_PATH_CTRL0_MUX7_SEL(3)|
> > > +		  BF_PXP_DATA_PATH_CTRL0_MUX6_SEL(1)|
> > > +		  BF_PXP_DATA_PATH_CTRL0_MUX5_SEL(3)|
> > > +		  BF_PXP_DATA_PATH_CTRL0_MUX4_SEL(3)|
> > >  		  BF_PXP_DATA_PATH_CTRL0_MUX3_SEL(0)|
> > > -		  BF_PXP_DATA_PATH_CTRL0_MUX2_SEL(0)|
> > > -		  BF_PXP_DATA_PATH_CTRL0_MUX1_SEL(0)|
> > > -		  BF_PXP_DATA_PATH_CTRL0_MUX0_SEL(0));
> > > +		  BF_PXP_DATA_PATH_CTRL0_MUX2_SEL(3)|
> > > +		  BF_PXP_DATA_PATH_CTRL0_MUX1_SEL(3)|
> > > +		  BF_PXP_DATA_PATH_CTRL0_MUX0_SEL(3));
> > >  	pxp_write(dev, HW_PXP_DATA_PATH_CTRL1,
> > > -		  BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(1) |
> > > -		  BF_PXP_DATA_PATH_CTRL1_MUX16_SEL(1));
> > > +		  BF_PXP_DATA_PATH_CTRL1_MUX17_SEL(3) |
> > > +		  BF_PXP_DATA_PATH_CTRL1_MUX16_SEL(3));
> > 
> > I have tried this change on i.MX6ULL / v5.6, it does not work.
> > The PXP interrupt never triggers.
> 
> :-( Could you try the combination of 1/2 and 2/2 ?

With both patches applied, it still hangs.

Looking at the "PXP Architecture" Figures 41-1 in the i.MX6ULL Reference
Manual and 13-87 in the i.MX7D Reference Manual, there are quite a few
muxes dropped on i.MX6ULL, especially around the rotation engines, and
the routing is slightly different. Muxes 2, 4-7, 10, 13, and 15 are all
documented as "reserved, read-only, always 0".

We'll have to use different path control settings per compatible.

regards
Philipp

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

end of thread, other threads:[~2020-05-18 15:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 22:30 [PATCH 0/2] media: imx-pxp: Fix operation on i.MX7 Laurent Pinchart
2020-05-10 22:30 ` [PATCH 1/2] media: imx-pxp: Fix routing configuration for i.MX7 Laurent Pinchart
2020-05-18 13:33   ` Philipp Zabel
2020-05-18 13:54     ` Laurent Pinchart
2020-05-18 15:22       ` Philipp Zabel
2020-05-10 22:31 ` [PATCH 2/2] media: imx-pxp: Disable LUT and Rotation 0 blocks Laurent Pinchart

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