[{"id":28058,"web_url":"https://patchwork.libcamera.org/comment/28058/","msgid":"<169927124862.1817078.11223402700518257462@ping.linuxembedded.co.uk>","date":"2023-11-06T11:47:28","subject":"Re: [libcamera-devel] [PATCH] pipeline: rpi: Add some useful\n\tlogging messages","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Naushir Patuck via libcamera-devel (2023-10-24 14:27:46)\n> Add a bunch of logging messages that have come in handy debugging\n> various issues with the pipeline handler code.\n> \n\nNo specific objection to these, but some of them sound more like\n'tracepoints'. Maybe it's worth looking at that more in the future ...\nbut for now I'd say:\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 11 ++++++++++-\n>  src/libcamera/pipeline/rpi/vc4/vc4.cpp              |  3 +++\n>  2 files changed, 13 insertions(+), 1 deletion(-)\n> \n> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> index 9f788c9d1bc2..8e1cbbe67a52 100644\n> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> @@ -731,7 +731,8 @@ int PipelineHandlerBase::queueRequestDevice(Camera *camera, Request *request)\n>         if (!data->isRunning())\n>                 return -EINVAL;\n>  \n> -       LOG(RPI, Debug) << \"queueRequestDevice: New request.\";\n> +       LOG(RPI, Debug) << \"queueRequestDevice: New request sequence: \"\n> +                       << request->sequence();\n>  \n>         /* Push all buffers supplied in the Request to the respective streams. */\n>         for (auto stream : data->streams_) {\n> @@ -1436,6 +1437,8 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n>                  * Tag the buffer as completed, returning it to the\n>                  * application.\n>                  */\n> +               LOG(RPI, Debug) << \"Completing request buffer for stream \"\n> +                               << stream->name();\n>                 pipe()->completeBuffer(request, buffer);\n>         } else {\n>                 /*\n> @@ -1444,6 +1447,8 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n>                  * unconditionally for internal streams), or there is no pending\n>                  * request, so we can recycle it.\n>                  */\n> +               LOG(RPI, Debug) << \"Returning buffer to stream \"\n> +                               << stream->name();\n>                 stream->returnBuffer(buffer);\n>         }\n>  }\n> @@ -1487,6 +1492,9 @@ void CameraData::checkRequestCompleted()\n>                 if (state_ != State::IpaComplete)\n>                         return;\n>  \n> +               LOG(RPI, Debug) << \"Completing request sequence: \"\n> +                               << request->sequence();\n> +\n>                 pipe()->completeRequest(request);\n>                 requestQueue_.pop();\n>                 requestCompleted = true;\n> @@ -1499,6 +1507,7 @@ void CameraData::checkRequestCompleted()\n>         if (state_ == State::IpaComplete &&\n>             ((ispOutputCount_ == ispOutputTotal_ && dropFrameCount_) ||\n>              requestCompleted)) {\n> +               LOG(RPI, Debug) << \"Going into Idle state\";\n>                 state_ = State::Idle;\n>                 if (dropFrameCount_) {\n>                         dropFrameCount_--;\n> diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> index 616e0bc95021..816de14e5b22 100644\n> --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> @@ -283,6 +283,9 @@ int PipelineHandlerVc4::prepareBuffers(Camera *camera)\n>                         numBuffers = 1;\n>                 }\n>  \n> +               LOG(RPI, Debug) << \"Preparing \" << numBuffers\n> +                               << \" buffers for stream \" << stream->name();\n> +\n>                 ret = stream->prepareBuffers(numBuffers);\n>                 if (ret < 0)\n>                         return ret;\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 A09EBBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  6 Nov 2023 11:47:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id E9255629A2;\n\tMon,  6 Nov 2023 12:47:32 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4165561DBA\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  6 Nov 2023 12:47:31 +0100 (CET)","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 ED399583;\n\tMon,  6 Nov 2023 12:47:10 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1699271252;\n\tbh=qEAEfl9yD+CBLYloeo/QXEy7NPIm2ZoPFjCFJxWZnfk=;\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:\n\tFrom;\n\tb=yt0AhgGXxjmSIoX5nR9JNy0aAJhjdp2k4gVbaay8RPMuDsWcDb8EsLEgjgwKjU56Y\n\ti94qIqdFUbJIGbAy6hiRMvpWWuZTsTZVwgKKr/bI20JirzzRvaiqDJPVA0AGS+n4hE\n\tV45o7Hxkr2H54TwfZXHSKeS1D/hV6vlPhGOVpD5tQioRaGIYKpvvXEyERZWdKjwb/v\n\tbbEASOXznSURUY8OQsYNEvjIzlkzzUsZDX1fNCglbyEJsx+NyADSyZkPWhA0WMhe5n\n\tCTOdRl0UYvWW8Hp29jqSpKC1obmlokYHGvc7zZMzdTP6wAKLZNQ0gCO56YpySGPWnh\n\tub0mJvUfVDJlw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1699271231;\n\tbh=qEAEfl9yD+CBLYloeo/QXEy7NPIm2ZoPFjCFJxWZnfk=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=p6Q3C7HDKfJ0r8aTsKJuW/oNBSwJ+FOozjKZqyg4uRA4Bjz8iSyQ3jFs7SlPVpR/L\n\tY+dqN6hk6SJvYm7xgwlWpLgY6cckKb6VOqHL9/SMqd0AWfgh5qGw5LeVzD/h8p4VSA\n\tpVIBxpIMeKsS2n+Fv7ttuvX1F72lHWgkpY7G0hXs="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"p6Q3C7HD\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20231024132746.31689-1-naush@raspberrypi.com>","References":"<20231024132746.31689-1-naush@raspberrypi.com>","To":"Naushir Patuck <naush@raspberrypi.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Mon, 06 Nov 2023 11:47:28 +0000","Message-ID":"<169927124862.1817078.11223402700518257462@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] pipeline: rpi: Add some useful\n\tlogging messages","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>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28112,"web_url":"https://patchwork.libcamera.org/comment/28112/","msgid":"<CAEmqJPoAiiOXU4JAd1t5Dj9SqSo_oHchr6jo8H-+d+6SYM2dLg@mail.gmail.com>","date":"2023-11-21T08:37:05","subject":"Re: [libcamera-devel] [PATCH] pipeline: rpi: Add some useful\n\tlogging messages","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"Hi all,\n\nAny chance to get another R-B tag on this one so it can be merged?\n\nThanks,\nNaush\n\nOn Tue, 24 Oct 2023 at 14:27, Naushir Patuck <naush@raspberrypi.com> wrote:\n>\n> Add a bunch of logging messages that have come in handy debugging\n> various issues with the pipeline handler code.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 11 ++++++++++-\n>  src/libcamera/pipeline/rpi/vc4/vc4.cpp              |  3 +++\n>  2 files changed, 13 insertions(+), 1 deletion(-)\n>\n> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> index 9f788c9d1bc2..8e1cbbe67a52 100644\n> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> @@ -731,7 +731,8 @@ int PipelineHandlerBase::queueRequestDevice(Camera *camera, Request *request)\n>         if (!data->isRunning())\n>                 return -EINVAL;\n>\n> -       LOG(RPI, Debug) << \"queueRequestDevice: New request.\";\n> +       LOG(RPI, Debug) << \"queueRequestDevice: New request sequence: \"\n> +                       << request->sequence();\n>\n>         /* Push all buffers supplied in the Request to the respective streams. */\n>         for (auto stream : data->streams_) {\n> @@ -1436,6 +1437,8 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n>                  * Tag the buffer as completed, returning it to the\n>                  * application.\n>                  */\n> +               LOG(RPI, Debug) << \"Completing request buffer for stream \"\n> +                               << stream->name();\n>                 pipe()->completeBuffer(request, buffer);\n>         } else {\n>                 /*\n> @@ -1444,6 +1447,8 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n>                  * unconditionally for internal streams), or there is no pending\n>                  * request, so we can recycle it.\n>                  */\n> +               LOG(RPI, Debug) << \"Returning buffer to stream \"\n> +                               << stream->name();\n>                 stream->returnBuffer(buffer);\n>         }\n>  }\n> @@ -1487,6 +1492,9 @@ void CameraData::checkRequestCompleted()\n>                 if (state_ != State::IpaComplete)\n>                         return;\n>\n> +               LOG(RPI, Debug) << \"Completing request sequence: \"\n> +                               << request->sequence();\n> +\n>                 pipe()->completeRequest(request);\n>                 requestQueue_.pop();\n>                 requestCompleted = true;\n> @@ -1499,6 +1507,7 @@ void CameraData::checkRequestCompleted()\n>         if (state_ == State::IpaComplete &&\n>             ((ispOutputCount_ == ispOutputTotal_ && dropFrameCount_) ||\n>              requestCompleted)) {\n> +               LOG(RPI, Debug) << \"Going into Idle state\";\n>                 state_ = State::Idle;\n>                 if (dropFrameCount_) {\n>                         dropFrameCount_--;\n> diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> index 616e0bc95021..816de14e5b22 100644\n> --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> @@ -283,6 +283,9 @@ int PipelineHandlerVc4::prepareBuffers(Camera *camera)\n>                         numBuffers = 1;\n>                 }\n>\n> +               LOG(RPI, Debug) << \"Preparing \" << numBuffers\n> +                               << \" buffers for stream \" << stream->name();\n> +\n>                 ret = stream->prepareBuffers(numBuffers);\n>                 if (ret < 0)\n>                         return ret;\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 AA239BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Nov 2023 08:37:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0C255629BC;\n\tTue, 21 Nov 2023 09:37:38 +0100 (CET)","from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com\n\t[IPv6:2607:f8b0:4864:20::1135])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 865D961DAC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Nov 2023 09:37:35 +0100 (CET)","by mail-yw1-x1135.google.com with SMTP id\n\t00721157ae682-5c08c47c055so56810127b3.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Nov 2023 00:37:35 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1700555858;\n\tbh=/rGd5N/KXRQaWpCBtBDYJdLv4+MwmB4wGt0lG+n9VPM=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=J7EhWz5pY4D6Wg75GQIBEdhXVGDxZJqVJSldhII0xtQk5nTRuhqrDlhkcDIiDbscR\n\tLKX4lxHr6dIwzQOrq1dugd6S23x+jinuLrFyvpi6oyr/0rDu8a9em9ga/113AhOFD6\n\t9gciRw7V4mNrJbfQBuPUC7q2kAyyVJsyfHj001TZoT9upSK9aHFMdSmSIOLOoMj7S6\n\t69oQEOMJXdKJq6TXVEjpifnzmUahFheTvV+QQSpCST5/TjEQFm0GbOeWOaaFBqCOwX\n\tSv5KQPh4ZZJW25+925ZI7N23XW73pMMfQvnOz6Z9zdlMoK5ULltJVZjmKu2aOiAR2r\n\twqIB9Zd45A6qg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1700555854; x=1701160654;\n\tdarn=lists.libcamera.org; \n\th=to:subject:message-id:date:from:in-reply-to:references:mime-version\n\t:from:to:cc:subject:date:message-id:reply-to;\n\tbh=mlRva4JmIAIzXEey3rDMKBWOpVHjg20Z7aL7M6JDC1I=;\n\tb=T++p7PCfkG5Q7fFqx+Tl7aZgZVqQV8Wkfqf3Wwf0jCirsliHnM18zaOYuUXRix3pwv\n\t3/u+Rp/XV3iH22Qzw74xk2otjK4P4jHXBAvYL7EVUz8OYMiG96jsa5kg2H0KfaZgDr3S\n\tzwLI2b6lxZWTxltP0CPADUtQAAjkFppLZ7+JpHFJolNsQdyALp6x3iOzvfDUH7urjxci\n\tIzGuQMIRSTH4ndOwX5haPCWPjrql9HqR/QwUceUk679oEmFeWbACKwcHap8O4pt7SQ7m\n\tlm4foUaWD+EYw4ToG+st1XT/Ika66rqhbPeCKroGBYX7bBtMh6WwURpavceEQ018I2Tp\n\tMnQQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"T++p7PCf\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1700555854; x=1701160654;\n\th=to:subject:message-id:date:from:in-reply-to:references:mime-version\n\t:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;\n\tbh=mlRva4JmIAIzXEey3rDMKBWOpVHjg20Z7aL7M6JDC1I=;\n\tb=ZDxsvWx+OrAfZxKX0O7tHHs4wHAzK0L725cVjv5HQ8MOSfm3x2Lqf3jzYmOttLox5W\n\t+bzkFaxCbVel2HqGhv34/iUSVFy1ssCLujnw54f74IpzTDZfp1ZuCXT64z45lcCdh4OT\n\tw/VCfhWc517pEtD/kqFqzxSn5o5g9038rmD22Igq7J9c/9u+e6XKEDR6eqhHqSk0ifKE\n\tI4AcMMlZMIGE14bH08Y04FEuRYvCQUMXuuU0SogctkXUntiQ4zmQFYx8AJWdowLiTl0K\n\t5CrY6i1Aalz6Bd+Yj7lIX8QHqbZnIjz7ddEebqMlVzQB7zhF+/APzpHlYROcLVeobGRZ\n\tt4qA==","X-Gm-Message-State":"AOJu0YwDGZlRgH5/oBcVITaBKzRHGaH0KMGkfOgTuwOq4h8/D1bxi+VN\n\tMY/XnztbX7wyPsjcYWtzV4Ijbe1K9gfyBm5zHYvsDpAEI9WGK/wSBa4=","X-Google-Smtp-Source":"AGHT+IFY6fCPPubFdAe0onChsE9Pjd8An0UL1Mjn0jQIQDKs43OwMVP1ZNSkTE05XhAli+2pcn2CTWzuWcNSjNYJOLk=","X-Received":"by 2002:a05:690c:3708:b0:5ca:b13b:4951 with SMTP id\n\tfv8-20020a05690c370800b005cab13b4951mr5244207ywb.38.1700555854104;\n\tTue, 21 Nov 2023 00:37:34 -0800 (PST)","MIME-Version":"1.0","References":"<20231024132746.31689-1-naush@raspberrypi.com>","In-Reply-To":"<20231024132746.31689-1-naush@raspberrypi.com>","Date":"Tue, 21 Nov 2023 08:37:05 +0000","Message-ID":"<CAEmqJPoAiiOXU4JAd1t5Dj9SqSo_oHchr6jo8H-+d+6SYM2dLg@mail.gmail.com>","To":"libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] pipeline: rpi: Add some useful\n\tlogging messages","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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28114,"web_url":"https://patchwork.libcamera.org/comment/28114/","msgid":"<fiu6ximc4czle5a44fdpjgz22qscu56lkc27racpyhugwbt63x@edkdx7tx2zd3>","date":"2023-11-21T09:37:36","subject":"Re: [libcamera-devel] [PATCH] pipeline: rpi: Add some useful\n\tlogging messages","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Sure and sorry for the delay\n\nReviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n\nOn Tue, Nov 21, 2023 at 08:37:05AM +0000, Naushir Patuck via libcamera-devel wrote:\n> Hi all,\n>\n> Any chance to get another R-B tag on this one so it can be merged?\n>\n> Thanks,\n> Naush\n>\n> On Tue, 24 Oct 2023 at 14:27, Naushir Patuck <naush@raspberrypi.com> wrote:\n> >\n> > Add a bunch of logging messages that have come in handy debugging\n> > various issues with the pipeline handler code.\n> >\n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 11 ++++++++++-\n> >  src/libcamera/pipeline/rpi/vc4/vc4.cpp              |  3 +++\n> >  2 files changed, 13 insertions(+), 1 deletion(-)\n> >\n> > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > index 9f788c9d1bc2..8e1cbbe67a52 100644\n> > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > @@ -731,7 +731,8 @@ int PipelineHandlerBase::queueRequestDevice(Camera *camera, Request *request)\n> >         if (!data->isRunning())\n> >                 return -EINVAL;\n> >\n> > -       LOG(RPI, Debug) << \"queueRequestDevice: New request.\";\n> > +       LOG(RPI, Debug) << \"queueRequestDevice: New request sequence: \"\n> > +                       << request->sequence();\n> >\n> >         /* Push all buffers supplied in the Request to the respective streams. */\n> >         for (auto stream : data->streams_) {\n> > @@ -1436,6 +1437,8 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n> >                  * Tag the buffer as completed, returning it to the\n> >                  * application.\n> >                  */\n> > +               LOG(RPI, Debug) << \"Completing request buffer for stream \"\n> > +                               << stream->name();\n> >                 pipe()->completeBuffer(request, buffer);\n> >         } else {\n> >                 /*\n> > @@ -1444,6 +1447,8 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n> >                  * unconditionally for internal streams), or there is no pending\n> >                  * request, so we can recycle it.\n> >                  */\n> > +               LOG(RPI, Debug) << \"Returning buffer to stream \"\n> > +                               << stream->name();\n> >                 stream->returnBuffer(buffer);\n> >         }\n> >  }\n> > @@ -1487,6 +1492,9 @@ void CameraData::checkRequestCompleted()\n> >                 if (state_ != State::IpaComplete)\n> >                         return;\n> >\n> > +               LOG(RPI, Debug) << \"Completing request sequence: \"\n> > +                               << request->sequence();\n> > +\n> >                 pipe()->completeRequest(request);\n> >                 requestQueue_.pop();\n> >                 requestCompleted = true;\n> > @@ -1499,6 +1507,7 @@ void CameraData::checkRequestCompleted()\n> >         if (state_ == State::IpaComplete &&\n> >             ((ispOutputCount_ == ispOutputTotal_ && dropFrameCount_) ||\n> >              requestCompleted)) {\n> > +               LOG(RPI, Debug) << \"Going into Idle state\";\n> >                 state_ = State::Idle;\n> >                 if (dropFrameCount_) {\n> >                         dropFrameCount_--;\n> > diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > index 616e0bc95021..816de14e5b22 100644\n> > --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > @@ -283,6 +283,9 @@ int PipelineHandlerVc4::prepareBuffers(Camera *camera)\n> >                         numBuffers = 1;\n> >                 }\n> >\n> > +               LOG(RPI, Debug) << \"Preparing \" << numBuffers\n> > +                               << \" buffers for stream \" << stream->name();\n> > +\n> >                 ret = stream->prepareBuffers(numBuffers);\n> >                 if (ret < 0)\n> >                         return ret;\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 34FDFBDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Nov 2023 09:37:41 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6C251629BC;\n\tTue, 21 Nov 2023 10:37:40 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9C9FA61DAC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Nov 2023 10:37:39 +0100 (CET)","from ideasonboard.com (93-61-96-190.ip145.fastwebnet.it\n\t[93.61.96.190])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1A9622E4;\n\tTue, 21 Nov 2023 10:37:09 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1700559460;\n\tbh=v+ZMVSfZxjCVmAhOkDULhPDvLDZ8iIoKdBbBdl1+9vg=;\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=qO/WFC9smVw7ikephd7jVbwLN6I/GgYJCP5rEA+Nq1dL/5RvCYm1QQcfoFd6s8JYg\n\t433YSc/U4Fm33j2jbLkIevXYyddfrNj3y0hssvyAf8TNvMQs1OlUUKSXXcAUHlfTS2\n\tPr13D0NleIw+qZ2TjNsvxqBNTv7Hi5v42sfjJmPOdNMN2O6C68Zxp+vCCED+TbLoFY\n\tOMGb8YFSIe0KHskc+W1AkMRTW8hY4bTR8hp+7tf/zHz1CCCuCD0vuMZpS6m4u23BWV\n\tXboqKyncLgyULzEQgHkmeMPvHQc9SmPINx3KW/oWgtsayF5oTZGAOudGEB//y17jQD\n\tMvga77J9xZOwQ==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1700559429;\n\tbh=v+ZMVSfZxjCVmAhOkDULhPDvLDZ8iIoKdBbBdl1+9vg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=PyMVVoYG8hqutFNwvoxHEr7LAGucSZVvxpEvuEfaK1auk7nouDu50KJdpNCGlMLyb\n\t4mVa2QssLRKUm4DW5cRI6HbAEokNW5Dbnnoa7chjtDv7KODnW/8HWecyTGg6OsHqFX\n\tcJTWoSsJxqFQoppeu7ji19ZpZAb8tRqmpDK6Bc7E="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"PyMVVoYG\"; dkim-atps=neutral","Date":"Tue, 21 Nov 2023 10:37:36 +0100","To":"Naushir Patuck <naush@raspberrypi.com>","Message-ID":"<fiu6ximc4czle5a44fdpjgz22qscu56lkc27racpyhugwbt63x@edkdx7tx2zd3>","References":"<20231024132746.31689-1-naush@raspberrypi.com>\n\t<CAEmqJPoAiiOXU4JAd1t5Dj9SqSo_oHchr6jo8H-+d+6SYM2dLg@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAEmqJPoAiiOXU4JAd1t5Dj9SqSo_oHchr6jo8H-+d+6SYM2dLg@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH] pipeline: rpi: Add some useful\n\tlogging messages","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":"Jacopo Mondi via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28115,"web_url":"https://patchwork.libcamera.org/comment/28115/","msgid":"<CAEmqJPrC5moDgNaSV5hpjEuG0ns9AVJuomBmaExjjj3gznSq1Q@mail.gmail.com>","date":"2023-11-21T09:39:41","subject":"Re: [libcamera-devel] [PATCH] pipeline: rpi: Add some useful\n\tlogging messages","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"On Tue, 21 Nov 2023 at 09:37, Jacopo Mondi\n<jacopo.mondi@ideasonboard.com> wrote:\n>\n> Sure and sorry for the delay\n\nNo problem, and thanks! :)\n\n>\n> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>\n>\n> On Tue, Nov 21, 2023 at 08:37:05AM +0000, Naushir Patuck via libcamera-devel wrote:\n> > Hi all,\n> >\n> > Any chance to get another R-B tag on this one so it can be merged?\n> >\n> > Thanks,\n> > Naush\n> >\n> > On Tue, 24 Oct 2023 at 14:27, Naushir Patuck <naush@raspberrypi.com> wrote:\n> > >\n> > > Add a bunch of logging messages that have come in handy debugging\n> > > various issues with the pipeline handler code.\n> > >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > ---\n> > >  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 11 ++++++++++-\n> > >  src/libcamera/pipeline/rpi/vc4/vc4.cpp              |  3 +++\n> > >  2 files changed, 13 insertions(+), 1 deletion(-)\n> > >\n> > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > index 9f788c9d1bc2..8e1cbbe67a52 100644\n> > > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > @@ -731,7 +731,8 @@ int PipelineHandlerBase::queueRequestDevice(Camera *camera, Request *request)\n> > >         if (!data->isRunning())\n> > >                 return -EINVAL;\n> > >\n> > > -       LOG(RPI, Debug) << \"queueRequestDevice: New request.\";\n> > > +       LOG(RPI, Debug) << \"queueRequestDevice: New request sequence: \"\n> > > +                       << request->sequence();\n> > >\n> > >         /* Push all buffers supplied in the Request to the respective streams. */\n> > >         for (auto stream : data->streams_) {\n> > > @@ -1436,6 +1437,8 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n> > >                  * Tag the buffer as completed, returning it to the\n> > >                  * application.\n> > >                  */\n> > > +               LOG(RPI, Debug) << \"Completing request buffer for stream \"\n> > > +                               << stream->name();\n> > >                 pipe()->completeBuffer(request, buffer);\n> > >         } else {\n> > >                 /*\n> > > @@ -1444,6 +1447,8 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n> > >                  * unconditionally for internal streams), or there is no pending\n> > >                  * request, so we can recycle it.\n> > >                  */\n> > > +               LOG(RPI, Debug) << \"Returning buffer to stream \"\n> > > +                               << stream->name();\n> > >                 stream->returnBuffer(buffer);\n> > >         }\n> > >  }\n> > > @@ -1487,6 +1492,9 @@ void CameraData::checkRequestCompleted()\n> > >                 if (state_ != State::IpaComplete)\n> > >                         return;\n> > >\n> > > +               LOG(RPI, Debug) << \"Completing request sequence: \"\n> > > +                               << request->sequence();\n> > > +\n> > >                 pipe()->completeRequest(request);\n> > >                 requestQueue_.pop();\n> > >                 requestCompleted = true;\n> > > @@ -1499,6 +1507,7 @@ void CameraData::checkRequestCompleted()\n> > >         if (state_ == State::IpaComplete &&\n> > >             ((ispOutputCount_ == ispOutputTotal_ && dropFrameCount_) ||\n> > >              requestCompleted)) {\n> > > +               LOG(RPI, Debug) << \"Going into Idle state\";\n> > >                 state_ = State::Idle;\n> > >                 if (dropFrameCount_) {\n> > >                         dropFrameCount_--;\n> > > diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > index 616e0bc95021..816de14e5b22 100644\n> > > --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > @@ -283,6 +283,9 @@ int PipelineHandlerVc4::prepareBuffers(Camera *camera)\n> > >                         numBuffers = 1;\n> > >                 }\n> > >\n> > > +               LOG(RPI, Debug) << \"Preparing \" << numBuffers\n> > > +                               << \" buffers for stream \" << stream->name();\n> > > +\n> > >                 ret = stream->prepareBuffers(numBuffers);\n> > >                 if (ret < 0)\n> > >                         return ret;\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 073B3C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Nov 2023 09:40:22 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 7FB11629BD;\n\tTue, 21 Nov 2023 10:40:21 +0100 (CET)","from mail-yw1-x1135.google.com (mail-yw1-x1135.google.com\n\t[IPv6:2607:f8b0:4864:20::1135])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3C97C61DAC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Nov 2023 10:40:20 +0100 (CET)","by mail-yw1-x1135.google.com with SMTP id\n\t00721157ae682-5cb4ee00da1so7525277b3.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Nov 2023 01:40:20 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1700559621;\n\tbh=XZMzQWanLprXKmLtr6jsJaFg4+xXW/pDcS7+QELSb4I=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=VuvROpEM2iWHCtaHEkd69QhpLZBzTGhG8CwgNRaogS3MNdFREAJlnL7AAc+LZCXO0\n\tos8Eal55SuW/oaIpjSXrjqToicMlaIc1L9GWXF/kDAnsKhzA9enNXH2ndKyra9vKnq\n\t5jM1/7ngBdP815M7Rzc//U12dr0ZQzD6d3w4qBU9DARKzTcL30gFJe6wfeTnT7FhGg\n\t3aqHLWCViFUkJkgPK0Bja8XYR/fgfeRPdx8UdBhOdBWc1BaQHQcjZhOlUmc8qP1dw4\n\tV8xi4h7RcRghCjOMM+8zhgGcw/cjq8DJG76z5UOmlhIqRpl7gLXt7cdGyvwJR72+NU\n\tui8DMh9aSZKUw==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1700559619; x=1701164419;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=lXcGY/C55SGEf9+t64AgbLAaZnmhwgHnpGT2qKFNNEw=;\n\tb=YlE+/EHnvN8X2KGkt1EK1bwxnMB2pMBCBcTFUNGV9rcWJeVrkZjpMF6iLXtC4sbqom\n\tzFu6K2f5fSR630vxEDRcfxVJI8zPhqktVR1cqQ6qKeSddfXk2gfvWyEz6WFPqeJ3JP0C\n\ty1Qq0wo4Njve0JUNDRiXgIxUGgVpsKTviAjeeMg46SIaxtzv6hSOpqP3FAMgEARynqwz\n\tTBauQwxRoBIygNebDgZ4x5cf9JXEE310N+hVSijmFgUaShmszEjHD7/7KU56MVgSk02e\n\t1/bV7ip5plTuLZMGy83hueS2L7qUGOJZZ8VCDYYo3LvYrihgeA0ochtlDpq9CQS4+0rv\n\tH/8A=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"YlE+/EHn\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1700559619; x=1701164419;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=lXcGY/C55SGEf9+t64AgbLAaZnmhwgHnpGT2qKFNNEw=;\n\tb=dcZn23uR0HaR8lNi1o1vVVYjetylmGg0aaufCHKrPLhNg5kXlypbvPMzbwN3wT0c03\n\trVgDF5kFIRDO+/1eT4jVodbjjW5Bbi275mCHn5C/6BPokPLYvzdkUlMlNky3+DWR25/G\n\t6z9WV3XzeWgSKizSWnCO1so11JgeGJc+9lSD9frvcoUzbqxa55V7znTM+A4NfqUH9tWV\n\tZJEkTZoBo08Y1xlzhBLIe3W6Eo49GaIKMyjNZP8EJgUpfDA1oH510XiWIpVut6OAvJK5\n\tStSUCWOrOUQzCmWT34+KSQWnxWIyksuH5fKMST2iWjxPLdi16knrie6/pafwzrkTLSci\n\tnxuQ==","X-Gm-Message-State":"AOJu0Yxo8LpsMw+MTUkhAPmWSgTU/81PX2H7ljGihBg630C59mnJsrN6\n\tLoebWADrPDQ0DAQeeiKMp5V5dF/zGp6k9TIXTLc8WSM024dkrMFuD90=","X-Google-Smtp-Source":"AGHT+IF5tGvRuTew6bS1JWfA9v39WCH++eQ6Wj0wibjui+W/hOiZ+h5g9Sn4JU4TS2FUy9ASrRgEl53Cg4JBNNC5lEM=","X-Received":"by 2002:a81:b658:0:b0:5ca:5ee6:5254 with SMTP id\n\th24-20020a81b658000000b005ca5ee65254mr1523018ywk.21.1700559617577;\n\tTue, 21 Nov 2023 01:40:17 -0800 (PST)","MIME-Version":"1.0","References":"<20231024132746.31689-1-naush@raspberrypi.com>\n\t<CAEmqJPoAiiOXU4JAd1t5Dj9SqSo_oHchr6jo8H-+d+6SYM2dLg@mail.gmail.com>\n\t<fiu6ximc4czle5a44fdpjgz22qscu56lkc27racpyhugwbt63x@edkdx7tx2zd3>","In-Reply-To":"<fiu6ximc4czle5a44fdpjgz22qscu56lkc27racpyhugwbt63x@edkdx7tx2zd3>","Date":"Tue, 21 Nov 2023 09:39:41 +0000","Message-ID":"<CAEmqJPrC5moDgNaSV5hpjEuG0ns9AVJuomBmaExjjj3gznSq1Q@mail.gmail.com>","To":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] pipeline: rpi: Add some useful\n\tlogging messages","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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28118,"web_url":"https://patchwork.libcamera.org/comment/28118/","msgid":"<20231121095013.GG28790@pendragon.ideasonboard.com>","date":"2023-11-21T09:50:13","subject":"Re: [libcamera-devel] [PATCH] pipeline: rpi: Add some useful\n\tlogging messages","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Mon, Nov 06, 2023 at 11:47:28AM +0000, Kieran Bingham via libcamera-devel wrote:\n> Quoting Naushir Patuck via libcamera-devel (2023-10-24 14:27:46)\n> > Add a bunch of logging messages that have come in handy debugging\n> > various issues with the pipeline handler code.\n> \n> No specific objection to these, but some of them sound more like\n> 'tracepoints'. Maybe it's worth looking at that more in the future ...\n\nIndeed. Naush, have you looked at tracepoints ? I'll merge the patch in\nthe meantime, but for this kind of debugging features, you may want to\nswitch to tracing at some point. Or if the tracing infrastructure\ndoesn't provide what you need, I would be interested in knowing why, in\norder to improve it.\n\n> but for now I'd say:\n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > ---\n> >  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 11 ++++++++++-\n> >  src/libcamera/pipeline/rpi/vc4/vc4.cpp              |  3 +++\n> >  2 files changed, 13 insertions(+), 1 deletion(-)\n> > \n> > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > index 9f788c9d1bc2..8e1cbbe67a52 100644\n> > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > @@ -731,7 +731,8 @@ int PipelineHandlerBase::queueRequestDevice(Camera *camera, Request *request)\n> >         if (!data->isRunning())\n> >                 return -EINVAL;\n> >  \n> > -       LOG(RPI, Debug) << \"queueRequestDevice: New request.\";\n> > +       LOG(RPI, Debug) << \"queueRequestDevice: New request sequence: \"\n> > +                       << request->sequence();\n> >  \n> >         /* Push all buffers supplied in the Request to the respective streams. */\n> >         for (auto stream : data->streams_) {\n> > @@ -1436,6 +1437,8 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n> >                  * Tag the buffer as completed, returning it to the\n> >                  * application.\n> >                  */\n> > +               LOG(RPI, Debug) << \"Completing request buffer for stream \"\n> > +                               << stream->name();\n> >                 pipe()->completeBuffer(request, buffer);\n> >         } else {\n> >                 /*\n> > @@ -1444,6 +1447,8 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n> >                  * unconditionally for internal streams), or there is no pending\n> >                  * request, so we can recycle it.\n> >                  */\n> > +               LOG(RPI, Debug) << \"Returning buffer to stream \"\n> > +                               << stream->name();\n> >                 stream->returnBuffer(buffer);\n> >         }\n> >  }\n> > @@ -1487,6 +1492,9 @@ void CameraData::checkRequestCompleted()\n> >                 if (state_ != State::IpaComplete)\n> >                         return;\n> >  \n> > +               LOG(RPI, Debug) << \"Completing request sequence: \"\n> > +                               << request->sequence();\n> > +\n> >                 pipe()->completeRequest(request);\n> >                 requestQueue_.pop();\n> >                 requestCompleted = true;\n> > @@ -1499,6 +1507,7 @@ void CameraData::checkRequestCompleted()\n> >         if (state_ == State::IpaComplete &&\n> >             ((ispOutputCount_ == ispOutputTotal_ && dropFrameCount_) ||\n> >              requestCompleted)) {\n> > +               LOG(RPI, Debug) << \"Going into Idle state\";\n> >                 state_ = State::Idle;\n> >                 if (dropFrameCount_) {\n> >                         dropFrameCount_--;\n> > diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > index 616e0bc95021..816de14e5b22 100644\n> > --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > @@ -283,6 +283,9 @@ int PipelineHandlerVc4::prepareBuffers(Camera *camera)\n> >                         numBuffers = 1;\n> >                 }\n> >  \n> > +               LOG(RPI, Debug) << \"Preparing \" << numBuffers\n> > +                               << \" buffers for stream \" << stream->name();\n> > +\n> >                 ret = stream->prepareBuffers(numBuffers);\n> >                 if (ret < 0)\n> >                         return ret;","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 6D393C3200\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Nov 2023 09:50:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 9D2D1629BD;\n\tTue, 21 Nov 2023 10:50:08 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1C217629B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Nov 2023 10:50:07 +0100 (CET)","from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi\n\t[213.243.189.158])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8D2A636C;\n\tTue, 21 Nov 2023 10:49:36 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1700560208;\n\tbh=QQcvPjyw4NGBjtLQQpGYD1SsEflTV7VlTe7lcP53vJs=;\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=VO5ThSyyagYJr4Y54LOhejU3F4dz28FXhGsczpkq8zdHaK8xrwtal4C6YboNu718S\n\t1x8Jd+PTu7FFFiqgSPaRnuT5nHu5L7F2gHzin78fh+x3rJOn1xUlorLvvooS+36l00\n\tqi/OdNCa5WekK5g+frG46dA48IrobAbWS4amDD0L4A6i8Qxl/cBY1ZTGcN9agcAkf/\n\t6muN69IJTzHoWpFB/jTWfiOi9AwcRD+dBYoUTgf8crEy/qNSWOxVTZBoG1hfzr3APm\n\tj/nlst4EbqKtVVqbFJt5ts2hD/vAndfH/etpF8PmE/vBHAcqUkh2uc/bW9o95jUvAH\n\tRHkFfuEswxwYg==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1700560176;\n\tbh=QQcvPjyw4NGBjtLQQpGYD1SsEflTV7VlTe7lcP53vJs=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=q4SLPHZ1rs/1hXBZEU4J2nD5hAbmMQZxM3icLr1UOQuFNvvGOm9omB1IuAcmL06ap\n\tszGNsmbXDhz+dJG9dqbXDDp+TINCp+0jFsC4oKnx6Wx3gET0WaHT3XLO8EIanSpKM7\n\tyUD7H6BEKqpLzZ3ZkzAZgD+DaBWVa7d9NWFvSNqU="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"q4SLPHZ1\"; dkim-atps=neutral","Date":"Tue, 21 Nov 2023 11:50:13 +0200","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20231121095013.GG28790@pendragon.ideasonboard.com>","References":"<20231024132746.31689-1-naush@raspberrypi.com>\n\t<169927124862.1817078.11223402700518257462@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<169927124862.1817078.11223402700518257462@ping.linuxembedded.co.uk>","Subject":"Re: [libcamera-devel] [PATCH] pipeline: rpi: Add some useful\n\tlogging messages","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","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28119,"web_url":"https://patchwork.libcamera.org/comment/28119/","msgid":"<CAEmqJPozd78kcb841M304oigEQDm_LrDMBvVOQ0Zp714+vajYA@mail.gmail.com>","date":"2023-11-21T09:54:06","subject":"Re: [libcamera-devel] [PATCH] pipeline: rpi: Add some useful\n\tlogging messages","submitter":{"id":34,"url":"https://patchwork.libcamera.org/api/people/34/","name":"Naushir Patuck","email":"naush@raspberrypi.com"},"content":"On Tue, 21 Nov 2023 at 09:50, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> On Mon, Nov 06, 2023 at 11:47:28AM +0000, Kieran Bingham via libcamera-devel wrote:\n> > Quoting Naushir Patuck via libcamera-devel (2023-10-24 14:27:46)\n> > > Add a bunch of logging messages that have come in handy debugging\n> > > various issues with the pipeline handler code.\n> >\n> > No specific objection to these, but some of them sound more like\n> > 'tracepoints'. Maybe it's worth looking at that more in the future ...\n>\n> Indeed. Naush, have you looked at tracepoints ? I'll merge the patch in\n> the meantime, but for this kind of debugging features, you may want to\n> switch to tracing at some point. Or if the tracing infrastructure\n> doesn't provide what you need, I would be interested in knowing why, in\n> order to improve it.\n\nTo be honest, I have not looked into tracepoints at all so it might\nindeed be a replacement for these log messages.  I will have a look\nwhen I get a chance.\n\nRegards,\nNaush\n\n>\n> > but for now I'd say:\n> >\n> > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> >\n> > > Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> > > ---\n> > >  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 11 ++++++++++-\n> > >  src/libcamera/pipeline/rpi/vc4/vc4.cpp              |  3 +++\n> > >  2 files changed, 13 insertions(+), 1 deletion(-)\n> > >\n> > > diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > index 9f788c9d1bc2..8e1cbbe67a52 100644\n> > > --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp\n> > > @@ -731,7 +731,8 @@ int PipelineHandlerBase::queueRequestDevice(Camera *camera, Request *request)\n> > >         if (!data->isRunning())\n> > >                 return -EINVAL;\n> > >\n> > > -       LOG(RPI, Debug) << \"queueRequestDevice: New request.\";\n> > > +       LOG(RPI, Debug) << \"queueRequestDevice: New request sequence: \"\n> > > +                       << request->sequence();\n> > >\n> > >         /* Push all buffers supplied in the Request to the respective streams. */\n> > >         for (auto stream : data->streams_) {\n> > > @@ -1436,6 +1437,8 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n> > >                  * Tag the buffer as completed, returning it to the\n> > >                  * application.\n> > >                  */\n> > > +               LOG(RPI, Debug) << \"Completing request buffer for stream \"\n> > > +                               << stream->name();\n> > >                 pipe()->completeBuffer(request, buffer);\n> > >         } else {\n> > >                 /*\n> > > @@ -1444,6 +1447,8 @@ void CameraData::handleStreamBuffer(FrameBuffer *buffer, RPi::Stream *stream)\n> > >                  * unconditionally for internal streams), or there is no pending\n> > >                  * request, so we can recycle it.\n> > >                  */\n> > > +               LOG(RPI, Debug) << \"Returning buffer to stream \"\n> > > +                               << stream->name();\n> > >                 stream->returnBuffer(buffer);\n> > >         }\n> > >  }\n> > > @@ -1487,6 +1492,9 @@ void CameraData::checkRequestCompleted()\n> > >                 if (state_ != State::IpaComplete)\n> > >                         return;\n> > >\n> > > +               LOG(RPI, Debug) << \"Completing request sequence: \"\n> > > +                               << request->sequence();\n> > > +\n> > >                 pipe()->completeRequest(request);\n> > >                 requestQueue_.pop();\n> > >                 requestCompleted = true;\n> > > @@ -1499,6 +1507,7 @@ void CameraData::checkRequestCompleted()\n> > >         if (state_ == State::IpaComplete &&\n> > >             ((ispOutputCount_ == ispOutputTotal_ && dropFrameCount_) ||\n> > >              requestCompleted)) {\n> > > +               LOG(RPI, Debug) << \"Going into Idle state\";\n> > >                 state_ = State::Idle;\n> > >                 if (dropFrameCount_) {\n> > >                         dropFrameCount_--;\n> > > diff --git a/src/libcamera/pipeline/rpi/vc4/vc4.cpp b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > index 616e0bc95021..816de14e5b22 100644\n> > > --- a/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > +++ b/src/libcamera/pipeline/rpi/vc4/vc4.cpp\n> > > @@ -283,6 +283,9 @@ int PipelineHandlerVc4::prepareBuffers(Camera *camera)\n> > >                         numBuffers = 1;\n> > >                 }\n> > >\n> > > +               LOG(RPI, Debug) << \"Preparing \" << numBuffers\n> > > +                               << \" buffers for stream \" << stream->name();\n> > > +\n> > >                 ret = stream->prepareBuffers(numBuffers);\n> > >                 if (ret < 0)\n> > >                         return ret;\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 961C1BDE6B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 21 Nov 2023 09:54:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id F4010629BD;\n\tTue, 21 Nov 2023 10:54:43 +0100 (CET)","from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com\n\t[IPv6:2607:f8b0:4864:20::1133])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 11E0D629B6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Nov 2023 10:54:43 +0100 (CET)","by mail-yw1-x1133.google.com with SMTP id\n\t00721157ae682-5ac376d311aso56584997b3.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 21 Nov 2023 01:54:42 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1700560484;\n\tbh=HARQV9ochRvifIWt60Z7oA5vlkrBQSdS4ikksHg3n94=;\n\th=References:In-Reply-To:Date:To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=yK4DE7TzBGdIABN/AGOOeuS+OnMqgRX48R0LaIaPsCG6zVn/NLR3VWTmZbsuJWJkj\n\trQrVrz5Lqkf91k308Jqspn01VzIjVbN8z8Q7d6xOD1pboiG6/LCwRlzIwXOv9o1r8M\n\tMDe36DQYTWDmT0M1heX7YYxYszFyUM2WudFVS7i5dVRmzdjiqdahTEsYSBE7WXCS7P\n\tr/vkmiK5xdzse89D0Rvh2WzfMW16LY24ECUZ8P/A+dOSd6Xx8aQfatUfZmmz5axhEA\n\tUbN/lMekCG0c6xa96/YsFY4TN6iuzViySh9ceYV4f6pHwVkGyUpbR1AL05VZnPYet0\n\trXMJZwtTHC/Fg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1700560482; x=1701165282;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=KQou49JMIbz/u2UfRlpgzAiSfoDepfQ7QlH8yLATbog=;\n\tb=qnhoqhlIZ8ryoYgPef0ajICzXpIf8fi7Zo0AtOnlomz6fyjJ3ID67Bxt6ztsoWBIzJ\n\tBqqdc47BDclowg40alNhDUfP+O43u1bXoTS17xlI2z0KspQN6CFZf8Qywj5oF9EN3K6y\n\tmAbMPNrjXemAZzWjwnfSBBINXUH/7ex5jXLcIY00at55aO8zfTZX8g+vZ3MU6HT8Zwhi\n\tvk9Fjfr+oQUt5HGf9IJ6bZFAHHmjss8ND1xWwiU1Wy9DvDjN7tqPv4M8jDUvyqDi2SMd\n\t7TjghRqHk88iwhQp//6YydfXMCBSvZJeiE+BsygXKt318yyMDFb1tEz2QEMcaECpoTz7\n\t6RmA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"qnhoqhlI\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1700560482; x=1701165282;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=KQou49JMIbz/u2UfRlpgzAiSfoDepfQ7QlH8yLATbog=;\n\tb=EMMsjVhqVhe3pENbJHCRj4DKwhQ6bOFNxTPmc1sRl1EK3tsV5KfnNgNCUAlFCeVYuv\n\tmCNNjcui404uGlN9Cf+oCIeK+1ClWfI42cgJCem3sKr5XzzOfLd+6lH7acf/Q3nW/qHT\n\t2NZTqSnKADymvZcCPZBu7y6wI6v0JgvTwwXzsplYWY6I6sprCRRVAk2tl/iyvfxqLEdn\n\tLKeC9n7lJPhQwHkcbKP04/xzzO/T9llN2QuCL5Pgs1jYq7u9PQekdnM1v+mHwFQrC7dx\n\tCnljqPw88/Rcs2/ILM7Ar0Zt9m4+3JnnBQwPuLRotQsiisPWaQVy7r+Tb6V2xbf+sXzW\n\tz0dQ==","X-Gm-Message-State":"AOJu0YyBSiKToo1X70wMr1YcLjM+9NbA0Vm6cks/maMC8bWg/CZd779x\n\tjd9wYSg58RBRzoOa7Rxk+0xhhFx04BFehAhtqbxGYg==","X-Google-Smtp-Source":"AGHT+IEvHvRfCHvQwguW4ymqPx8jyc9gkG3VkKnDdV1UTYjN4ZGtcE4I6WqA6Qs7N39Oi5Xl7Vr/HkiauANtuWrGXaE=","X-Received":"by 2002:a05:690c:3486:b0:5cb:49d6:cea4 with SMTP id\n\tfo6-20020a05690c348600b005cb49d6cea4mr2508530ywb.20.1700560481698;\n\tTue, 21 Nov 2023 01:54:41 -0800 (PST)","MIME-Version":"1.0","References":"<20231024132746.31689-1-naush@raspberrypi.com>\n\t<169927124862.1817078.11223402700518257462@ping.linuxembedded.co.uk>\n\t<20231121095013.GG28790@pendragon.ideasonboard.com>","In-Reply-To":"<20231121095013.GG28790@pendragon.ideasonboard.com>","Date":"Tue, 21 Nov 2023 09:54:06 +0000","Message-ID":"<CAEmqJPozd78kcb841M304oigEQDm_LrDMBvVOQ0Zp714+vajYA@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH] pipeline: rpi: Add some useful\n\tlogging messages","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":"Naushir Patuck via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Naushir Patuck <naush@raspberrypi.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]