'bad remote port parent' warnings

Message ID CAOMZO5CRWC1qbYa3wAYfd+_ig0s9Bq2Z8Hz1SmM95Zuxb6LqRw@mail.gmail.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Fabio Estevam Nov. 22, 2018, 7:17 p.m. UTC
  Hi Philipp,

On Thu, Nov 22, 2018 at 2:27 PM Philipp Zabel <p.zabel@pengutronix.de> wrote:

> There are empty endpoint nodes (without remote-endpoint property)
> labeled ipu1_csi[01]_mux_from_parallel_sensor in the i.MX6 device trees
> for board DT implementers' convenience. See commit 2539f517acbdc ("ARM:
> dts: imx6qdl: Add video multiplexers, mipi_csi, and their connections").
>
> We had a discussion about this issue in February when this caused a
> probing error: https://patchwork.kernel.org/patch/10234469/

Thanks for the clarification.

 We could demote the warning to a debug message, make the wording a bit
> less misleading (there is no bad remote port parent, there is just no
> remote endpoint at all), or we could just accept the error message for

Something like this?

        }

And how should we treat these error probes?

[    3.449564] imx-ipuv3 2400000.ipu: driver could not parse
port@1/endpoint@0 (-22)
[    3.457342] imx-ipuv3-csi: probe of imx-ipuv3-csi.1 failed with error -22
[    3.464498] imx-ipuv3 2800000.ipu: driver could not parse
port@0/endpoint@0 (-22)
[    3.472120] imx-ipuv3-csi: probe of imx-ipuv3-csi.4 failed with error -22

Thanks
  

Comments

Sakari Ailus Nov. 23, 2018, 12:35 p.m. UTC | #1
Hi Fabio, Philipp,

