From patchwork Sun Nov 30 01:21:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rui Wang X-Patchwork-Id: 25278 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 392D4C3257 for ; Sun, 30 Nov 2025 01:21:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 6AB5A60A9E; Sun, 30 Nov 2025 02:21:55 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="qW4Q22sZ"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3265A6069A for ; Sun, 30 Nov 2025 02:21:54 +0100 (CET) Received: from rui-Precision-7560.local (unknown [209.216.103.65]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8F76A42B; Sun, 30 Nov 2025 02:19:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1764465581; bh=tt4xBUdXoms8dNZrZCtA0Lt1uENL/WcUVLOrS4z4TCc=; h=From:To:Cc:Subject:Date:From; b=qW4Q22sZcEHcrKsI45qoAOhd3iKChl3RLQCqj3IJ2vhCtRjKXLWVXmDnHwepDYDcL swF0IVdBYoTtWW/r0QCYrtNPV+Ki6gW1bpz+sz8kL7UxFQXJ0AzWSiSecHFb1NCGP1 Rfrl+0SV9G4fXR+Z1dZM8tdJn9seLqvh/ntZzkF4= From: Rui Wang To: libcamera-devel@lists.libcamera.org Cc: Rui Wang Subject: [PATCH v2] media: rkisp1: Fix filter mode handling for sharpness and DNR Date: Sat, 29 Nov 2025 20:21:38 -0500 Message-ID: <20251130012138.2755931-1-rui.wang@ideasonboard.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The filter mode register was not configured correctly during mode changes. When sharpness is enabled, the driver also enables the DNR mode, but the default mode value (0x4f2) has bit 0 cleared, which disables the filter module entirely. As a result, neither sharpness nor DNR are actually enabled after a NoiseReductionMode transition such as OFF → FAST. Additionally, the filter block is not retriggered when switching states. Signed-off-by: Rui Wang --- changelog : delete bit set for sharpness control from prepare() --- src/ipa/rkisp1/algorithms/filter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ipa/rkisp1/algorithms/filter.cpp b/src/ipa/rkisp1/algorithms/filter.cpp index 8ad79801..dfa2b65a 100644 --- a/src/ipa/rkisp1/algorithms/filter.cpp +++ b/src/ipa/rkisp1/algorithms/filter.cpp @@ -37,7 +37,7 @@ namespace ipa::rkisp1::algorithms { LOG_DEFINE_CATEGORY(RkISP1Filter) static constexpr uint32_t kFiltLumWeightDefault = 0x00022040; -static constexpr uint32_t kFiltModeDefault = 0x000004f2; +static constexpr uint32_t kFiltModeDefault = 0x000004f3; /** * \copydoc libcamera::ipa::Algorithm::init