From patchwork Sat Oct 19 18:43:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Mader X-Patchwork-Id: 21703 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 12474C3302 for ; Sat, 19 Oct 2024 18:44:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id EAB9B6538D; Sat, 19 Oct 2024 20:44:16 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=collabora.com header.i=robert.mader@collabora.com header.b="jBCl06NM"; dkim-atps=neutral Received: from sender4-pp-f112.zoho.com (sender4-pp-f112.zoho.com [136.143.188.112]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E1B7065380 for ; Sat, 19 Oct 2024 20:44:13 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; t=1729363450; cv=none; d=zohomail.com; s=zohoarc; b=XOE6xB1veE6snB4Ygth6aajWBibWVQZ/TzQSDPC983NfzmwI/VSvRlbHL/o8WsKo1Ia0zl16aIdjcxqetW9JUfaEA0iO3dch8WFrytEFukHFabWngWrBNhjhFhncaY73w/ufp8QSSYU6bO7hERjJdDnc7Y6wFA/3tgG5ejhBjRw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1729363450; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=knZ82CySN+eCHh67b8pL3OWDNyMRSzBhtlrAv/RofvM=; b=FCMdeMekxa+XBcO28M7voitVVkokkthbzJTNUbL3y/VN1tda85ECIh97bbSnLoKTQpEcpltg1tDKz+HqOkx+oRkRW7AOr2mb8iwVUsTd7DnN0vINbZSWNkBkDyYXK3xIvZWThY9ySLoLWTQOd2of5Cg0h+NqpcspiQeQA6jIiiw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=collabora.com; spf=pass smtp.mailfrom=robert.mader@collabora.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1729363450; s=zohomail; d=collabora.com; i=robert.mader@collabora.com; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:MIME-Version:Content-Transfer-Encoding:Message-Id:Reply-To; bh=knZ82CySN+eCHh67b8pL3OWDNyMRSzBhtlrAv/RofvM=; b=jBCl06NMbl6TyDhjUb4Oguc1Zq92woELdbQDE0ZHMtxbYB5riGwWUYn/47Ow9U2O aDIHcLjJN+wLRHhQo1ESc94rRlPbOxzG/lGHh4aOjjvQYs1Jjr8VhOddHVNCQUUfveh yVZR1oaugbkcHfMisTH19Db04ZgwAuwE+WHsSC94= Received: by mx.zohomail.com with SMTPS id 1729363448036674.2882559438096; Sat, 19 Oct 2024 11:44:08 -0700 (PDT) From: Robert Mader To: libcamera-devel@lists.libcamera.org Cc: Robert Mader Subject: [PATCH 1/2] libcamera: software_isp: Stop clearing context config and state again Date: Sat, 19 Oct 2024 20:43:39 +0200 Message-ID: <20241019184340.111785-1-robert.mader@collabora.com> X-Mailer: git-send-email 2.47.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" This partly reverts commit 41e3d61c, removing parts that had unintended side effects as the intention for the commit was purely to fix crashes. Clearing the configuration turned out to be problematic as some values such as configuration.black.level only get on initialization and thus were never used. Clearing the activeState resulted in additional, arguably undesired churn, very noticable when switching back and forth between cameras. Whether this is desirable is AFAIK a matter of taste/policy and shouldn't have been done as part of a crash fix. Fixes: 41e3d61c ("libcamera: software_isp: Clear IPA context on configure and stop") Signed-off-by: Robert Mader --- src/ipa/simple/soft_simple.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp index c8ad55a2..065673dc 100644 --- a/src/ipa/simple/soft_simple.cpp +++ b/src/ipa/simple/soft_simple.cpp @@ -185,8 +185,6 @@ int IPASoftSimple::configure(const IPAConfigInfo &configInfo) const ControlInfo &gainInfo = sensorInfoMap_.find(V4L2_CID_ANALOGUE_GAIN)->second; /* Clear the IPA context before the streaming session. */ - context_.configuration = {}; - context_.activeState = {}; context_.frameContexts.clear(); context_.configuration.agc.exposureMin = exposureInfo.min().get();