[{"id":30143,"web_url":"https://patchwork.libcamera.org/comment/30143/","msgid":"<20240629000411.GQ30900@pendragon.ideasonboard.com>","date":"2024-06-29T00:04:11","subject":"Re: [PATCH v2 19/25] libtuning: Add static module","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Stefan,\n\nThank you for the patch.\n\nOn Fri, Jun 28, 2024 at 12:47:12PM +0200, Stefan Klug wrote:\n> Add a static module class, that can be used to add static data to the\n> tuning file. This is propably not the best solution, but allows us to\n> progress without writing lots of dummy classes for static cases.\n> \n> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> ---\n>  utils/tuning/libtuning/modules/static.py | 24 ++++++++++++++++++++++++\n>  1 file changed, 24 insertions(+)\n>  create mode 100644 utils/tuning/libtuning/modules/static.py\n> \n> diff --git a/utils/tuning/libtuning/modules/static.py b/utils/tuning/libtuning/modules/static.py\n> new file mode 100644\n> index 000000000000..4d0f7e18c24e\n> --- /dev/null\n> +++ b/utils/tuning/libtuning/modules/static.py\n> @@ -0,0 +1,24 @@\n> +# SPDX-License-Identifier: GPL-2.0-or-later\n> +#\n> +# Copyright (C) 2024, Ideas on Board\n> +#\n> +# Module implementation for static data\n> +\n> +from .module import Module\n> +\n> +\n> +# This module can be used in cases where the tuning file should contain\n> +# static data.\n> +class StaticModule(Module):\n> +    def __init__(self, out_name: str, output: dict = {}):\n> +        super().__init__()\n> +        self.out_name = out_name\n> +        self.hr_name = f'Static {out_name}'\n> +        self.type = f'static_{out_name}'\n> +        self.output = output\n> +\n> +    def validate_config(self, config: dict) -> bool:\n> +        return True\n> +\n> +    def process(self, config: dict, images: list, outputs: dict) -> dict:\n> +        return self.output","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 3BFDBBDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSat, 29 Jun 2024 00:04:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id A6B6F62C9B;\n\tSat, 29 Jun 2024 02:04:33 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id C38D562C95\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSat, 29 Jun 2024 02:04:32 +0200 (CEST)","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 9F27663B;\n\tSat, 29 Jun 2024 02:04:07 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"tDWJECkO\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1719619447;\n\tbh=xWTvTVAzi6/HXswyW7kWyPpd29CnStOjD8mhDheRpAA=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=tDWJECkO3EqYDNSwjkXT8STQTvwOf3qtGUMwD1XqjbvOEoFZPMSmd999WxnE81FtS\n\tVBPp+WcAPVv/j3glRYlAaLUnXjDkM0LZCFajrVWw8zR03wE6l58dbH++WiF65x/8+b\n\tmjxPN8KBdbYrtGjw04lXtY1eJhW2yNoulrVS/0cQ=","Date":"Sat, 29 Jun 2024 03:04:11 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Stefan Klug <stefan.klug@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v2 19/25] libtuning: Add static module","Message-ID":"<20240629000411.GQ30900@pendragon.ideasonboard.com>","References":"<20240628104828.2928109-1-stefan.klug@ideasonboard.com>\n\t<20240628104828.2928109-20-stefan.klug@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20240628104828.2928109-20-stefan.klug@ideasonboard.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>"}}]