[{"id":27504,"web_url":"https://patchwork.libcamera.org/comment/27504/","msgid":"<20230706155344.GC24758@pendragon.ideasonboard.com>","date":"2023-07-06T15:53:44","subject":"Re: [libcamera-devel] [PATCH v3] libcamera: device_enumerator:\n\tensure deviceNode is not empty","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Benjamin,\n\nThank you for the patch.\n\nOn Thu, Jul 06, 2023 at 01:41:11PM +0200, Benjamin Bara via libcamera-devel wrote:\n> From: Benjamin Bara <benjamin.bara@skidata.com>\n> \n> When activating both ISP nodes on the i.MX8MP, but only connecting one\n> camera sensor, libcamera aborts because it couldn't find the chosen\n> entity's device node:\n\nWhy is this ? I assume that's because the kernel driver only registers\nsubdevs once connected sensors have been found, given that video nodes\nare there. It would be nice to record that in the commit message.\n\n> [37:54:40.779902250] [3631] DEBUG DeviceEnumerator device_enumerator.cpp:252 Added device /dev/media1: rkisp1\n> [37:54:40.780196750] [3631] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found\n> [37:54:40.780237875] [3631] DEBUG DeviceEnumerator device_enumerator.cpp:252 Added device /dev/media0: rkisp1\n> [37:54:40.780505125] [3631] DEBUG Camera camera_manager.cpp:152 Found registered pipeline handler 'PipelineHandlerRkISP1'\n> [37:54:40.780599875] [3631] DEBUG DeviceEnumerator device_enumerator.cpp:312 Successful match for media device \"rkisp1\"\n> [37:54:40.780731375] [3631] ERROR V4L2 v4l2_device.cpp:93 'rkisp1_isp': Failed to open V4L2 device '': No such file or directory\n> \n> Fix this by skipping empty device nodes:\n> \n> [37:49:05.172672000] [3603] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media1 found\n> [37:49:05.172720625] [3603] DEBUG DeviceEnumerator device_enumerator.cpp:256 Added device /dev/media1: rkisp1\n> [37:49:05.172973875] [3603] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found\n> [37:49:05.173012125] [3603] DEBUG DeviceEnumerator device_enumerator.cpp:256 Added device /dev/media0: rkisp1\n> [37:49:05.173281625] [3603] DEBUG Camera camera_manager.cpp:152 Found registered pipeline handler 'PipelineHandlerRkISP1'\n> [37:49:05.173376875] [3603] DEBUG DeviceEnumerator device_enumerator.cpp:107 Skip rkisp1_isp: no device node\n> [37:49:05.173414375] [3603] DEBUG DeviceEnumerator device_enumerator.cpp:316 Successful match for media device \"rkisp1\"\n> [37:49:05.173671250] [3603] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video1[15:cap]: Opened device platform:rkisp1: rkisp1: rkisp1_stats\n> [37:49:05.173775125] [3603] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video2[16:out]: Opened device platform:rkisp1: rkisp1: rkisp1_params\n> [37:49:05.173880500] [3603] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video0[18:cap]: Opened device platform:rkisp1: rkisp1: rkisp1\n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com>\n> ---\n> Hi!\n> \n> The dots look like this:\n> \n> /dev/media0:\n> digraph board {\n>         rankdir=TB\n>         n00000001 [label=\"{{<port0> 0 | <port1> 1} | rkisp1_isp\\n | {<port2> 2 | <port3> 3}}\", shape=Mrecord, style=filled, fillcolor=green]\n>         n00000001:port2 -> n00000006:port0\n>         n00000001:port3 -> n0000000d [style=bold]\n>         n00000006 [label=\"{{<port0> 0} | rkisp1_resizer_mainpath\\n | {<port1> 1}}\", shape=Mrecord, style=filled, fillcolor=green]\n>         n00000006:port1 -> n00000009 [style=bold]\n>         n00000009 [label=\"rkisp1_mainpath\\n/dev/video0\", shape=box, style=filled, fillcolor=yellow]\n>         n0000000d [label=\"rkisp1_stats\\n/dev/video1\", shape=box, style=filled, fillcolor=yellow]\n>         n00000011 [label=\"rkisp1_params\\n/dev/video2\", shape=box, style=filled, fillcolor=yellow]\n>         n00000011 -> n00000001:port1 [style=bold]\n>         n0000001d [label=\"{{<port0> 0} | csis-32e40000.csi\\n | {<port1> 1}}\", shape=Mrecord, style=filled, fillcolor=green]\n>         n0000001d:port1 -> n00000001:port0\n> }\n> \n> /dev/media1:\n> digraph board {\n>         rankdir=TB\n>         n00000001 [label=\"{{<port0> 0 | <port1> 1} | rkisp1_isp\\n/dev/v4l-subdev0 | {<port2> 2 | <port3> 3}}\", shape=Mrecord, style=filled, fillcolor=green]\n>         n00000001:port2 -> n00000006:port0\n>         n00000001:port3 -> n0000000d [style=bold]\n>         n00000006 [label=\"{{<port0> 0} | rkisp1_resizer_mainpath\\n/dev/v4l-subdev1 | {<port1> 1}}\", shape=Mrecord, style=filled, fillcolor=green]\n>         n00000006:port1 -> n00000009 [style=bold]\n>         n00000009 [label=\"rkisp1_mainpath\\n/dev/video3\", shape=box, style=filled, fillcolor=yellow]\n>         n0000000d [label=\"rkisp1_stats\\n/dev/video4\", shape=box, style=filled, fillcolor=yellow]\n>         n00000011 [label=\"rkisp1_params\\n/dev/video5\", shape=box, style=filled, fillcolor=yellow]\n>         n00000011 -> n00000001:port1 [style=bold]\n>         n0000001d [label=\"{{<port0> 0} | csis-32e50000.csi\\n/dev/v4l-subdev2 | {<port1> 1}}\", shape=Mrecord, style=filled, fillcolor=green]\n>         n0000001d:port1 -> n00000001:port0\n>         n00000022 [label=\"{{} | imx327 8-001a\\n/dev/v4l-subdev3 | {<port0> 0}}\", shape=Mrecord, style=filled, fillcolor=green]\n>         n00000022:port0 -> n0000001d:port0\n> }\n> ---\n> Changes in v3:\n> - adapt check (thx to Kieran)\n> - Link to v2: https://lists.libcamera.org/pipermail/libcamera-devel/2023-June/038182.html\n> \n> Changes in v2:\n> - adapt commit message\n> - Link to v1: https://lists.libcamera.org/pipermail/libcamera-devel/2023-June/038181.html\n> ---\n>  src/libcamera/device_enumerator.cpp | 10 ++++++++--\n>  1 file changed, 8 insertions(+), 2 deletions(-)\n> \n> diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp\n> index f2e055de..42b5ba6c 100644\n> --- a/src/libcamera/device_enumerator.cpp\n> +++ b/src/libcamera/device_enumerator.cpp\n> @@ -101,8 +101,14 @@ bool DeviceMatch::match(const MediaDevice *device) const\n>  \n>  \t\tfor (const MediaEntity *entity : device->entities()) {\n>  \t\t\tif (name == entity->name()) {\n> -\t\t\t\tfound = true;\n> -\t\t\t\tbreak;\n> +\t\t\t\tif (!entity->deviceNode().empty()) {\n> +\t\t\t\t\tfound = true;\n> +\t\t\t\t\tbreak;\n> +\t\t\t\t} else {\n> +\t\t\t\t\tLOG(DeviceEnumerator, Debug)\n> +\t\t\t\t\t\t<< \"Skip \" << entity->name()\n> +\t\t\t\t\t\t<< \": no device node\";\n> +\t\t\t\t}\n>  \t\t\t}\n>  \t\t}\n\nShould we break when the device node list is empty ? We can't have two\nentities in the graph with the same name. Something along the lines of\n\n\t\tfor (const MediaEntity *entity : device->entities()) {\n\t\t\tif (name == entity->name()) {\n\t\t\t\tif (entity->deviceNode().empty())\n\t\t\t\t\tLOG(DeviceEnumerator, Debug)\n\t\t\t\t\t\t<< \"Skip \" << entity->name()\n\t\t\t\t\t\t<< \": no device node\";\n\t\t\t\telse\n\t\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\nor\n\n\t\tfor (const MediaEntity *entity : device->entities()) {\n\t\t\tif (name != entity->name())\n\t\t\t\tcontinue;\n\n\t\t\tif (entity->deviceNode().empty())\n\t\t\t\tLOG(DeviceEnumerator, Debug)\n\t\t\t\t\t<< \"Skip \" << entity->name()\n\t\t\t\t\t<< \": no device node\";\n\t\t\telse\n\t\t\t\tfound = true;\n\t\t\tbreak;\n\t\t}\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  \n> \n> ---\n> base-commit: 0ee9339331c648232e87d2de2ccd5a92cc61cab2\n> change-id: 20230609-empty-devnode-36dd2647cde0","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 28519BDC71\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu,  6 Jul 2023 15:53:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 60E0E628BC;\n\tThu,  6 Jul 2023 17:53:47 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 346DC61E36\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu,  6 Jul 2023 17:53:45 +0200 (CEST)","from pendragon.ideasonboard.com (85-160-48-60.reb.o2.cz\n\t[85.160.48.60])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 5FBC96C8;\n\tThu,  6 Jul 2023 17:52:59 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1688658827;\n\tbh=ed3Blqj5csqdhcQMmcESJbooJQTZ3jOJSUgRDU9AuNY=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=J0j/F0n4CN/c5DgxEN5Cn0g2ILxfCfb8jGA9PKb+bb8tca66k+Pye9OiC7tysPVVa\n\tstrPQHeE5GP4NRD99ic93XPxphvwWTiih0p/M9hqtfvWARpv5KleZIhRuyUhxNzzJ5\n\tfZwxFFzOOKfwaCfWNqLraL3L/QkpsddtcDmoU642kXo0s89E/ozKam9Md44wsKj3BJ\n\tOvuXWKDvqVYAB5J8n0PwihUYlp8Lha0wQU1vU9abo5mTaWYhyixRe56+RSoIW8wJGx\n\tBA64C4qaOxx0Im2INEr/vmlZBOFa37UUxfymhIg5LCiAogqDy4dn+ZWcpIPePvdVN9\n\tXI5puaQo2s92Q==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1688658779;\n\tbh=ed3Blqj5csqdhcQMmcESJbooJQTZ3jOJSUgRDU9AuNY=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=QnQw5NkgvOOcPvK2CUm4NwW2hKjdqzYgHImKbx4uWPSdt3m8rNb9R50PWjbbzwIfc\n\tJGJMX/opTLYMT459WfBs56b9xUPS0cUO9wBWqYcBbbj/cS+kt64HsqtCRGxg6tX7U3\n\tOhVnBjQK+ESShzM/97fgUw4M3xcDuoeBbai/3z10="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"QnQw5Nkg\"; dkim-atps=neutral","Date":"Thu, 6 Jul 2023 18:53:44 +0300","To":"Benjamin Bara <bbara93@gmail.com>","Message-ID":"<20230706155344.GC24758@pendragon.ideasonboard.com>","References":"<20230609-empty-devnode-v3-1-c08f450ba062@skidata.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20230609-empty-devnode-v3-1-c08f450ba062@skidata.com>","Subject":"Re: [libcamera-devel] [PATCH v3] libcamera: device_enumerator:\n\tensure deviceNode is not empty","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tBenjamin Bara <benjamin.bara@skidata.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":27534,"web_url":"https://patchwork.libcamera.org/comment/27534/","msgid":"<168908315634.3585053.8046897818192998974@Monstersaurus>","date":"2023-07-11T13:45:56","subject":"Re: [libcamera-devel] [PATCH v3] libcamera: device_enumerator:\n\tensure deviceNode is not empty","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Laurent Pinchart via libcamera-devel (2023-07-06 16:53:44)\n> Hi Benjamin,\n> \n> Thank you for the patch.\n> \n> On Thu, Jul 06, 2023 at 01:41:11PM +0200, Benjamin Bara via libcamera-devel wrote:\n> > From: Benjamin Bara <benjamin.bara@skidata.com>\n> > \n> > When activating both ISP nodes on the i.MX8MP, but only connecting one\n> > camera sensor, libcamera aborts because it couldn't find the chosen\n> > entity's device node:\n> \n> Why is this ? I assume that's because the kernel driver only registers\n> subdevs once connected sensors have been found, given that video nodes\n> are there. It would be nice to record that in the commit message.\n> \n> > [37:54:40.779902250] [3631] DEBUG DeviceEnumerator device_enumerator.cpp:252 Added device /dev/media1: rkisp1\n> > [37:54:40.780196750] [3631] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found\n> > [37:54:40.780237875] [3631] DEBUG DeviceEnumerator device_enumerator.cpp:252 Added device /dev/media0: rkisp1\n> > [37:54:40.780505125] [3631] DEBUG Camera camera_manager.cpp:152 Found registered pipeline handler 'PipelineHandlerRkISP1'\n> > [37:54:40.780599875] [3631] DEBUG DeviceEnumerator device_enumerator.cpp:312 Successful match for media device \"rkisp1\"\n> > [37:54:40.780731375] [3631] ERROR V4L2 v4l2_device.cpp:93 'rkisp1_isp': Failed to open V4L2 device '': No such file or directory\n> > \n> > Fix this by skipping empty device nodes:\n> > \n> > [37:49:05.172672000] [3603] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media1 found\n> > [37:49:05.172720625] [3603] DEBUG DeviceEnumerator device_enumerator.cpp:256 Added device /dev/media1: rkisp1\n> > [37:49:05.172973875] [3603] DEBUG DeviceEnumerator device_enumerator_udev.cpp:322 All dependencies for media device /dev/media0 found\n> > [37:49:05.173012125] [3603] DEBUG DeviceEnumerator device_enumerator.cpp:256 Added device /dev/media0: rkisp1\n> > [37:49:05.173281625] [3603] DEBUG Camera camera_manager.cpp:152 Found registered pipeline handler 'PipelineHandlerRkISP1'\n> > [37:49:05.173376875] [3603] DEBUG DeviceEnumerator device_enumerator.cpp:107 Skip rkisp1_isp: no device node\n> > [37:49:05.173414375] [3603] DEBUG DeviceEnumerator device_enumerator.cpp:316 Successful match for media device \"rkisp1\"\n> > [37:49:05.173671250] [3603] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video1[15:cap]: Opened device platform:rkisp1: rkisp1: rkisp1_stats\n> > [37:49:05.173775125] [3603] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video2[16:out]: Opened device platform:rkisp1: rkisp1: rkisp1_params\n> > [37:49:05.173880500] [3603] DEBUG V4L2 v4l2_videodevice.cpp:632 /dev/video0[18:cap]: Opened device platform:rkisp1: rkisp1: rkisp1\n> > \n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> > Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com>\n> > ---\n> > Hi!\n> > \n> > The dots look like this:\n> > \n> > /dev/media0:\n> > digraph board {\n> >         rankdir=TB\n> >         n00000001 [label=\"{{<port0> 0 | <port1> 1} | rkisp1_isp\\n | {<port2> 2 | <port3> 3}}\", shape=Mrecord, style=filled, fillcolor=green]\n> >         n00000001:port2 -> n00000006:port0\n> >         n00000001:port3 -> n0000000d [style=bold]\n> >         n00000006 [label=\"{{<port0> 0} | rkisp1_resizer_mainpath\\n | {<port1> 1}}\", shape=Mrecord, style=filled, fillcolor=green]\n> >         n00000006:port1 -> n00000009 [style=bold]\n> >         n00000009 [label=\"rkisp1_mainpath\\n/dev/video0\", shape=box, style=filled, fillcolor=yellow]\n> >         n0000000d [label=\"rkisp1_stats\\n/dev/video1\", shape=box, style=filled, fillcolor=yellow]\n> >         n00000011 [label=\"rkisp1_params\\n/dev/video2\", shape=box, style=filled, fillcolor=yellow]\n> >         n00000011 -> n00000001:port1 [style=bold]\n> >         n0000001d [label=\"{{<port0> 0} | csis-32e40000.csi\\n | {<port1> 1}}\", shape=Mrecord, style=filled, fillcolor=green]\n> >         n0000001d:port1 -> n00000001:port0\n> > }\n> > \n> > /dev/media1:\n> > digraph board {\n> >         rankdir=TB\n> >         n00000001 [label=\"{{<port0> 0 | <port1> 1} | rkisp1_isp\\n/dev/v4l-subdev0 | {<port2> 2 | <port3> 3}}\", shape=Mrecord, style=filled, fillcolor=green]\n> >         n00000001:port2 -> n00000006:port0\n> >         n00000001:port3 -> n0000000d [style=bold]\n> >         n00000006 [label=\"{{<port0> 0} | rkisp1_resizer_mainpath\\n/dev/v4l-subdev1 | {<port1> 1}}\", shape=Mrecord, style=filled, fillcolor=green]\n> >         n00000006:port1 -> n00000009 [style=bold]\n> >         n00000009 [label=\"rkisp1_mainpath\\n/dev/video3\", shape=box, style=filled, fillcolor=yellow]\n> >         n0000000d [label=\"rkisp1_stats\\n/dev/video4\", shape=box, style=filled, fillcolor=yellow]\n> >         n00000011 [label=\"rkisp1_params\\n/dev/video5\", shape=box, style=filled, fillcolor=yellow]\n> >         n00000011 -> n00000001:port1 [style=bold]\n> >         n0000001d [label=\"{{<port0> 0} | csis-32e50000.csi\\n/dev/v4l-subdev2 | {<port1> 1}}\", shape=Mrecord, style=filled, fillcolor=green]\n> >         n0000001d:port1 -> n00000001:port0\n> >         n00000022 [label=\"{{} | imx327 8-001a\\n/dev/v4l-subdev3 | {<port0> 0}}\", shape=Mrecord, style=filled, fillcolor=green]\n> >         n00000022:port0 -> n0000001d:port0\n> > }\n\nThanks - that's helpful to see what was going on.\n\n\n> > ---\n> > Changes in v3:\n> > - adapt check (thx to Kieran)\n> > - Link to v2: https://lists.libcamera.org/pipermail/libcamera-devel/2023-June/038182.html\n> > \n> > Changes in v2:\n> > - adapt commit message\n> > - Link to v1: https://lists.libcamera.org/pipermail/libcamera-devel/2023-June/038181.html\n> > ---\n> >  src/libcamera/device_enumerator.cpp | 10 ++++++++--\n> >  1 file changed, 8 insertions(+), 2 deletions(-)\n> > \n> > diff --git a/src/libcamera/device_enumerator.cpp b/src/libcamera/device_enumerator.cpp\n> > index f2e055de..42b5ba6c 100644\n> > --- a/src/libcamera/device_enumerator.cpp\n> > +++ b/src/libcamera/device_enumerator.cpp\n> > @@ -101,8 +101,14 @@ bool DeviceMatch::match(const MediaDevice *device) const\n> >  \n> >               for (const MediaEntity *entity : device->entities()) {\n> >                       if (name == entity->name()) {\n> > -                             found = true;\n> > -                             break;\n> > +                             if (!entity->deviceNode().empty()) {\n> > +                                     found = true;\n> > +                                     break;\n> > +                             } else {\n> > +                                     LOG(DeviceEnumerator, Debug)\n> > +                                             << \"Skip \" << entity->name()\n> > +                                             << \": no device node\";\n> > +                             }\n> >                       }\n> >               }\n> \n> Should we break when the device node list is empty ? We can't have two\n> entities in the graph with the same name. Something along the lines of\n> \n>                 for (const MediaEntity *entity : device->entities()) {\n>                         if (name == entity->name()) {\n>                                 if (entity->deviceNode().empty())\n>                                         LOG(DeviceEnumerator, Debug)\n>                                                 << \"Skip \" << entity->name()\n>                                                 << \": no device node\";\n>                                 else\n>                                         found = true;\n>                                 break;\n>                         }\n>                 }\n> \n> or\n> \n>                 for (const MediaEntity *entity : device->entities()) {\n>                         if (name != entity->name())\n>                                 continue;\n> \n>                         if (entity->deviceNode().empty())\n>                                 LOG(DeviceEnumerator, Debug)\n>                                         << \"Skip \" << entity->name()\n>                                         << \": no device node\";\n>                         else\n>                                 found = true;\n>                         break;\n>                 }\n> \n\nBenjamin,\n\nThe second option here looks better to me overall. Do you have a\npreference? I can update the patch while applying - no need to send a\nnew patch - but the final choice is yours as it's your patch.\n\nAs this fixes a user facing issue - I'd like to get this in soon so it's\nincluded in the next release.\n\n--\nKieran\n\n\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n> >  \n> > \n> > ---\n> > base-commit: 0ee9339331c648232e87d2de2ccd5a92cc61cab2\n> > change-id: 20230609-empty-devnode-36dd2647cde0\n> \n> -- \n> Regards,\n> \n> Laurent Pinchart","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 195BCBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 11 Jul 2023 13:46:01 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 755BB628C0;\n\tTue, 11 Jul 2023 15:46:00 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 152D360570\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 11 Jul 2023 15:45:59 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 0B4BE8CC;\n\tTue, 11 Jul 2023 15:45:10 +0200 (CEST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1689083160;\n\tbh=+mkIXnWfwMa1yN85eG7OUn40tz2nWv9bZKEVeSHxlS4=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=sSZR02YcPFwD/W01P9WR+jEZxQNfYfgcySMpHH/djCA185DeW7OB9VAadktxIqmH6\n\t39eXBzXlo8v7777C38Oq3ghv+wWGevqfkxSb2h1oBrQUJZ3W+ju41vzYitDtCUHwC1\n\tDOanzSGeGNfw/dmB0r5iWLbK3ORC3xnfEdo/ogtO5st4By/Y/wAnftNqN9lX/wIeon\n\tJbB25LPDncefPWsSszQH4p0y6b8RSHaGn3a+34bD5fEfKqc06C+jrNQ30InV9Imv9x\n\tS7L0X6YcpfjfliRk1h2dmdTbjf35IytNVaoAQsbOczObUbG29ydILJ/nh8KFF1KrrW\n\tJk0TdTgHA78Hw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1689083110;\n\tbh=+mkIXnWfwMa1yN85eG7OUn40tz2nWv9bZKEVeSHxlS4=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=OctXbyr2QVXvzz29b6nBClVZ9g1dSi4ywoKxvWamMDKR9Pjzoc0fdBW6CqZ9UskEe\n\tt9wCgHg3jMS77nIEvNesF5AqK4ryKpX8PqSL3EkfNZKyhC8lGuGJum3fkCHjjE9hiV\n\tklil7oM+rcsdIRYyOzacakCbnKqDomSYxnbKQ+4k="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"OctXbyr2\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20230706155344.GC24758@pendragon.ideasonboard.com>","References":"<20230609-empty-devnode-v3-1-c08f450ba062@skidata.com>\n\t<20230706155344.GC24758@pendragon.ideasonboard.com>","To":"Benjamin Bara <bbara93@gmail.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tLaurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Date":"Tue, 11 Jul 2023 14:45:56 +0100","Message-ID":"<168908315634.3585053.8046897818192998974@Monstersaurus>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH v3] libcamera: device_enumerator:\n\tensure deviceNode is not empty","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org,\n\tBenjamin Bara <benjamin.bara@skidata.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]