[{"id":33522,"web_url":"https://patchwork.libcamera.org/comment/33522/","msgid":"<174087105270.3864332.18413654734348858759@ping.linuxembedded.co.uk>","date":"2025-03-01T23:17:32","subject":"Re: [PATCH v5 1/5] libcamera: v4l2_device: add frame start event\n\thelpers","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stanislaw Gruszka (2025-02-25 16:41:12)\n> Add helper to check if frame start event are supported by subdevice.\n> Since kernel does not have interface to query supported events\n> use subscribe interface.\n> \n> Additionally add helper for checking if the event enabled.\n> Will be needed later to proper code flow if enabling the event\n> fail for some reason.\n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> # v3\n> Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>\n> ---\n>  include/libcamera/internal/v4l2_device.h |  1 +\n>  src/libcamera/v4l2_device.cpp            | 19 +++++++++++++++++++\n>  2 files changed, 20 insertions(+)\n> \n> diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h\n> index affe52c2..a647c96a 100644\n> --- a/include/libcamera/internal/v4l2_device.h\n> +++ b/include/libcamera/internal/v4l2_device.h\n> @@ -45,6 +45,7 @@ public:\n>         const std::string &deviceNode() const { return deviceNode_; }\n>         std::string devicePath() const;\n>  \n> +       bool supportsFrameStartEvent();\n>         int setFrameStartEnabled(bool enable);\n>         Signal<uint32_t> frameStart;\n>  \n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 2f65a43a..23c7d1ef 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -449,6 +449,25 @@ std::string V4L2Device::devicePath() const\n>         return path;\n>  }\n>  \n> +/**\n> + * \\brief Check if frame start event is supported\n> + * \\return True if frame start event is supported, false otherwise\n> + */\n> +\n> +bool V4L2Device::supportsFrameStartEvent()\n> +{\n> +       struct v4l2_event_subscription event {\n> +       };\n\nCuriously my local clang-format is trying to make this one line, but the\nCI doesn't report anything here.\n\nSo I'll leave it as it is ;-)\n\nAha, and I've already got a tag on here so ... to the next one.\n\n--\nKieran\n\n> +       event.type = V4L2_EVENT_FRAME_SYNC;\n> +\n> +       int ret = ioctl(VIDIOC_SUBSCRIBE_EVENT, &event);\n> +       if (ret)\n> +               return false;\n> +\n> +       ioctl(VIDIOC_UNSUBSCRIBE_EVENT, &event);\n> +       return true;\n> +}\n> +\n>  /**\n>   * \\brief Enable or disable frame start event notification\n>   * \\param[in] enable True to enable frame start events, false to disable them\n> -- \n> 2.43.0\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 6937FC3259\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat,  1 Mar 2025 23:17:39 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 757DA61853;\n\tSun,  2 Mar 2025 00:17:38 +0100 (CET)","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 07EA2614EB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  2 Mar 2025 00:17:36 +0100 (CET)","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 7C047666;\n\tSun,  2 Mar 2025 00:16:05 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"H40N2AYu\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1740870965;\n\tbh=aZc/nWTYRxY5jpzgW5Mj8i+8l0F9hRTcVJDzjjbxN6s=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=H40N2AYurjzJLvFsLxriD/sf5ViFYc2zFrsx9swBdCmdOabYosh2ALYDxgWNjxfW1\n\twZLbYIuilCyDF7o9kHCOovZVXsNUV4gEa2Tv3NUjoTwwsO768s/TUWiXo6KYJ+Jd/r\n\tsRzlDiuvWDqoA+XHjl0GdaLwNEo/2J6WzumawdH0=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20250225164116.414301-2-stanislaw.gruszka@linux.intel.com>","References":"<20250225164116.414301-1-stanislaw.gruszka@linux.intel.com>\n\t<20250225164116.414301-2-stanislaw.gruszka@linux.intel.com>","Subject":"Re: [PATCH v5 1/5] libcamera: v4l2_device: add frame start event\n\thelpers","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Milan Zamazal <mzamazal@redhat.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tHans de Goede <hdegoede@redhat.com>","To":"Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>,\n\tlibcamera-devel@lists.libcamera.org","Date":"Sat, 01 Mar 2025 23:17:32 +0000","Message-ID":"<174087105270.3864332.18413654734348858759@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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":33527,"web_url":"https://patchwork.libcamera.org/comment/33527/","msgid":"<20250302003841.GC18557@pendragon.ideasonboard.com>","date":"2025-03-02T00:38:41","subject":"Re: [PATCH v5 1/5] libcamera: v4l2_device: add frame start event\n\thelpers","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Stan,\n\nThank you for the patch.\n\nOn Tue, Feb 25, 2025 at 05:41:12PM +0100, Stanislaw Gruszka wrote:\n> Add helper to check if frame start event are supported by subdevice.\n> Since kernel does not have interface to query supported events\n> use subscribe interface.\n> \n> Additionally add helper for checking if the event enabled.\n> Will be needed later to proper code flow if enabling the event\n> fail for some reason.\n> \n\nThat paragraph should be dropped, that second helper has been removed.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> # v3\n> Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>\n> ---\n>  include/libcamera/internal/v4l2_device.h |  1 +\n>  src/libcamera/v4l2_device.cpp            | 19 +++++++++++++++++++\n>  2 files changed, 20 insertions(+)\n> \n> diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h\n> index affe52c2..a647c96a 100644\n> --- a/include/libcamera/internal/v4l2_device.h\n> +++ b/include/libcamera/internal/v4l2_device.h\n> @@ -45,6 +45,7 @@ public:\n>  \tconst std::string &deviceNode() const { return deviceNode_; }\n>  \tstd::string devicePath() const;\n>  \n> +\tbool supportsFrameStartEvent();\n>  \tint setFrameStartEnabled(bool enable);\n>  \tSignal<uint32_t> frameStart;\n>  \n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 2f65a43a..23c7d1ef 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -449,6 +449,25 @@ std::string V4L2Device::devicePath() const\n>  \treturn path;\n>  }\n>  \n> +/**\n> + * \\brief Check if frame start event is supported\n> + * \\return True if frame start event is supported, false otherwise\n> + */\n> +\n> +bool V4L2Device::supportsFrameStartEvent()\n> +{\n> +\tstruct v4l2_event_subscription event {\n> +\t};\n> +\tevent.type = V4L2_EVENT_FRAME_SYNC;\n> +\n> +\tint ret = ioctl(VIDIOC_SUBSCRIBE_EVENT, &event);\n> +\tif (ret)\n> +\t\treturn false;\n> +\n> +\tioctl(VIDIOC_UNSUBSCRIBE_EVENT, &event);\n> +\treturn true;\n> +}\n> +\n>  /**\n>   * \\brief Enable or disable frame start event notification\n>   * \\param[in] enable True to enable frame start events, false to disable them","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 C6D2CC3263\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun,  2 Mar 2025 00:39:02 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5F74868779;\n\tSun,  2 Mar 2025 01:39:01 +0100 (CET)","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 F1DF461833\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun,  2 Mar 2025 01:38:59 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-231.bb.dnainternet.fi\n\t[81.175.209.231])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 4E9D5670;\n\tSun,  2 Mar 2025 01:37:29 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"FUaPKQfX\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1740875849;\n\tbh=5vLK13DsmvIK8F2rsJIN3lrlNGI1BtzHZyOZ8yuK5sg=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=FUaPKQfXnXKR8pzLqbLXsPPa+fHb2+zVXB+scBSIFsn/n0VonIyCCUBsCgiPvDWEz\n\t85+f/p/3+flUaN5VXHiXpuQ/hwY3ZkCqjUGxg4PvgnuN5VmRg3kskdfllksCEKa7xN\n\toneVVCo6lTIcRSGPQqrxloIL9sczjDLOMiWpqNNM=","Date":"Sun, 2 Mar 2025 02:38:41 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>","Cc":"libcamera-devel@lists.libcamera.org, Milan Zamazal <mzamazal@redhat.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tHans de Goede <hdegoede@redhat.com>","Subject":"Re: [PATCH v5 1/5] libcamera: v4l2_device: add frame start event\n\thelpers","Message-ID":"<20250302003841.GC18557@pendragon.ideasonboard.com>","References":"<20250225164116.414301-1-stanislaw.gruszka@linux.intel.com>\n\t<20250225164116.414301-2-stanislaw.gruszka@linux.intel.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20250225164116.414301-2-stanislaw.gruszka@linux.intel.com>","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":33533,"web_url":"https://patchwork.libcamera.org/comment/33533/","msgid":"<Z8WD3jrb4ZweRap4@linux.intel.com>","date":"2025-03-03T10:26:38","subject":"Re: [PATCH v5 1/5] libcamera: v4l2_device: add frame start event\n\thelpers","submitter":{"id":211,"url":"https://patchwork.libcamera.org/api/people/211/","name":"Stanislaw Gruszka","email":"stanislaw.gruszka@linux.intel.com"},"content":"Hi Kieran,\n\nOn Sat, Mar 01, 2025 at 11:17:32PM +0000, Kieran Bingham wrote:\n> Quoting Stanislaw Gruszka (2025-02-25 16:41:12)\n> >  \n> > +/**\n> > + * \\brief Check if frame start event is supported\n> > + * \\return True if frame start event is supported, false otherwise\n> > + */\n> > +\n> > +bool V4L2Device::supportsFrameStartEvent()\n> > +{\n> > +       struct v4l2_event_subscription event {\n> > +       };\n> \n> Curiously my local clang-format is trying to make this one line, but the\n> CI doesn't report anything here.\n> \n> So I'll leave it as it is ;-)\n> \n> Aha, and I've already got a tag on here so ... to the next one.\n\nDoes it mean you have a clang-format-ignore file ?\n\nRegards\nStanislaw","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 B37C3BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Mar 2025 10:26:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AF2F268778;\n\tMon,  3 Mar 2025 11:26:47 +0100 (CET)","from mgamail.intel.com (mgamail.intel.com [198.175.65.11])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 4EBAF68772\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Mar 2025 11:26:45 +0100 (CET)","from orviesa003.jf.intel.com ([10.64.159.143])\n\tby orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n\t03 Mar 2025 02:26:44 -0800","from sgruszka-mobl.ger.corp.intel.com (HELO localhost)\n\t([10.245.112.97]) by ORVIESA003-auth.jf.intel.com with\n\tESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2025 02:26:40 -0800"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=intel.com header.i=@intel.com\n\theader.b=\"IFONhe6O\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n\tt=1740997606; x=1772533606;\n\th=date:from:to:cc:subject:message-id:references:\n\tmime-version:in-reply-to;\n\tbh=GmkxFiB3F/WhxYPBYfPdKvp9iwXwNKZz0RweV41C0hw=;\n\tb=IFONhe6O+n3FEs9TYzpPWw48b4FsNJsDidZRLvDbxpQ2ZI/iJrV0KUXM\n\tKUr5+NN6H2ad7XRP7hLx67mB9khavAZXQSS1jYq56E/7rosOCz0z/Z0ej\n\tmi5qBUpm1S6zXBN7VjNFrgUyE6Is/Nz4xKYbbZp8kOKZPdOn/AQy+a3HT\n\tcuRKpoV843ECFwsdZbyepX/fAlt2eNkA1CccTfC93Mr57rWve/HbdDtW5\n\tN4/6Fg8P1H2y3i9gkfgXdYb4NHDUcu0wbyc8tD1R3GIQDhaUbah1k3V98\n\tlDtbdYbhSbNt3WhsipL0DNwyt7FNZv4CEOUQkc8tuiy+KPL9xNA3uZK7D Q==;","X-CSE-ConnectionGUID":["RCQ1fW1CQamtSFqBrgpYNg==","EEDthHX3TBWACImg/Ua5cQ=="],"X-CSE-MsgGUID":["AE6rprclQZKhnXD27I6VEQ==","6TEno8AARM2Tf98oMz2iIw=="],"X-IronPort-AV":["E=McAfee;i=\"6700,10204,11361\"; a=\"52072068\"","E=Sophos;i=\"6.13,329,1732608000\"; d=\"scan'208\";a=\"52072068\"","E=Sophos;i=\"6.13,329,1732608000\"; d=\"scan'208\";a=\"122919002\""],"X-ExtLoop1":"1","Date":"Mon, 3 Mar 2025 11:26:38 +0100","From":"Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, Milan Zamazal <mzamazal@redhat.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tHans de Goede <hdegoede@redhat.com>","Subject":"Re: [PATCH v5 1/5] libcamera: v4l2_device: add frame start event\n\thelpers","Message-ID":"<Z8WD3jrb4ZweRap4@linux.intel.com>","References":"<20250225164116.414301-1-stanislaw.gruszka@linux.intel.com>\n\t<20250225164116.414301-2-stanislaw.gruszka@linux.intel.com>\n\t<174087105270.3864332.18413654734348858759@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<174087105270.3864332.18413654734348858759@ping.linuxembedded.co.uk>","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":33536,"web_url":"https://patchwork.libcamera.org/comment/33536/","msgid":"<b143fe0b-c458-4a65-b197-96f638e6caba@ideasonboard.com>","date":"2025-03-03T11:01:46","subject":"Re: [PATCH v5 1/5] libcamera: v4l2_device: add frame start event\n\thelpers","submitter":{"id":216,"url":"https://patchwork.libcamera.org/api/people/216/","name":"Barnabás Pőcze","email":"barnabas.pocze@ideasonboard.com"},"content":"Hi\n\n\n2025. 03. 02. 0:17 keltezéssel, Kieran Bingham írta:\n> Quoting Stanislaw Gruszka (2025-02-25 16:41:12)\n>> Add helper to check if frame start event are supported by subdevice.\n>> Since kernel does not have interface to query supported events\n>> use subscribe interface.\n>>\n>> Additionally add helper for checking if the event enabled.\n>> Will be needed later to proper code flow if enabling the event\n>> fail for some reason.\n>>\n>> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> # v3\n>> Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>\n>> ---\n>>   include/libcamera/internal/v4l2_device.h |  1 +\n>>   src/libcamera/v4l2_device.cpp            | 19 +++++++++++++++++++\n>>   2 files changed, 20 insertions(+)\n>>\n>> diff --git a/include/libcamera/internal/v4l2_device.h b/include/libcamera/internal/v4l2_device.h\n>> index affe52c2..a647c96a 100644\n>> --- a/include/libcamera/internal/v4l2_device.h\n>> +++ b/include/libcamera/internal/v4l2_device.h\n>> @@ -45,6 +45,7 @@ public:\n>>          const std::string &deviceNode() const { return deviceNode_; }\n>>          std::string devicePath() const;\n>>\n>> +       bool supportsFrameStartEvent();\n>>          int setFrameStartEnabled(bool enable);\n>>          Signal<uint32_t> frameStart;\n>>\n>> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n>> index 2f65a43a..23c7d1ef 100644\n>> --- a/src/libcamera/v4l2_device.cpp\n>> +++ b/src/libcamera/v4l2_device.cpp\n>> @@ -449,6 +449,25 @@ std::string V4L2Device::devicePath() const\n>>          return path;\n>>   }\n>>\n>> +/**\n>> + * \\brief Check if frame start event is supported\n>> + * \\return True if frame start event is supported, false otherwise\n>> + */\n>> +\n>> +bool V4L2Device::supportsFrameStartEvent()\n>> +{\n>> +       struct v4l2_event_subscription event {\n>> +       };\n> \n> Curiously my local clang-format is trying to make this one line, but the\n> CI doesn't report anything here.\n> \n> So I'll leave it as it is ;-)\n> \n> Aha, and I've already got a tag on here so ... to the next one.\n\nMine also does not like it (clang-format version 19.1.7):\n\n$ ./utils/checkstyle.py HEAD~5..\n----------------------------------------------------------------------------------------------\ne7ff7c085a79342e933ae378e710e98a52f1799d libcamera: v4l2_device: add frame start event helpers\n----------------------------------------------------------------------------------------------\n--- src/libcamera/v4l2_device.cpp\n+++ src/libcamera/v4l2_device.cpp\n@@ -456,8 +456,7 @@\n  \n  bool V4L2Device::supportsFrameStartEvent()\n  {\n-\tstruct v4l2_event_subscription event {\n-\t};\n+\tstruct v4l2_event_subscription event{};\n  \tevent.type = V4L2_EVENT_FRAME_SYNC;\n  \n  \tint ret = ioctl(VIDIOC_SUBSCRIBE_EVENT, &event);\n---\n1 potential issue detected, please review\n\n---------------------------------------------------------------------------------------------------\n2f377f31a4b7f9993c765208ece1c20430def83f pipeline: simple: Use proper device for frame start events\n---------------------------------------------------------------------------------------------------\nNo issue detected\n\n----------------------------------------------------------------------------------------------------\n80571431a1d6d3cd9b2540d6f85e247b442a5036 pipeline: simple: Connect and disconnect start frame events\n----------------------------------------------------------------------------------------------------\nNo issue detected\n\n--------------------------------------------------------------------------------------\n56169675ca7acee83648c1fa04278da3f446e0c6 pipeline: simple: Do not apply controls twice\n--------------------------------------------------------------------------------------\nNo issue detected\n\n----------------------------------------------------------------------------------------------------\n005bd327d8ab71172ee7b8c61dac826e78af520c pipeline: simple: Create DelayedControls instance once only\n----------------------------------------------------------------------------------------------------\nNo issue detected\n\n\nRegards,\nBarnabás Pőcze\n\n> \n> --\n> Kieran\n> \n>> +       event.type = V4L2_EVENT_FRAME_SYNC;\n>> +\n>> +       int ret = ioctl(VIDIOC_SUBSCRIBE_EVENT, &event);\n>> +       if (ret)\n>> +               return false;\n>> +\n>> +       ioctl(VIDIOC_UNSUBSCRIBE_EVENT, &event);\n>> +       return true;\n>> +}\n>> +\n>>   /**\n>>    * \\brief Enable or disable frame start event notification\n>>    * \\param[in] enable True to enable frame start events, false to disable them\n>> --\n>> 2.43.0\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 CBD45C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Mar 2025 11:01:53 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A14F668779;\n\tMon,  3 Mar 2025 12:01:52 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 919CE68777\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Mar 2025 12:01:50 +0100 (CET)","from [192.168.33.24] (185.221.143.4.nat.pool.zt.hu [185.221.143.4])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id A22BC8DB;\n\tMon,  3 Mar 2025 12:00:18 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"t6QL7bq9\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1740999619;\n\tbh=Dm7nL07hj+KQBIPgzYKr5KE//DEgy58+t/qYg0ONE8E=;\n\th=Date:Subject:To:Cc:References:From:In-Reply-To:From;\n\tb=t6QL7bq9yxnsI6wZOcUWq8Z0+ZiUGDlBZEbyuCbqayHFDcbSgHhOg4taca2AOmAR6\n\twG/6NtCdfTcBhswytzzo/JTT/Oje/GpJxk+mP1FXgkkP9ky6Xn7SgGzsBt+67vq9jy\n\tqZTZnFz36cV45gKawnhZftD3rVSvObiz9CS2OvU0=","Message-ID":"<b143fe0b-c458-4a65-b197-96f638e6caba@ideasonboard.com>","Date":"Mon, 3 Mar 2025 12:01:46 +0100","MIME-Version":"1.0","User-Agent":"Mozilla Thunderbird","Subject":"Re: [PATCH v5 1/5] libcamera: v4l2_device: add frame start event\n\thelpers","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>,\n\tStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>,\n\tlibcamera-devel@lists.libcamera.org","Cc":"Milan Zamazal <mzamazal@redhat.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tHans de Goede <hdegoede@redhat.com>","References":"<20250225164116.414301-1-stanislaw.gruszka@linux.intel.com>\n\t<20250225164116.414301-2-stanislaw.gruszka@linux.intel.com>\n\t<174087105270.3864332.18413654734348858759@ping.linuxembedded.co.uk>","From":"=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>","Content-Language":"en-US, hu-HU","In-Reply-To":"<174087105270.3864332.18413654734348858759@ping.linuxembedded.co.uk>","Content-Type":"text/plain; charset=UTF-8; format=flowed","Content-Transfer-Encoding":"8bit","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":33539,"web_url":"https://patchwork.libcamera.org/comment/33539/","msgid":"<174100610811.2914008.1544420249514798422@ping.linuxembedded.co.uk>","date":"2025-03-03T12:48:28","subject":"Re: [PATCH v5 1/5] libcamera: v4l2_device: add frame start event\n\thelpers","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Stanislaw Gruszka (2025-03-03 10:26:38)\n> Hi Kieran,\n> \n> On Sat, Mar 01, 2025 at 11:17:32PM +0000, Kieran Bingham wrote:\n> > Quoting Stanislaw Gruszka (2025-02-25 16:41:12)\n> > >  \n> > > +/**\n> > > + * \\brief Check if frame start event is supported\n> > > + * \\return True if frame start event is supported, false otherwise\n> > > + */\n> > > +\n> > > +bool V4L2Device::supportsFrameStartEvent()\n> > > +{\n> > > +       struct v4l2_event_subscription event {\n> > > +       };\n> > \n> > Curiously my local clang-format is trying to make this one line, but the\n> > CI doesn't report anything here.\n> > \n> > So I'll leave it as it is ;-)\n> > \n> > Aha, and I've already got a tag on here so ... to the next one.\n> \n> Does it mean you have a clang-format-ignore file ?\n\nI'm not sure I understand the question. But no - I don't have an\n'ignore' file on my laptop. Or do you mean one in my head that I can\nignore things ;-)\n\n--\nKieran\n\n> \n> Regards\n> Stanislaw\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 14D72BD808\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Mar 2025 12:48:33 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BEB3368777;\n\tMon,  3 Mar 2025 13:48:32 +0100 (CET)","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 0790868777\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Mar 2025 13:48:31 +0100 (CET)","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 7DB93346;\n\tMon,  3 Mar 2025 13:46:59 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"wV69pEYJ\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1741006019;\n\tbh=BPVV0Aboxk6vBqhDPsEFFOdcP2EmGw1JTc0YszHD6/8=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=wV69pEYJEv1TUKIRoA/aJNtGXKHsnrWMfdLktL1rFoa+3tnWjdplRa/hY60SG5yaD\n\tfpTDShSLpkD37XGi/NiYibPo9qFgye6EFRR5w03VR1DqOD9iLKUNFloNPUrdfbTHDG\n\t7THLmzF0o00d+bircm+7fjeb8aF2oi3R+lRRZLAc=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<Z8WD3jrb4ZweRap4@linux.intel.com>","References":"<20250225164116.414301-1-stanislaw.gruszka@linux.intel.com>\n\t<20250225164116.414301-2-stanislaw.gruszka@linux.intel.com>\n\t<174087105270.3864332.18413654734348858759@ping.linuxembedded.co.uk>\n\t<Z8WD3jrb4ZweRap4@linux.intel.com>","Subject":"Re: [PATCH v5 1/5] libcamera: v4l2_device: add frame start event\n\thelpers","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, Milan Zamazal <mzamazal@redhat.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tHans de Goede <hdegoede@redhat.com>","To":"Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>","Date":"Mon, 03 Mar 2025 12:48:28 +0000","Message-ID":"<174100610811.2914008.1544420249514798422@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","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":33544,"web_url":"https://patchwork.libcamera.org/comment/33544/","msgid":"<Z8W33sQY+KotzKEc@linux.intel.com>","date":"2025-03-03T14:08:30","subject":"Re: [PATCH v5 1/5] libcamera: v4l2_device: add frame start event\n\thelpers","submitter":{"id":211,"url":"https://patchwork.libcamera.org/api/people/211/","name":"Stanislaw Gruszka","email":"stanislaw.gruszka@linux.intel.com"},"content":"On Mon, Mar 03, 2025 at 12:48:28PM +0000, Kieran Bingham wrote:\n> Quoting Stanislaw Gruszka (2025-03-03 10:26:38)\n> > Hi Kieran,\n> > \n> > On Sat, Mar 01, 2025 at 11:17:32PM +0000, Kieran Bingham wrote:\n> > > Quoting Stanislaw Gruszka (2025-02-25 16:41:12)\n> > > >  \n> > > > +/**\n> > > > + * \\brief Check if frame start event is supported\n> > > > + * \\return True if frame start event is supported, false otherwise\n> > > > + */\n> > > > +\n> > > > +bool V4L2Device::supportsFrameStartEvent()\n> > > > +{\n> > > > +       struct v4l2_event_subscription event {\n> > > > +       };\n> > > \n> > > Curiously my local clang-format is trying to make this one line, but the\n> > > CI doesn't report anything here.\n> > > \n> > > So I'll leave it as it is ;-)\n> > > \n> > > Aha, and I've already got a tag on here so ... to the next one.\n> > \n> > Does it mean you have a clang-format-ignore file ?\n> \n> I'm not sure I understand the question. But no - I don't have an\n> 'ignore' file on my laptop. Or do you mean one in my head that I can\n> ignore things ;-)\n\n:-) I misunderstood your previous comment.\n\nI thought you wrote about clang-format tag that makes auto-formatter\nignore particular file or lines, but you meant Reviewed-by tag :-)\n\nAnyway, this is clang-format version problem as pointed by Barnabás\nand Milan. I'll update the patch with:\n\n      struct v4l2_event_subscription event {};\n\nsince newer clang-format formats this way.\n\nRegards\nStanislaw","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 5A5C3C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon,  3 Mar 2025 14:08:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AA44D68777;\n\tMon,  3 Mar 2025 15:08:39 +0100 (CET)","from mgamail.intel.com (mgamail.intel.com [192.198.163.9])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 090AE68772\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon,  3 Mar 2025 15:08:36 +0100 (CET)","from orviesa004.jf.intel.com ([10.64.159.144])\n\tby fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n\t03 Mar 2025 06:08:35 -0800","from sgruszka-mobl.ger.corp.intel.com (HELO localhost)\n\t([10.245.112.97]) by orviesa004-auth.jf.intel.com with\n\tESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2025 06:08:33 -0800"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=intel.com header.i=@intel.com\n\theader.b=\"m6fxOH4s\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n\td=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n\tt=1741010917; x=1772546917;\n\th=date:from:to:cc:subject:message-id:references:\n\tmime-version:content-transfer-encoding:in-reply-to;\n\tbh=iDZoa0Txp99jAfYUsxhMlFcICF2dLgv3eoQJeQldqfM=;\n\tb=m6fxOH4sKWS6YZIVjewPbwpT9y+U2yRsoD9yr+EJ2zmqPIK60cVHGHkI\n\tp+PAvjrga3B9PZ7CszihqOh3ZeLNMEvVEeklOXgUIUHYRs+VT3sY3HDqj\n\tPhefAEl1vcfyaWFNJuh5JYhluJSnEMCPhzo+Gs70h+RnVrGDOysRD214u\n\tsA87LQo9pg13JH8bxQaHRzvBd/DswiwhvhN5oCf3U6aq7gkbgzYV1qBcL\n\tzo6dXkNkFcEnaEw3MOPc4eZjxUKxNauypB6xPhXEzuuS7Cd5+euoRemmv\n\tm5aHlPiiGY8XwezQSWwvWfCZG8vFCAP4s0WI4r3rqgMIhEXEiYfIqkOre Q==;","X-CSE-ConnectionGUID":["g7EvpRZ6T52C5WPXSkH0/A==","iCuPTnbGRmWV14fKFiEOhw=="],"X-CSE-MsgGUID":["O0mS2FyySQulF3q1eHunbg==","szTYqjcYTLmS7yHgXpSzZg=="],"X-IronPort-AV":["E=McAfee;i=\"6700,10204,11362\"; a=\"52524383\"","E=Sophos;i=\"6.13,329,1732608000\"; d=\"scan'208\";a=\"52524383\"","E=Sophos;i=\"6.13,329,1732608000\"; d=\"scan'208\";a=\"123019093\""],"X-ExtLoop1":"1","Date":"Mon, 3 Mar 2025 15:08:30 +0100","From":"Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, Milan Zamazal <mzamazal@redhat.com>,\n\tLaurent Pinchart <laurent.pinchart@ideasonboard.com>,\n\tNaushir Patuck <naush@raspberrypi.com>,\n\tSakari Ailus <sakari.ailus@linux.intel.com>,\n\tHans de Goede <hdegoede@redhat.com>","Subject":"Re: [PATCH v5 1/5] libcamera: v4l2_device: add frame start event\n\thelpers","Message-ID":"<Z8W33sQY+KotzKEc@linux.intel.com>","References":"<20250225164116.414301-1-stanislaw.gruszka@linux.intel.com>\n\t<20250225164116.414301-2-stanislaw.gruszka@linux.intel.com>\n\t<174087105270.3864332.18413654734348858759@ping.linuxembedded.co.uk>\n\t<Z8WD3jrb4ZweRap4@linux.intel.com>\n\t<174100610811.2914008.1544420249514798422@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<174100610811.2914008.1544420249514798422@ping.linuxembedded.co.uk>","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>"}}]