[{"id":28260,"web_url":"https://patchwork.libcamera.org/comment/28260/","msgid":"<CAHW6GYJQGSYPhixXoSMHP6MHzBzoKikvcissSQ22b+oSsnyduw@mail.gmail.com>","date":"2023-12-06T16:55:39","subject":"Re: [libcamera-devel] [PATCH v1 1/2] build: controls: Add Raspberry\n\tPi vendor specific controls","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Naush\n\nYes, this sounds like a good idea. My only slight worry is that folks\nwill start writing application code where they'd be better off\nimplementing a proper \"algorithm\", but I guess that's not really a\nconcern here!\n\nOn Mon, 4 Dec 2023 at 16:18, Naushir Patuck via libcamera-devel\n<libcamera-devel@lists.libcamera.org> wrote:\n>\n> Add a new control_ids_rpi.yaml file to hold the Raspberry Pi specific\n> vendor controls.\n>\n> Define a control StatsOutputEnable to allow the ISP hardware statistics\n> to be output through metadata via the Bcm2835StatsOutput control. The\n> implementation of these controls will follow in a subsequent patch.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nThanks!\nDavid\n\n> ---\n>  include/libcamera/meson.build      |  1 +\n>  src/libcamera/control_ids_rpi.yaml | 29 +++++++++++++++++++++++++++++\n>  2 files changed, 30 insertions(+)\n>  create mode 100644 src/libcamera/control_ids_rpi.yaml\n>\n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index bab858a3790f..84c6c4cb8bf6 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -36,6 +36,7 @@ controls_map = {\n>      'controls': {\n>          'draft': 'control_ids_draft.yaml',\n>          'core': 'control_ids_core.yaml',\n> +        'rpi/vc4': 'control_ids_rpi.yaml',\n>      },\n>\n>      'properties': {\n> diff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml\n> new file mode 100644\n> index 000000000000..cb097f887e16\n> --- /dev/null\n> +++ b/src/libcamera/control_ids_rpi.yaml\n> @@ -0,0 +1,29 @@\n> +# SPDX-License-Identifier: LGPL-2.1-or-later\n> +#\n> +# Copyright (C) 2023, Raspberry Pi Ltd\n> +#\n> +%YAML 1.1\n> +---\n> +# Raspberry Pi (VC4 and PiSP) specific vendor controls\n> +vendor: rpi\n> +controls:\n> +  - StatsOutputEnable:\n> +      type: bool\n> +      description: |\n> +        Toggles the Raspberry Pi IPA to output a binary dump of the hardware\n> +        generated statistics through the Request metadata in the Bcm2835StatsOutput\n> +        control.\n> +\n> +        \\sa Bcm2835StatsOutput\n> +\n> +  - Bcm2835StatsOutput:\n> +      type: uint8_t\n> +      size: [n]\n> +      description: |\n> +        Span of the BCM2835 ISP generated statistics for the current frame. This\n> +        is sent in the Request metadata if the StatsOutputEnable is set to true.\n> +        The statistics struct definition can be found in include/linux/bcm2835-isp.h.\n> +\n> +        \\sa StatsOutputEnable\n> +\n> +...\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 28057C31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Dec 2023 16:55:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 635E1629CE;\n\tWed,  6 Dec 2023 17:55:53 +0100 (CET)","from mail-qk1-x72c.google.com (mail-qk1-x72c.google.com\n\t[IPv6:2607:f8b0:4864:20::72c])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id CA9A661D9E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Dec 2023 17:55:51 +0100 (CET)","by mail-qk1-x72c.google.com with SMTP id\n\taf79cd13be357-77db736aae5so380298285a.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 06 Dec 2023 08:55:51 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1701881753;\n\tbh=ABPTw+s7s0wahx9Q5arZrJmmQ/qOoHYaBhaQImocFTI=;\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=SemSZ923VHY0Icv9TzNaYEOlBYOTPMdSXefzqDuZetbXXpSNBTwLn2UA/rhWkf/Du\n\taGjHMMNk13aqaseuEujbxcc7Yy/ITE4hTP5KD93RfFYLMjCkzeNnPvnBf1mKMswU+B\n\t09ao0sDUAajwG3dyIMp1ykeVvT8yDt2KokDzbND82OMlN2lJ+rF/inWWLr7qaO+aLJ\n\tpGx5HtunUbibJvyx9HEmn84ZiIFrBW5KYtZdztuNbVBl36ZL6rHil9FiDw/NXPukTB\n\tz3ufgewSddu9jrpoDac8MXyxM0Yvlx9pjxIep+t06Jtif/6unt7H8Jp6IG/RO1x4ve\n\t/Cp89YvgTVrhg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1701881750; x=1702486550;\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=hsE9zNNpIkFS165ojR1t/J7GrCkuYVZmFEsL/8kvonc=;\n\tb=HwRNznndkZp/20EFAscHxZ/7CH/IvtvKea9VWuhCt8cAiWssK/QzdocRdtFA3HFAnM\n\tjMgZfCWGl9R8+CN11pVaqXqcKhyjTxNMeFmaLjaSFOpscibn43IMnGeGBGgq+ai1BxWC\n\tArsngdcHCua9anjnlXbYADgHwW7WTah/FcMsn3ANvgwNgC7s9SOp7ilo6mfn8IBnX704\n\tA4M6nulxatXzpQLBrUd0ds8Ei5XjQrhMrAP5UzFSwF5zpMawOEOElYT0JoHM6Wp0bSxX\n\tEEzcQMZJoHU/c5GdjLsAE26UzsUx1c2FCW4qRFK7OHTPa3lAEqXa8hXFtwwC2gv+akoz\n\tVwAQ=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"HwRNznnd\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1701881750; x=1702486550;\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=hsE9zNNpIkFS165ojR1t/J7GrCkuYVZmFEsL/8kvonc=;\n\tb=nAscc73M4r3eaFx08OBLxcwj3K3Xfv5uWMApu6uhHIMZeWNErTxqQ9c/K2SbfOsmye\n\tPD7gOMXfOaFl+nCQxB/OQ9OMs/uVBTTUurbLwS+0ls7kT7s9HaVD1wcj0u9yPTj8sN2b\n\t6KX0aewr2m2xcSlXZIkySB71CM9Kw2Y9hFRCkvDnWxK3iDjo58/oNOUlf14Tt1jQKim0\n\tri6ZJaBGHwl2tSsfO39lz265WDqyonxkL+J5yXRQUMQIFR9P6SZ4mG0G31wsi6LAlkWl\n\tHtnDstcwArhgOf83Cr2+fs2qlZlyUuEJfLMClOhwLfBfawKGS59UHu2zJzMCSyFj0fQ4\n\tWIaw==","X-Gm-Message-State":"AOJu0YyshyD3FiZdUspFccGHqEexsjCqKeHVSgiZVq7I3T30Wg2u7pPb\n\tHjrjcxW6L8u4ZpLLoPQh7wpGxId19rLcdvAIqWGwew==","X-Google-Smtp-Source":"AGHT+IEvqpJHA8FM9wjPUMa+xqrE3cFcLLteAQT2CbiJ6L/BaiQ6Woj5bAa0F/EW+LnBKzIN7vwMzRbDOwYUOVFn/+c=","X-Received":"by 2002:a0c:eb51:0:b0:67a:a8c4:7f1b with SMTP id\n\tc17-20020a0ceb51000000b0067aa8c47f1bmr1175987qvq.2.1701881750360;\n\tWed, 06 Dec 2023 08:55:50 -0800 (PST)","MIME-Version":"1.0","References":"<20231204161901.6632-1-naush@raspberrypi.com>\n\t<20231204161901.6632-2-naush@raspberrypi.com>","In-Reply-To":"<20231204161901.6632-2-naush@raspberrypi.com>","Date":"Wed, 6 Dec 2023 16:55:39 +0000","Message-ID":"<CAHW6GYJQGSYPhixXoSMHP6MHzBzoKikvcissSQ22b+oSsnyduw@mail.gmail.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v1 1/2] build: controls: Add Raspberry\n\tPi vendor specific controls","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":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@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":28263,"web_url":"https://patchwork.libcamera.org/comment/28263/","msgid":"<CAHW6GYJdmQ6nyOYHz3SGh7EqwxAUvt8URt6=eyo3ZK6r622_dw@mail.gmail.com>","date":"2023-12-06T17:07:15","subject":"Re: [libcamera-devel] [PATCH v1 1/2] build: controls: Add Raspberry\n\tPi vendor specific controls","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Naush\n\nI thought I'd already reviewed this one, but I can't seem to spot it.\nAnyway, here's a second review tag just in case it really got lost!!\n\nReviewed-by: David Plowman <david.plowman@raspberrypi.com>\n\nThanks\nDavid\n\nOn Mon, 4 Dec 2023 at 16:18, Naushir Patuck via libcamera-devel\n<libcamera-devel@lists.libcamera.org> wrote:\n>\n> Add a new control_ids_rpi.yaml file to hold the Raspberry Pi specific\n> vendor controls.\n>\n> Define a control StatsOutputEnable to allow the ISP hardware statistics\n> to be output through metadata via the Bcm2835StatsOutput control. The\n> implementation of these controls will follow in a subsequent patch.\n>\n> Signed-off-by: Naushir Patuck <naush@raspberrypi.com>\n> ---\n>  include/libcamera/meson.build      |  1 +\n>  src/libcamera/control_ids_rpi.yaml | 29 +++++++++++++++++++++++++++++\n>  2 files changed, 30 insertions(+)\n>  create mode 100644 src/libcamera/control_ids_rpi.yaml\n>\n> diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build\n> index bab858a3790f..84c6c4cb8bf6 100644\n> --- a/include/libcamera/meson.build\n> +++ b/include/libcamera/meson.build\n> @@ -36,6 +36,7 @@ controls_map = {\n>      'controls': {\n>          'draft': 'control_ids_draft.yaml',\n>          'core': 'control_ids_core.yaml',\n> +        'rpi/vc4': 'control_ids_rpi.yaml',\n>      },\n>\n>      'properties': {\n> diff --git a/src/libcamera/control_ids_rpi.yaml b/src/libcamera/control_ids_rpi.yaml\n> new file mode 100644\n> index 000000000000..cb097f887e16\n> --- /dev/null\n> +++ b/src/libcamera/control_ids_rpi.yaml\n> @@ -0,0 +1,29 @@\n> +# SPDX-License-Identifier: LGPL-2.1-or-later\n> +#\n> +# Copyright (C) 2023, Raspberry Pi Ltd\n> +#\n> +%YAML 1.1\n> +---\n> +# Raspberry Pi (VC4 and PiSP) specific vendor controls\n> +vendor: rpi\n> +controls:\n> +  - StatsOutputEnable:\n> +      type: bool\n> +      description: |\n> +        Toggles the Raspberry Pi IPA to output a binary dump of the hardware\n> +        generated statistics through the Request metadata in the Bcm2835StatsOutput\n> +        control.\n> +\n> +        \\sa Bcm2835StatsOutput\n> +\n> +  - Bcm2835StatsOutput:\n> +      type: uint8_t\n> +      size: [n]\n> +      description: |\n> +        Span of the BCM2835 ISP generated statistics for the current frame. This\n> +        is sent in the Request metadata if the StatsOutputEnable is set to true.\n> +        The statistics struct definition can be found in include/linux/bcm2835-isp.h.\n> +\n> +        \\sa StatsOutputEnable\n> +\n> +...\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 AB96EC31E9\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed,  6 Dec 2023 17:07:29 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0B81E629E3;\n\tWed,  6 Dec 2023 18:07:29 +0100 (CET)","from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com\n\t[IPv6:2607:f8b0:4864:20::f2e])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 86A0D61D9E\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed,  6 Dec 2023 18:07:27 +0100 (CET)","by mail-qv1-xf2e.google.com with SMTP id\n\t6a1803df08f44-67ad277a06bso218596d6.1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 06 Dec 2023 09:07:27 -0800 (PST)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1701882449;\n\tbh=IIRPaDyNq8L9rAwrHU1YE5XrTlpcSpbhmDeqPlprDs0=;\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=qhPcOQeJ2Gfser+XbaomtgW3C0+0HujK8+DTexu2XI+Jh3kq1ECp07vI04eIB5NP2\n\tVf/84QjfyLzripIliMFk0CBPpdFzChwsP78s/95VBJzzsT3thM3geALJS0mDcg/raY\n\tLvITGrYmCI38hnDM9cU9MxQOFdDN/ARu1NHwKi88OZXh8lrQcAftnL/gFIe6ahrS5W\n\tMmGD+ZHdGhdLd2UDRW79rXQd0B1hEEvz+iUcWeO8GbFsJD5SVVEQaeWlZBJOUtovvD\n\tpngQy2GP4K44jJIewyOBUj6q16FmpZ6CVjAeT6kr0TmrXGIHKxHf0HH9BNI9Jx0poz\n\tgrSsL7s1fQoIg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google; t=1701882446; x=1702487246;\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=f8jZZnU1iazs3QrWd5DoICxeNuuKR8hh7yzXs90PLA0=;\n\tb=Oa3xiM6P5BVvc/3HuK+LK9A2UTdEPs6nQOtMYERXY5+M/BfjHmLPh3Q5d80E0Us2He\n\tEbRJ8PpGXSRmLqMaABoXEF6GBWSRlLYeUOuLQeCHIJ37RI+3qLZfgxSLU+k5R6JH1fU8\n\tBMq0WEIGxnqEzdVV1p3h74RtrIm5b1mU5KxUsnupLmByUCJc03S1Gh8l82vk+ZFv/m72\n\tlaK/WcuiCn+D4fanlQWrKKqgLLtfcVWRi4zFSkYuEew6OVnBw2gVRwfKEDdsIXfelrqF\n\tFs7g85H7Sobw+Mmvh4u6pKYB/GPa0GFlYBbMik7aANkv+IvyODw4XjiOygCua4/E7CGt\n\tZlZA=="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key; \n\tunprotected) header.d=raspberrypi.com\n\theader.i=@raspberrypi.com\n\theader.b=\"Oa3xiM6P\"; dkim-atps=neutral","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1701882446; x=1702487246;\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=f8jZZnU1iazs3QrWd5DoICxeNuuKR8hh7yzXs90PLA0=;\n\tb=DN6nC8+nHeQKR1lBP7Yhrer0uJwbffUTbFkk3BYkcMnXFG8akVC86AqxjpGql7sCPH\n\tZYe+ScoeC/asDfmnxj/hRDwb9Ugj5sFeoea5cQmuXpm+tNfu0NRNDKblwvHDljUR4WlG\n\tuPbd1qQ/p8YsBmlsvFD44gtPhLS/xH2mbpMqdyP15zjFV/8/TksUMfSKXM4EXytOeVn5\n\tURwD0cQbaKHIGriN59XU00X3ueeqaD7zPuehA15D//qUrt+tmi1ERXT0f3Gl5+AyQo+n\n\tUbKC8+EJHnDvk7TJoBp8WpvAg8km6MkPOSk+ocBZLOUe9MRa+YZr1mHplhtT95KSKSvG\n\tkarA==","X-Gm-Message-State":"AOJu0YxpqDWoHWM8xgYLbu0gBocSCEADxubmWL5pa+nH5OXS7ch5duC1\n\tG7bJHekTPYDAOKedA9afaqq2hmp1/Emo0HHKNgsP+IGDjbgiQxGE","X-Google-Smtp-Source":"AGHT+IEq5N1E5WaGbfJp9KGZzlfXCar9xwXRW/ve4y5EoylUhZ6jPvsxY+tX2RMpSW49epRx/6THEbLxvKS4YLvHxOM=","X-Received":"by 2002:a05:6214:170a:b0:67a:cc9a:69e4 with SMTP id\n\tdb10-20020a056214170a00b0067acc9a69e4mr1260869qvb.125.1701882446320;\n\tWed, 06 Dec 2023 09:07:26 -0800 (PST)","MIME-Version":"1.0","References":"<20231204161901.6632-1-naush@raspberrypi.com>\n\t<20231204161901.6632-2-naush@raspberrypi.com>","In-Reply-To":"<20231204161901.6632-2-naush@raspberrypi.com>","Date":"Wed, 6 Dec 2023 17:07:15 +0000","Message-ID":"<CAHW6GYJdmQ6nyOYHz3SGh7EqwxAUvt8URt6=eyo3ZK6r622_dw@mail.gmail.com>","To":"Naushir Patuck <naush@raspberrypi.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v1 1/2] build: controls: Add Raspberry\n\tPi vendor specific controls","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":"David Plowman via libcamera-devel <libcamera-devel@lists.libcamera.org>","Reply-To":"David Plowman <david.plowman@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>"}}]