On Thu, Nov 22, 2018 at 05:17:44PM -0200, Fabio Estevam wrote:
> Hi Philipp,
> 
> On Thu, Nov 22, 2018 at 2:27 PM Philipp Zabel <p.zabel@pengutronix.de> wrote:
> 
> > There are empty endpoint nodes (without remote-endpoint property)
> > labeled ipu1_csi[01]_mux_from_parallel_sensor in the i.MX6 device trees
> > for board DT implementers' convenience. See commit 2539f517acbdc ("ARM:
> > dts: imx6qdl: Add video multiplexers, mipi_csi, and their connections").
> >
> > We had a discussion about this issue in February when this caused a
> > probing error: https://patchwork.kernel.org/patch/10234469/
> 
> Thanks for the clarification.
> 
>  We could demote the warning to a debug message, make the wording a bit
> > less misleading (there is no bad remote port parent, there is just no
> > remote endpoint at all), or we could just accept the error message for
> 
> Something like this?
> 
> --- a/drivers/media/v4l2-core/v4l2-fwnode.c
> +++ b/drivers/media/v4l2-core/v4l2-fwnode.c
> @@ -613,7 +613,7 @@ v4l2_async_notifier_fwnode_parse_endpoint(struct
> device *dev,
>         asd->match.fwnode =
>                 fwnode_graph_get_remote_port_parent(endpoint);
>         if (!asd->match.fwnode) {
> -               dev_warn(dev, "bad remote port parent\n");
> +               dev_dbg(dev, "no remote endpoint found\n");

Makes sense. This is not necessarily a fatal error. Could you send a patch?

>                 ret = -ENOTCONN;
>                 goto out_err;
>         }
> 
> And how should we treat these error probes?
> 
> [    3.449564] imx-ipuv3 2400000.ipu: driver could not parse
> port@1/endpoint@0 (-22)
> [    3.457342] imx-ipuv3-csi: probe of imx-ipuv3-csi.1 failed with error -22
> [    3.464498] imx-ipuv3 2800000.ipu: driver could not parse
> port@0/endpoint@0 (-22)
> [    3.472120] imx-ipuv3-csi: probe of imx-ipuv3-csi.4 failed with error -22

I'm not sure if this is a real problem, I presume it's just that the device
has nothing connected to it, and so cannot work. Steve probably has a
better understanding of this, I'm just guessing here. :-)
  
Fabio Estevam Nov. 23, 2018, 12:54 p.m. UTC | #2
Hi Sakari,

On Fri, Nov 23, 2018 at 10:35 AM Sakari Ailus
<sakari.ailus@linux.intel.com> wrote:

> Makes sense. This is not necessarily a fatal error. Could you send a patch?

Yes, I have just sent it.

Thanks
  
Steve Longerbeam Nov. 23, 2018, 10:37 p.m. UTC | #3
Hi Fabio,

On 11/22/18 11:17 AM, Fabio Estevam wrote:
> Hi Philipp,
>
> On Thu, Nov 22, 2018 at 2:27 PM Philipp Zabel <p.zabel@pengutronix.de> wrote:
>
>> There are empty endpoint nodes (without remote-endpoint property)
>> labeled ipu1_csi[01]_mux_from_parallel_sensor in the i.MX6 device trees
>> for board DT implementers' convenience. See commit 2539f517acbdc ("ARM:
>> dts: imx6qdl: Add video multiplexers, mipi_csi, and their connections").
>>
>> We had a discussion about this issue in February when this caused a
>> probing error: https://patchwork.kernel.org/patch/10234469/
> Thanks for the clarification.
>
>   We could demote the warning to a debug message, make the wording a bit
>> less misleading (there is no bad remote port parent, there is just no
>> remote endpoint at all), or we could just accept the error message for
> Something like this?
>
> --- a/drivers/media/v4l2-core/v4l2-fwnode.c
> +++ b/drivers/media/v4l2-core/v4l2-fwnode.c
> @@ -613,7 +613,7 @@ v4l2_async_notifier_fwnode_parse_endpoint(struct
> device *dev,
>          asd->match.fwnode =
>                  fwnode_graph_get_remote_port_parent(endpoint);
>          if (!asd->match.fwnode) {
> -               dev_warn(dev, "bad remote port parent\n");
> +               dev_dbg(dev, "no remote endpoint found\n");
>                  ret = -ENOTCONN;
>                  goto out_err;
>          }
>
> And how should we treat these error probes?
>
> [    3.449564] imx-ipuv3 2400000.ipu: driver could not parse
> port@1/endpoint@0 (-22)
> [    3.457342] imx-ipuv3-csi: probe of imx-ipuv3-csi.1 failed with error -22
> [    3.464498] imx-ipuv3 2800000.ipu: driver could not parse
> port@0/endpoint@0 (-22)
> [    3.472120] imx-ipuv3-csi: probe of imx-ipuv3-csi.4 failed with error -22

Yes, this is a regression caused by the imx subdev notifier patches. 
I've already sent a patch to the list for this, see

https://www.spinics.net/lists/linux-media/msg141809.html

Steve
  
Fabio Estevam Nov. 24, 2018, 3:20 p.m. UTC | #4
Hi Steve,

On Fri, Nov 23, 2018 at 8:37 PM Steve Longerbeam <slongerbeam@gmail.com> wrote:

> Yes, this is a regression caused by the imx subdev notifier patches.
> I've already sent a patch to the list for this, see
>
> https://www.spinics.net/lists/linux-media/msg141809.html

Thanks, this fixes it.

Hopefully it will be applied as a fix for 4.20.

Thanks
  

Patch

--- a/drivers/media/v4l2-core/v4l2-fwnode.c
+++ b/drivers/media/v4l2-core/v4l2-fwnode.c
@@ -613,7 +613,7 @@  v4l2_async_notifier_fwnode_parse_endpoint(struct
device *dev,
        asd->match.fwnode =
                fwnode_graph_get_remote_port_parent(endpoint);
        if (!asd->match.fwnode) {
-               dev_warn(dev, "bad remote port parent\n");
+               dev_dbg(dev, "no remote endpoint found\n");
                ret = -ENOTCONN;
                goto out_err;