[{"id":37489,"web_url":"https://patchwork.libcamera.org/comment/37489/","msgid":"<20260106034648.GP10026@pendragon.ideasonboard.com>","date":"2026-01-06T03:46:48","subject":"Re: [PATCH v4 1/1] media: rkisp1: Fix filter mode register\n\tconfiguration","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Rui,\n\nThank you for the patch.\n\nOn Mon, Jan 05, 2026 at 12:11:42PM -0500, Rui Wang wrote:\n> The rkisp1_flt_config() function performs an initial direct write to\n> RKISP1_CIF_ISP_FILT_MODE without including the RKISP1_CIF_ISP_FLT_ENA\n> bit, which clears the filter enable bit in the hardware.\n> \n> The subsequent read/modify/write sequence then reads back the register\n> with the enable bit already cleared and cannot restore it, resulting in\n> the filter being inadvertently disabled.\n> \n> Remove the redundant direct write. The read/modify/write sequence alone\n> correctly preserves the existing enable bit state while updating the\n> DNR mode and filter configuration bits.\n> \n> Signed-off-by: Rui Wang <rui.wang@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nand pushed to CI in\nhttps://gitlab.freedesktop.org/linux-media/users/pinchartl/-/pipelines/1578184.\nIf the pipeline succeeds I'll queue the patch for v6.20. Otherwise I'll\nreport the failure here.\n\n> ---\n>  \n> Changelog since v1:\n>  1. Update version number from v1 to v4 to clarify the confusing\n> \n> Reviewed-by Stefan Klug and Kieran Bingham\n>  from v1 are carried over (no function code changes).\n> \n>  drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 6 ------\n>  1 file changed, 6 deletions(-)\n> \n> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c\n> index c9f88635224c..6442436a5e42 100644\n> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c\n> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c\n> @@ -411,12 +411,6 @@ static void rkisp1_flt_config(struct rkisp1_params *params,\n>  \trkisp1_write(params->rkisp1, RKISP1_CIF_ISP_FILT_LUM_WEIGHT,\n>  \t\t     arg->lum_weight);\n>  \n> -\trkisp1_write(params->rkisp1, RKISP1_CIF_ISP_FILT_MODE,\n> -\t\t     (arg->mode ? RKISP1_CIF_ISP_FLT_MODE_DNR : 0) |\n> -\t\t     RKISP1_CIF_ISP_FLT_CHROMA_V_MODE(arg->chr_v_mode) |\n> -\t\t     RKISP1_CIF_ISP_FLT_CHROMA_H_MODE(arg->chr_h_mode) |\n> -\t\t     RKISP1_CIF_ISP_FLT_GREEN_STAGE1(arg->grn_stage1));\n> -\n>  \t/* avoid to override the old enable value */\n>  \tfilt_mode = rkisp1_read(params->rkisp1, RKISP1_CIF_ISP_FILT_MODE);\n>  \tfilt_mode &= RKISP1_CIF_ISP_FLT_ENA;","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 3511DBDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Jan 2026 03:47:11 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5109B61F9F;\n\tTue,  6 Jan 2026 04:47:10 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 73D696142F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Jan 2026 04:47:08 +0100 (CET)","from pendragon.ideasonboard.com (81-175-209-152.bb.dnainternet.fi\n\t[81.175.209.152])\n\tby perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 4C14DC7A;\n\tTue,  6 Jan 2026 04:46:47 +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=\"EugbMClo\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1767671207;\n\tbh=snbqLaFm8FhVXUw6zgrDeasE3x5iP27hlHA3uqy8cWM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=EugbMClo1V+5CAMWBXh4JSExPI9ja7XmJZyLL6YlnoaNW3yDTXTa3wPZG2GRhImIw\n\ti9SWEBDsK+XoX1f6g56qnPYN1DXLfsFxfDZYjEx5XbYP+L0lfP2fTLqlkwV/hKYq0L\n\tb4fsQX3uhprm2LTTecm8FkHy+eDJSZFLpMi/OrWw=","Date":"Tue, 6 Jan 2026 05:46:48 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Rui Wang <rui.wang@ideasonboard.com>","Cc":"linux-media@vger.kernel.org, dafna@fastmail.com, mchehab@kernel.org,\n\theiko@sntech.de, linux-rockchip@lists.infradead.org,\n\tlinux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org,\n\tlibcamera-devel@lists.libcamera.org","Subject":"Re: [PATCH v4 1/1] media: rkisp1: Fix filter mode register\n\tconfiguration","Message-ID":"<20260106034648.GP10026@pendragon.ideasonboard.com>","References":"<20260105171142.147792-1-rui.wang@ideasonboard.com>\n\t<20260105171142.147792-2-rui.wang@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20260105171142.147792-2-rui.wang@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>"}},{"id":37497,"web_url":"https://patchwork.libcamera.org/comment/37497/","msgid":"<176770230345.3486172.1119327800680289066@ping.linuxembedded.co.uk>","date":"2026-01-06T12:25:03","subject":"Re: [PATCH v4 1/1] media: rkisp1: Fix filter mode register\n\tconfiguration","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Rui Wang (2026-01-05 17:11:42)\n> The rkisp1_flt_config() function performs an initial direct write to\n> RKISP1_CIF_ISP_FILT_MODE without including the RKISP1_CIF_ISP_FLT_ENA\n> bit, which clears the filter enable bit in the hardware.\n> \n> The subsequent read/modify/write sequence then reads back the register\n> with the enable bit already cleared and cannot restore it, resulting in\n> the filter being inadvertently disabled.\n> \n> Remove the redundant direct write. The read/modify/write sequence alone\n> correctly preserves the existing enable bit state while updating the\n> DNR mode and filter configuration bits.\n> \n> Signed-off-by: Rui Wang <rui.wang@ideasonboard.com>\n> ---\n>  \n> Changelog since v1:\n>  1. Update version number from v1 to v4 to clarify the confusing\n> \n> Reviewed-by Stefan Klug and Kieran Bingham\n>  from v1 are carried over (no function code changes).\n\nTo carry them over you need to include the tags.\n\nFrom the previous version:\n\nReviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n> \n>  drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 6 ------\n>  1 file changed, 6 deletions(-)\n> \n> diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c\n> index c9f88635224c..6442436a5e42 100644\n> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c\n> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c\n> @@ -411,12 +411,6 @@ static void rkisp1_flt_config(struct rkisp1_params *params,\n>         rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_FILT_LUM_WEIGHT,\n>                      arg->lum_weight);\n>  \n> -       rkisp1_write(params->rkisp1, RKISP1_CIF_ISP_FILT_MODE,\n> -                    (arg->mode ? RKISP1_CIF_ISP_FLT_MODE_DNR : 0) |\n> -                    RKISP1_CIF_ISP_FLT_CHROMA_V_MODE(arg->chr_v_mode) |\n> -                    RKISP1_CIF_ISP_FLT_CHROMA_H_MODE(arg->chr_h_mode) |\n> -                    RKISP1_CIF_ISP_FLT_GREEN_STAGE1(arg->grn_stage1));\n> -\n>         /* avoid to override the old enable value */\n>         filt_mode = rkisp1_read(params->rkisp1, RKISP1_CIF_ISP_FILT_MODE);\n>         filt_mode &= RKISP1_CIF_ISP_FLT_ENA;\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 9463ABDCBF\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  6 Jan 2026 12:25:09 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C7B4D61FA0;\n\tTue,  6 Jan 2026 13:25: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 B081461F9F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  6 Jan 2026 13:25:06 +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 66F71581;\n\tTue,  6 Jan 2026 13:24:45 +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=\"WbfyO5LV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1767702285;\n\tbh=wBRsYLtKcDyFYvStHEhKrcma21Zlzgl0W/z54XToUP0=;\n\th=In-Reply-To:References:Subject:From:Cc:To:Date:From;\n\tb=WbfyO5LVDaAUBZF/4QiTewmuodA+E4eD2oQH4IbmJioV3EDqPF9Yi7Nduu6InKEdk\n\tLBPer/1I9X4igMs25RQEmXYuKGHfmiAwRHYYYY7ds8mZ2P0t0LJq05k3omLm2Kz54v\n\txH9PTpmM3USsjyeLOKT9wlN/nkRb/PJozmNFED6s=","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20260105171142.147792-2-rui.wang@ideasonboard.com>","References":"<20260105171142.147792-1-rui.wang@ideasonboard.com>\n\t<20260105171142.147792-2-rui.wang@ideasonboard.com>","Subject":"Re: [PATCH v4 1/1] media: rkisp1: Fix filter mode register\n\tconfiguration","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org, Rui Wang <rui.wang@ideasonboard.com>","To":"Rui Wang <rui.wang@ideasonboard.com>, dafna@fastmail.com, heiko@sntech.de,\n\tlaurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org, \n\tlinux-kernel@vger.kernel.org, linux-media@vger.kernel.org,\n\tlinux-rockchip@lists.infradead.org, mchehab@kernel.org","Date":"Tue, 06 Jan 2026 12:25:03 +0000","Message-ID":"<176770230345.3486172.1119327800680289066@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>"}}]