[{"id":37022,"web_url":"https://patchwork.libcamera.org/comment/37022/","msgid":"<176398203959.567526.16969299849612961374@ping.linuxembedded.co.uk>","date":"2025-11-24T11:00:39","subject":"Re: [[PATCH v1]] ipa: rkisp1: filter: Fix sharpness enable/disable\n\tlogic","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Rui Wang (2025-11-23 20:28:16)\n> The sharpness enable bit in the filter mode register was not being\n> controlled correctly based on the sharpness level. Add explicit code\n> to enable sharpness when sharpness > 1, and disable it otherwise.\n> This ensures the hardware register is set properly to activate\n> sharpness as intended.\n> \n> Signed-off-by: Rui Wang <rui.wang@ideasonboard.com>\n> ---\n>  src/ipa/rkisp1/algorithms/filter.cpp | 5 +++++\n>  1 file changed, 5 insertions(+)\n> \n> diff --git a/src/ipa/rkisp1/algorithms/filter.cpp b/src/ipa/rkisp1/algorithms/filter.cpp\n> index 8ad79801..017618e4 100644\n> --- a/src/ipa/rkisp1/algorithms/filter.cpp\n> +++ b/src/ipa/rkisp1/algorithms/filter.cpp\n> @@ -216,6 +216,11 @@ void Filter::prepare([[maybe_unused]] IPAContext &context,\n>                         config->fac_bl1 /= 2;\n>                 }\n>         }\n> +       /* Set bit 0 of the config->mode to toggle on/off sharpness\n\n\t/*\n\t * block comments start with an open line\n\t * like this.\n\t */\n\t\n\n> +        * if sharpness > 1, enable sharpness,  viseverse disable it\n\nWhat' was viseverse meant to mean? I assume there's a typo - what it\n'otherwise'?\n\n> +        */\n> +       config->mode &= ~(1u << 0);\n> +       config->mode |= static_cast<uint32_t>(sharpness > 1) << 0;\n\nOh, I see we're passing this mode bit through to the kernel patch. That\nlikely needs some more clarifiaction, and the bit will need to be\ndocumented.\n\nHave you 'created' this bit ? or is it already exposed / expected in the\nkernel and it's just that it wasn't being checked?\n\n--\nRegards\n\nKieran\n\n>  }\n>  \n>  REGISTER_IPA_ALGORITHM(Filter, \"Filter\")\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 EFD4FC32E7\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 24 Nov 2025 11:00:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 93A2760A80;\n\tMon, 24 Nov 2025 12:00:43 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AF9996096B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 24 Nov 2025 12:00:42 +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 A74F1982;\n\tMon, 24 Nov 2025 11:58:34 +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=\"P0oRX9r1\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1763981914;\n\tbh=22rzgOBNdWTjaWiTu5NVj+6o5JiPpdjWo5lSVI80BZ0=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=P0oRX9r1ZA3v59POWa3D8YvLqokiBaV7YSTXkFTzDXWpaM27D1dVvN/YuBPlCTmjU\n\tiGN57efEgbpwqZZBJnhYxy6ZZKFG8koQ5tykq/K/PRHfxjh1WTqQmZkVJzwNCKLScA\n\tz+hkrkRocobKQqEiJ526REywQEtKogNP7c+4E4qY=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20251123202816.3460261-1-rui.wang@ideasonboard.com>","References":"<20251123202816.3460261-1-rui.wang@ideasonboard.com>","Subject":"Re: [[PATCH v1]] ipa: rkisp1: filter: Fix sharpness enable/disable\n\tlogic","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"Rui Wang <rui.wang@ideasonboard.com>","To":"Rui Wang <rui.wang@ideasonboard.com>, libcamera-devel@lists.libcamera.org","Date":"Mon, 24 Nov 2025 11:00:39 +0000","Message-ID":"<176398203959.567526.16969299849612961374@ping.linuxembedded.co.uk>","User-Agent":"alot/0.9.1","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]