[{"id":35477,"web_url":"https://patchwork.libcamera.org/comment/35477/","msgid":"<175551696444.560048.5530965395908046431@ping.linuxembedded.co.uk>","date":"2025-08-18T11:36:04","subject":"Re: [PATCH] pipeline: imx8-isi: Fix crossbar's sink pad computation","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Antoine Bouyer (2025-08-14 16:17:35)\n> In current implementation, the sink pad counter of the crossbar is not\n> incremented if the pad is not connected to any subdevice. This would lead\n> to incorrect routing and format configuration if CSI is not connected\n> to first sink pad.\n> \n> To avoid such issue, every sink pads must be taken into account. Then if\n> CSI and sensor are present, current counter is used for routing at match(),\n> and stored in camera data to be reused during configure().\n\nThis sounds pretty reasonable...\n\nAlthough it's quite intrinsically in the main path of the ISI handler.\n\nI assume this is being developed on i.MX9 ..\nCan you confirm it's tested on both i.MX8 and i.MX9?\n\nAre there any other developers or users who can provide a Tested-by: tag\nfrom NXP or otherwise?\n\n> \n> Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>\n\n\n\n> ---\n>  src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 6 +++++-\n>  1 file changed, 5 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n> index 72e055e400c6..de09431cb9b9 100644\n> --- a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n> +++ b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n> @@ -1039,7 +1039,7 @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator)\n>         for (MediaPad *pad : crossbar_->entity()->pads()) {\n>                 unsigned int sink = numSinks;\n>  \n> -               if (!(pad->flags() & MEDIA_PAD_FL_SINK) || pad->links().empty())\n> +               if (!(pad->flags() & MEDIA_PAD_FL_SINK))\n>                         continue;\n>  \n>                 /*\n> @@ -1048,6 +1048,9 @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator)\n>                  */\n>                 numSinks++;\n>  \n> +               if (pad->links().empty())\n> +                       continue;\n> +\n>                 MediaEntity *csi = pad->links()[0]->source()->entity();\n>                 if (csi->pads().size() != 2) {\n>                         LOG(ISI, Debug) << \"Skip unsupported CSI-2 receiver \"\n> @@ -1082,6 +1085,7 @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator)\n>                 LOG(ISI, Debug)\n>                         << \"cam\" << numCameras\n>                         << \" streams \" << data->streams_.size()\n> +                       << \" sink \" << data->xbarSink_\n>                         << \" offset \" << data->xbarSourceOffset_;\n>  \n>                 ret = data->init();\n> -- \n> 2.34.1\n>","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 1676FBDCC1\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 18 Aug 2025 11:36:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 68C6169261;\n\tMon, 18 Aug 2025 13:36:08 +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 0FCB269257\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 18 Aug 2025 13:36:07 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id E1EB617D1;\n\tMon, 18 Aug 2025 13:35:09 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"gBXAQ1zu\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1755516910;\n\tbh=Qzk8oKlfkPlymu0HSGHQeIi+l/ikZivtfoSAuL5jU9c=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=gBXAQ1zuh43R068XZlOyVFFjime+mBT1UiXodgUqpfBd2Ics0sBMQyKAd8nNl0zyH\n\tau/50Q4zA/fJbbCYlFlymJjukKUsOOpv39D2+7OEDI7VZBeoC20zqvInbqTsedjpdZ\n\tTzV1oIqrW18zM9vjXilfib1q60n+upw6JrLFwVBA=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250814151735.3973329-1-antoine.bouyer@nxp.com>","References":"<20250814151735.3973329-1-antoine.bouyer@nxp.com>","Subject":"Re: [PATCH] pipeline: imx8-isi: Fix crossbar's sink pad computation","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"julien.vuillaumier@nxp.com, Antoine Bouyer <antoine.bouyer@nxp.com>","To":"Antoine Bouyer <antoine.bouyer@nxp.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 18 Aug 2025 12:36:04 +0100","Message-ID":"<175551696444.560048.5530965395908046431@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35547,"web_url":"https://patchwork.libcamera.org/comment/35547/","msgid":"<20250823102334.32fee78e@alena.lan>","date":"2025-08-23T08:42:45","subject":"Re: [PATCH] pipeline: imx8-isi: Fix crossbar's sink pad computation","submitter":{"id":238,"url":"https://patchwork.libcamera.org/api/people/238/","name":"Pavel Löbl","email":"pavel@loebl.cz"},"content":"On Mon, 18 Aug 2025 12:36:04 +0100\nkieran.bingham at ideasonboard.com (Kieran Bingham) wrote:\n\n> Quoting Antoine Bouyer (2025-08-14 16:17:35)\n> > In current implementation, the sink pad counter of the crossbar is\n> > not incremented if the pad is not connected to any subdevice. This\n> > would lead to incorrect routing and format configuration if CSI is\n> > not connected to first sink pad.\n> >\n> > To avoid such issue, every sink pads must be taken into account.\n> > Then if CSI and sensor are present, current counter is used for\n> > routing at match(), and stored in camera data to be reused during\n> > configure().  \n> \n> This sounds pretty reasonable...\n> \n> Although it's quite intrinsically in the main path of the ISI handler.\n> \n> I assume this is being developed on i.MX9 ..\n> Can you confirm it's tested on both i.MX8 and i.MX9?\n> \n> Are there any other developers or users who can provide a Tested-by:\n> tag from NXP or otherwise?\n> \n\nI did exactly the same thing recently, while bringing up sensor\nconnected to second CSI of i.MX8MP, so you can add mine.\n\nTested-by: Pavel Löbl <pavel@loebl.cz>\n\nPavel\n\n> >\n> > Signed-off-by: Antoine Bouyer <antoine.bouyer at nxp.com>  \n> \n> \n> \n> > ---\n> >  src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 6 +++++-\n> >  1 file changed, 5 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n> > b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp index\n> > 72e055e400c6..de09431cb9b9 100644 ---\n> > a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp +++\n> > b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp @@ -1039,7 +1039,7\n> > @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator) for\n> > (MediaPad *pad : crossbar_->entity()->pads()) { unsigned int sink =\n> > numSinks;\n> >\n> > -               if (!(pad->flags() & MEDIA_PAD_FL_SINK) ||\n> > pad->links().empty())\n> > +               if (!(pad->flags() & MEDIA_PAD_FL_SINK))\n> >                         continue;\n> >\n> >                 /*\n> > @@ -1048,6 +1048,9 @@ bool\n> > PipelineHandlerISI::match(DeviceEnumerator *enumerator) */\n> >                 numSinks++;\n> >\n> > +               if (pad->links().empty())\n> > +                       continue;\n> > +\n> >                 MediaEntity *csi =\n> > pad->links()[0]->source()->entity(); if (csi->pads().size() != 2) {\n> >                         LOG(ISI, Debug) << \"Skip unsupported CSI-2\n> > receiver \" @@ -1082,6 +1085,7 @@ bool\n> > PipelineHandlerISI::match(DeviceEnumerator *enumerator) LOG(ISI,\n> > Debug) << \"cam\" << numCameras\n> >                         << \" streams \" << data->streams_.size()\n> > +                       << \" sink \" << data->xbarSink_\n> >                         << \" offset \" << data->xbarSourceOffset_;\n> >\n> >                 ret = data->init();\n> > --\n> > 2.34.1\n> >","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 8755DBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 23 Aug 2025 08:43:07 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C1A6A692E2;\n\tSat, 23 Aug 2025 10:43:05 +0200 (CEST)","from mxb-1-904.seznam.cz (mxb-1-904.seznam.cz\n\t[IPv6:2a02:598:128:8a00::1000:904])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DD107692CA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 23 Aug 2025 10:43:02 +0200 (CEST)","from email.seznam.cz by smtpc-mxb-5d4f748f4d-hp9qp\n\t(smtpc-mxb-5d4f748f4d-hp9qp [2a02:598:128:8a00::1000:904])\n\tid 01518d901ac3004405b43412; Sat, 23 Aug 2025 10:43:01 +0200 (CEST)","from alena.lan ([2a03:a900:1020:47::f71])\n\tby smtpd-relay-57467d77cd-msmg7 (szn-email-smtpd/2.0.60) with ESMTPA\n\tid 0a490381-0958-40c7-8e01-36005f255abb;\n\tSat, 23 Aug 2025 10:42:47 +0200"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=emailprofi.seznam.cz\n\theader.i=@emailprofi.seznam.cz header.b=\"x2KZTtcA\"; \n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=emailprofi.seznam.cz; s=szn20221014; t=1755938581;\n\tbh=s+Qw5S7bNPLp8piMGG3H5RoY5z8Vg7//6nd3J8+D1IM=;\n\th=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type:\n\tContent-Transfer-Encoding;\n\tb=x2KZTtcA7KaLyryR01EBMLdMOfkrLcHJxNv7rChxXKylxRzM4XIJpFMEy2hh7Zag7\n\t7cEcANTL9WjbVVAyYfjwBZHBsA1rLxFCdiNzEmG39qvs3dzDHmUqFkPBlpQdSRfPIL\n\tBnik4QrRRbUi85iLr9xhYV+YcxJYgtywUeHGzaKw+4QKbU3fLBGHBh/5BZtuviCogY\n\t2NyDc1worwKHg/TNLOnionib9TETp/Zt7oAgUIo/h1eHCRD327m0Bt2wrDi/6Qg6eu\n\tvSRF+7jTB8H1vOyNY2RJvbM4O7/Gv5MnzpHnQx2CXfSZw9bEC9fbKobGk0hGD2Ncls\n\tHSxlw3nylzWUg==","Date":"Sat, 23 Aug 2025 10:42:45 +0200","From":"Pavel =?utf-8?b?TMO2Ymw=?= <pavel@loebl.cz>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH] pipeline: imx8-isi: Fix crossbar's sink pad computation","Message-ID":"<20250823102334.32fee78e@alena.lan>","In-Reply-To":"<175551696444.560048.5530965395908046431@ping.linuxembedded.co.uk>","References":"<20250814151735.3973329-1-antoine.bouyer@nxp.com>\n\t<175551696444.560048.5530965395908046431@ping.linuxembedded.co.uk>","X-Mailer":"Claws Mail 4.3.1 (GTK 3.24.49; x86_64-pc-linux-gnu)","MIME-Version":"1.0","Content-Type":"text/plain; charset=UTF-8","Content-Transfer-Encoding":"quoted-printable","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35610,"web_url":"https://patchwork.libcamera.org/comment/35610/","msgid":"<306f3ae2-92c5-45de-a70f-65efe7143cce@nxp.com>","date":"2025-08-28T15:57:28","subject":"Re: [PATCH] pipeline: imx8-isi: Fix crossbar's sink pad computation","submitter":{"id":190,"url":"https://patchwork.libcamera.org/api/people/190/","name":"Julien Vuillaumier","email":"julien.vuillaumier@nxp.com"},"content":"Hi Kieran,\n\nOn 18/08/2025 13:36, Kieran Bingham wrote:\n> Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button\n> \n> \n> Quoting Antoine Bouyer (2025-08-14 16:17:35)\n>> In current implementation, the sink pad counter of the crossbar is not\n>> incremented if the pad is not connected to any subdevice. This would lead\n>> to incorrect routing and format configuration if CSI is not connected\n>> to first sink pad.\n>>\n>> To avoid such issue, every sink pads must be taken into account. Then if\n>> CSI and sensor are present, current counter is used for routing at match(),\n>> and stored in camera data to be reused during configure().\n> \n> This sounds pretty reasonable...\n> \n> Although it's quite intrinsically in the main path of the ISI handler.\n> \n> I assume this is being developed on i.MX9 ..\n> Can you confirm it's tested on both i.MX8 and i.MX9?\n> \n> Are there any other developers or users who can provide a Tested-by: tag\n> from NXP or otherwise?\n\n\nJust to confirm, that change has been verified on multiple i.MX8 \nplatforms including i.MX8M Plus with 2 cameras.\n\nTested-by: Julien Vuillaumier <julien.vuillaumier@nxp.com>\n\nFor i.MX95 support by imx8-isi pipeline, a couple of additional changes \nare still needed that will be posted here.\n\nThanks,\nJulien\n\n> \n>>\n>> Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>\n> \n> \n> \n>> ---\n>>   src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 6 +++++-\n>>   1 file changed, 5 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n>> index 72e055e400c6..de09431cb9b9 100644\n>> --- a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n>> +++ b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n>> @@ -1039,7 +1039,7 @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator)\n>>          for (MediaPad *pad : crossbar_->entity()->pads()) {\n>>                  unsigned int sink = numSinks;\n>>\n>> -               if (!(pad->flags() & MEDIA_PAD_FL_SINK) || pad->links().empty())\n>> +               if (!(pad->flags() & MEDIA_PAD_FL_SINK))\n>>                          continue;\n>>\n>>                  /*\n>> @@ -1048,6 +1048,9 @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator)\n>>                   */\n>>                  numSinks++;\n>>\n>> +               if (pad->links().empty())\n>> +                       continue;\n>> +\n>>                  MediaEntity *csi = pad->links()[0]->source()->entity();\n>>                  if (csi->pads().size() != 2) {\n>>                          LOG(ISI, Debug) << \"Skip unsupported CSI-2 receiver \"\n>> @@ -1082,6 +1085,7 @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator)\n>>                  LOG(ISI, Debug)\n>>                          << \"cam\" << numCameras\n>>                          << \" streams \" << data->streams_.size()\n>> +                       << \" sink \" << data->xbarSink_\n>>                          << \" offset \" << data->xbarSourceOffset_;\n>>\n>>                  ret = data->init();\n>> --\n>> 2.34.1\n>>","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 69EF4BD87C\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 28 Aug 2025 15:57:37 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A52CD692F3;\n\tThu, 28 Aug 2025 17:57:35 +0200 (CEST)","from MRWPR03CU001.outbound.protection.outlook.com\n\t(mail-francesouthazlp170110003.outbound.protection.outlook.com\n\t[IPv6:2a01:111:f403:c207::3])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id DF11F613B8\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 28 Aug 2025 17:57:33 +0200 (CEST)","from AM9PR04MB8147.eurprd04.prod.outlook.com\n\t(2603:10a6:20b:3e0::22)\n\tby GV1PR04MB9088.eurprd04.prod.outlook.com (2603:10a6:150:23::20)\n\twith Microsoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9073.10;\n\tThu, 28 Aug 2025 15:57:30 +0000","from AM9PR04MB8147.eurprd04.prod.outlook.com\n\t([fe80::eace:e980:28a4:ef8a]) by\n\tAM9PR04MB8147.eurprd04.prod.outlook.com\n\t([fe80::eace:e980:28a4:ef8a%6]) with mapi id 15.20.9073.014;\n\tThu, 28 Aug 2025 15:57:29 +0000"],"Authentication-Results":["lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=nxp.com header.i=@nxp.com header.b=\"NIiyprW8\";\n\tdkim-atps=neutral","dkim=none (message not signed)\n\theader.d=none;dmarc=none action=none header.from=nxp.com;"],"ARC-Seal":"i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n\tb=L7WZw7RBejKa08ZYZyQHlEP1XRGipIa770P5dx7MNV5sbUjljTca87sOmqHMHoP0Cej6T8ByljCxDQBPJudPuQmT9rPbhuGoqEVaPHsjXhimkvzOemC79a/VmMD4PsscsytQdslMcmZ4U4AoidNWD2uR6LKog9390Sq5AAfbWOrOBoqiaSojOJBZjG7fVOeFeguTUkSEDJJ8tuq/vnL6Hiy50xby4XzMad1hS9xtuGNMpAnSrCuwQUa9tVK+T7/9CXUGD1NrZMyfg5WsvB5MAVlXl2xPpR3Yu1okCu0+ihpTZ53ga4g/iORGrSpPnOQ5t5ZCkq7BBQlW7aI8ZTrrCg==","ARC-Message-Signature":"i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n\ts=arcselector10001;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n\tbh=+Cm6BW7i3L8qBtB4fTDyeT3+AUR65IWgJj+qSnLac74=;\n\tb=k/ops7c+cgCtGUGpwnVfE5Oo0AAv//yWKsNFOhXzR/+3CKzSB6QD+vKn9WQez1la/jMvAd0aYpiZSg2C2vOSuNlf7aQK4YsvEmn/wIBRqyhYTpF43AP9U+KQzwxL8ceJ6fyUXKoXD/87KJE0Rr42cgXv4wrIf/gRiy1nOw/zd0iBr5u/HwNb+G4DWr07vjeX5/QkCXTw4xNFAYAq4a0bkK2ad2bgrObkJFtYRRwaDQEeefsQACbmH2xpjyWEJid25o4BGRDbayTb/wTD0SjvP6QLmxDtMzdVryDwTGn7/XAJudjety30ue8uFbqqiwAjx8/6tGMJBpwpKJSH2pAO6A==","ARC-Authentication-Results":"i=1; mx.microsoft.com 1; spf=pass\n\tsmtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com;\n\tdkim=pass header.d=nxp.com; arc=none","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n\tbh=+Cm6BW7i3L8qBtB4fTDyeT3+AUR65IWgJj+qSnLac74=;\n\tb=NIiyprW8PGaomgz3i08RL/o3Xoq1RqYF7DaNNB2CAxOJSjMT8wwfBDGb4qQhbVVZmG5LZqwPY/2BPnvPt6TxPWzCz0Un3aUAOpVGC4uFgNxgYSMgIVe/9/4ITl6jIr6pbWzLMusqnFgc28hdPOOsriS31XMbC/83/wGIycJwTQ8UkqsjGTvdAKR393t5rC6UWPkzOxDwy5klASG0cluqcXqWWHHXzYWG8ijcHjDnOqok8/y3+DWsuN4kOpSFTfwQBNx3TkQSj8SfnIPGoostFufGNHobF9w6dpqHldOi0oj013+Kcm+Pil/aDCtNCp4ozYFr2PWdCpKqahKOHn3LSQ==","Message-ID":"<306f3ae2-92c5-45de-a70f-65efe7143cce@nxp.com>","Date":"Thu, 28 Aug 2025 17:57:28 +0200","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH] pipeline: imx8-isi: Fix crossbar's sink pad computation","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tAntoine Bouyer <antoine.bouyer@nxp.com>,\n\tlibcamera-devel@lists.libcamera.org","References":"<20250814151735.3973329-1-antoine.bouyer@nxp.com>\n\t<175551696444.560048.5530965395908046431@ping.linuxembedded.co.uk>","Content-Language":"en-US","From":"Julien Vuillaumier <julien.vuillaumier@nxp.com>","In-Reply-To":"<175551696444.560048.5530965395908046431@ping.linuxembedded.co.uk>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"7bit","X-ClientProxiedBy":"AS4P189CA0057.EURP189.PROD.OUTLOOK.COM\n\t(2603:10a6:20b:659::6) To AM9PR04MB8147.eurprd04.prod.outlook.com\n\t(2603:10a6:20b:3e0::22)","MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"AM9PR04MB8147:EE_|GV1PR04MB9088:EE_","X-MS-Office365-Filtering-Correlation-Id":"697423bb-5a9f-4bd0-da62-08dde64b973e","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"BCL:0;\n\tARA:13230040|366016|376014|19092799006|1800799024; ","X-Microsoft-Antispam-Message-Info":"=?utf-8?q?eh29f9era9BO2FP54Qv8mzw531nL?=\n\t=?utf-8?q?Mq+//WM76xBl+yPBorUxg0bwg80fKf4AFJYYZK6jg/pcxjrRD//OeQPT?=\n\t=?utf-8?q?n6u6ZivAnQU+1MUKKt1hENE7DLC8jSBlNSYmjORth+MOJQNPM7AM4XaO?=\n\t=?utf-8?q?jP9hCIe8vMJx/I1vM0RrurT5x/J1GFQ/bX3kZgoLwtk5SC/3gh5TvLXR?=\n\t=?utf-8?q?PRGrS6b7/hVY1a0GSpsFc9oV9AH99+2KEimDkGV6uXpBjcjFitX/e4Yu?=\n\t=?utf-8?q?uT3HCrUFY7zVXnZgll1gqdp9hERjIzBKt9xKPwvYPhmtBl1ZakcOA941?=\n\t=?utf-8?q?JRuXr5MkGCr6J/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NIrge67BrbMx8L3gViDa7ThIvSiJ9O5As9ar?=\n\t=?utf-8?q?6hjXz/D33ob2Z991UvE5Z4EM1hPhoo0dTIAPeHjdEP1+BFpIt+yrdQUE?=\n\t=?utf-8?q?mGN0AT2IYQIHBz86pHX7iyEA4Y/o3EOhk+c/3wcmZ0fB4YFd1iP1bTjs?=\n\t=?utf-8?q?KrbxViI1CIosxC03gD6JlrMu+t5onEd3wUwtBqTk4ghKInpQ+xX/oYz7?=\n\t=?utf-8?q?7U/TNdCgYqpEXJYrlrNFQfkL0Lx/L+EHfH1ESn4T+Jd+XTjJjlJFER5w?=\n\t=?utf-8?q?FAqF9orFV5p6N/Q2HmZ7vWo=3D?=","X-Forefront-Antispam-Report":"CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;\n\tIPV:NLI; SFV:NSPM; H:AM9PR04MB8147.eurprd04.prod.outlook.com; PTR:;\n\tCAT:NONE; \n\tSFS:(13230040)(366016)(376014)(19092799006)(1800799024); DIR:OUT;\n\tSFP:1101; ","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"1","X-MS-Exchange-AntiSpam-MessageData-0":"=?utf-8?q?sBVdVaTLsugOpcFH97Fn2EcTV?=\n\t=?utf-8?q?pq2havshdB/JLDkO/zbe6lGUJPzn4GQHcHj8IKAZPEJSI1Z3yB6R6on8?=\n\t=?utf-8?q?lyFMaiMCXAdywkZvz5hTg9qmB6ZIpQfQ8bK90qyvc1sEzhC68uF4treX?=\n\t=?utf-8?q?gbRseheTZns1vUvmWWD92w6cpT2dPD7dC9xn4txx37NZqvk3SPQBfXpe?=\n\t=?utf-8?q?GLITJpKKzGxvwU5SCbWg3j+a/Hx0Yp2utIdF0PhA2Brs40NdSpTldjlt?=\n\t=?utf-8?q?MkH2t8IEQKAQkAOJxSYb2k0V/GttxVf7mG+VJEl/WmysNYempiH80YVN?=\n\t=?utf-8?q?MegA7Uy11gAgRkTVKh6PIKkDBKW5wt/t5O6mTtdYquC6UtcKjfmyTP/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v2kFkW9GTFWD?=\n\t=?utf-8?q?zQg/fY0MFXPRFhcojM2nZY3V7tpNn30ZHR/TwNW+6gMofoXhS156mnvF?=\n\t=?utf-8?q?2ik5rhhRCySfnqO1rW9IKisg8KvW44MhQ+RvbZVtiJrKXRhRnFojSVX4?=\n\t=?utf-8?q?5fD1fWudxTD/DuDjBjYrlyIGQ3TYo9V0IrZv4aH+/W8BqQz+4SVf45S0?=\n\t=?utf-8?q?XhFqxC4tIblwqZIfq85Zm/8bOlQTGWwd3Q8owNtx9M40ZXVY/QQLWEec?=\n\t=?utf-8?q?f/rqiBMzUpgzqhuABCZbgx5naDSwMBYVMWxwed4rrGI7AZ1g5IcF7YnJ?=\n\t=?utf-8?q?0siNNFAJvG1eTjgWoFX9g5MDDUONDsV52Sy9S+b/NUw488mKDaLRo41+?=\n\t=?utf-8?q?YtJZ0csz4XfgZ3XzClVglINnO0XIW9q5iL+6YdHS336vGrnXYkIK4mvz?=\n\t=?utf-8?q?+BO3ZEBCQoGehP7dU/ecteByQR7VA=3D=3D?=","X-OriginatorOrg":"nxp.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"697423bb-5a9f-4bd0-da62-08dde64b973e","X-MS-Exchange-CrossTenant-AuthSource":"AM9PR04MB8147.eurprd04.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"28 Aug 2025 15:57:29.7400\n\t(UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"686ea1d3-bc2b-4c6f-a92c-d99c5c301635","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"K3Wlxw3rZY3fp1jkdrUwk96dtpk21g76MQ82jMXyF/uLuWJIW573lCUNl8oLFtxGIoET+pJrn4XAJ2U3/p9NtFtQ4Vl/aVhXg/EGk9HmHCE=","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"GV1PR04MB9088","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":35633,"web_url":"https://patchwork.libcamera.org/comment/35633/","msgid":"<175650341085.2433008.4725090429634028002@ping.linuxembedded.co.uk>","date":"2025-08-29T21:36:50","subject":"Re: [PATCH] pipeline: imx8-isi: Fix crossbar's sink pad computation","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Antoine Bouyer (2025-08-14 16:17:35)\n> In current implementation, the sink pad counter of the crossbar is not\n> incremented if the pad is not connected to any subdevice. This would lead\n> to incorrect routing and format configuration if CSI is not connected\n> to first sink pad.\n> \n> To avoid such issue, every sink pads must be taken into account. Then if\n> CSI and sensor are present, current counter is used for routing at match(),\n> and stored in camera data to be reused during configure().\n> \n\nOk, merging this.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Antoine Bouyer <antoine.bouyer@nxp.com>\n> ---\n>  src/libcamera/pipeline/imx8-isi/imx8-isi.cpp | 6 +++++-\n>  1 file changed, 5 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n> index 72e055e400c6..de09431cb9b9 100644\n> --- a/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n> +++ b/src/libcamera/pipeline/imx8-isi/imx8-isi.cpp\n> @@ -1039,7 +1039,7 @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator)\n>         for (MediaPad *pad : crossbar_->entity()->pads()) {\n>                 unsigned int sink = numSinks;\n>  \n> -               if (!(pad->flags() & MEDIA_PAD_FL_SINK) || pad->links().empty())\n> +               if (!(pad->flags() & MEDIA_PAD_FL_SINK))\n>                         continue;\n>  \n>                 /*\n> @@ -1048,6 +1048,9 @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator)\n>                  */\n>                 numSinks++;\n>  \n> +               if (pad->links().empty())\n> +                       continue;\n> +\n>                 MediaEntity *csi = pad->links()[0]->source()->entity();\n>                 if (csi->pads().size() != 2) {\n>                         LOG(ISI, Debug) << \"Skip unsupported CSI-2 receiver \"\n> @@ -1082,6 +1085,7 @@ bool PipelineHandlerISI::match(DeviceEnumerator *enumerator)\n>                 LOG(ISI, Debug)\n>                         << \"cam\" << numCameras\n>                         << \" streams \" << data->streams_.size()\n> +                       << \" sink \" << data->xbarSink_\n>                         << \" offset \" << data->xbarSourceOffset_;\n>  \n>                 ret = data->init();\n> -- \n> 2.34.1\n>","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 6CA4EBEFBE\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 29 Aug 2025 21:36:57 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3EC2969321;\n\tFri, 29 Aug 2025 23:36:56 +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 B02FF692E7\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 29 Aug 2025 23:36:53 +0200 (CEST)","from pendragon.ideasonboard.com\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4BF83245A;\n\tFri, 29 Aug 2025 23:35:48 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"TRuafG+h\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1756503348;\n\tbh=UlZhpjyWLT9X2TQtzhohJs4Jz7dspybkoptn2fHSaaU=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=TRuafG+h0w7db3PLrVJNildwoXwl+H3MCbawx44N6s12HuqHhq2+pXA+jslGfAgVe\n\tSbg3mRvfoVuku7SbVJDAAjHB2Ifu25ynu12vBKe4plQwshmCCPFYvDNCWqbEjjUyUG\n\tm4H/NAw3l4F6cgUKTrJFQR9yPWjToGQv6PqLTd7M=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250814151735.3973329-1-antoine.bouyer@nxp.com>","References":"<20250814151735.3973329-1-antoine.bouyer@nxp.com>","Subject":"Re: [PATCH] pipeline: imx8-isi: Fix crossbar's sink pad computation","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"julien.vuillaumier@nxp.com, Antoine Bouyer <antoine.bouyer@nxp.com>","To":"Antoine Bouyer <antoine.bouyer@nxp.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Fri, 29 Aug 2025 22:36:50 +0100","Message-ID":"<175650341085.2433008.4725090429634028002@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]