{"id":25283,"url":"https://patchwork.libcamera.org/api/patches/25283/?format=json","web_url":"https://patchwork.libcamera.org/patch/25283/","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":"<20251202015025.601549-2-rui.wang@ideasonboard.com>","date":"2025-12-02T01:50:25","name":"[v1,1/1] 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/25283/mbox/","series":[{"id":5627,"url":"https://patchwork.libcamera.org/api/series/5627/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5627","date":"2025-12-02T01:50:24","name":"Fix filter mode register issue","version":1,"mbox":"https://patchwork.libcamera.org/series/5627/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25283/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25283/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 7070CC3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Dec 2025 01:50:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0F8B760C77;\n\tTue,  2 Dec 2025 02:50:48 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 3FBC560C23\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Dec 2025 02:50:46 +0100 (CET)","from rui-Precision-7560.local (unknown [209.216.103.65])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 790A816A;\n\tTue,  2 Dec 2025 02:48:31 +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=\"If1fBCfm\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1764640112;\n\tbh=arZO94CvoyZJrbIODUiQ/h4kmJbICjOtXQI878yFKyc=;\n\th=From:To:Cc:Subject:Date:In-Reply-To:References:From;\n\tb=If1fBCfmxGWHDAKXPMsdNxpbjYIHS7Vj73DzMJO5iLJn6Tkll1E9jdXEtqA5mPrQB\n\tdvycjsmisXiz7qRiRb0vhAYCoFU345XlK3HLF5fB0pdjhseh1QSpaZ45O+dOnDZYsQ\n\tRbQ3bJYmSB2WeqFOkRG87mWqmuCUufhheDH43H44=","From":"Rui Wang <rui.wang@ideasonboard.com>","To":"linux-media@vger.kernel.org, dafna@fastmail.com,\n\tlaurent.pinchart@ideasonboard.com, mchehab@kernel.org, heiko@sntech.de,\n\tlinux-rockchip@lists.infradead.org,\n\tlinux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org","Cc":"libcamera-devel@lists.libcamera.org, Rui Wang <rui.wang@ideasonboard.com>","Subject":"[PATCH v1 1/1] media: rkisp1: Fix filter mode register configuration","Date":"Mon,  1 Dec 2025 20:50:25 -0500","Message-ID":"<20251202015025.601549-2-rui.wang@ideasonboard.com>","X-Mailer":"git-send-email 2.43.0","In-Reply-To":"<20251202015025.601549-1-rui.wang@ideasonboard.com>","References":"<20251202015025.601549-1-rui.wang@ideasonboard.com>","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":["v1","1/1"]}