{"id":25279,"url":"https://patchwork.libcamera.org/api/patches/25279/?format=json","web_url":"https://patchwork.libcamera.org/patch/25279/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20251130130220.138695-1-rui.wang@ideasonboard.com>","date":"2025-11-30T13:02:20","name":"[v3] media: rkisp1: Fix filter mode register configuration","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"9716c85f5463b4a35fe54de52ce9ae31450785ba","submitter":{"id":241,"url":"https://patchwork.libcamera.org/api/people/241/?format=json","name":"Rui Wang","email":"rui.wang@ideasonboard.com"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25279/mbox/","series":[{"id":5624,"url":"https://patchwork.libcamera.org/api/series/5624/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5624","date":"2025-11-30T13:02:20","name":"[v3] media: rkisp1: Fix filter mode register configuration","version":3,"mbox":"https://patchwork.libcamera.org/series/5624/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25279/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25279/checks/","tags":{},"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 6DDDDC0F2A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tSun, 30 Nov 2025 13:02:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 49A9860A9E;\n\tSun, 30 Nov 2025 14:02:37 +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 A97C8606E6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tSun, 30 Nov 2025 14:02:35 +0100 (CET)","from rui-Precision-7560.local (unknown [209.216.103.65])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 801053E6;\n\tSun, 30 Nov 2025 14:00:22 +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=\"eLDNPFNM\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1764507622;\n\tbh=arZO94CvoyZJrbIODUiQ/h4kmJbICjOtXQI878yFKyc=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=eLDNPFNMfs03nH/30nNjK5baM52rNNG/1R6WxhXbB46wxfdMUpeba8vk8Z6jS3e07\n\tsDY6vTVp+vvN6CYasZb6jAkrkUGHh2sJJKKwv2h5qRbJ6e/M3pM0Mwa/qRoJ7Ms8Kv\n\tp3WTmnPk+51BpajgLQ3lLRtXdBodX5YtFLEqQx3o=","From":"Rui Wang <rui.wang@ideasonboard.com>","To":"libcamera-devel@lists.libcamera.org","Cc":"Rui Wang <rui.wang@ideasonboard.com>","Subject":"[PATCH v3] media: rkisp1: Fix filter mode register configuration","Date":"Sun, 30 Nov 2025 08:02:20 -0500","Message-ID":"<20251130130220.138695-1-rui.wang@ideasonboard.com>","X-Mailer":"git-send-email 2.43.0","MIME-Version":"1.0","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>"},"content":"The rkisp1_flt_config() function performs an initial direct write to\nRKISP1_CIF_ISP_FILT_MODE without including the RKISP1_CIF_ISP_FLT_ENA\nbit, which clears the filter enable bit in the hardware.\n\nThe subsequent read/modify/write sequence then reads back the register\nwith the enable bit already cleared and cannot restore it, resulting in\nthe filter being inadvertently disabled.\n\nRemove the redundant direct write. The read/modify/write sequence alone\ncorrectly preserves the existing enable bit state while updating the\nDNR mode and filter configuration bits.\n\nSigned-off-by: Rui Wang <rui.wang@ideasonboard.com>\n---\n drivers/media/platform/rockchip/rkisp1/rkisp1-params.c | 6 ------\n 1 file changed, 6 deletions(-)","diff":"diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-params.c\nindex 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;\n","prefixes":["v3"]}