From patchwork Tue Aug 2 08:45:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Plowman X-Patchwork-Id: 16893 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 7AFDFBE173 for ; Tue, 2 Aug 2022 08:45:46 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C6FBF63312; Tue, 2 Aug 2022 10:45:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659429945; bh=qViJt9ElRzZ12HFh8sq4bND0DH6WA8prgASElFgc2v4=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=tF59QDZIkecHqHIkdcgX2R91f1EAfRzSZ6zMf0VtqbKzKkZcRD2zD96X1BjFRPslX CP7WImdSpolHNhC+Yz+sMdlc3cpKpmt89p615FBfgcB5jTe8aB270ROa0QtNrOZ+1+ Ad+PRrcmfmrgnQ5JalrTUaMbO82H3pHlBFAowjguzPZ0eRgF2DMzheeTH6zcWCx4AD rzvf1Cr6/PDQR9rqa4yp7vyW3/ViHWgjpoGMJbAEgLD/Jq6XPLQiG9V6s194PCcS+n XQ8GLDHARMs+WaGAjEgmN8q91ewI0Zjw8cK0xPLcK18G+lJtItu1KXxCVbAx8LBsE8 tkEtnxCRZRwTQ== Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E73C26330D for ; Tue, 2 Aug 2022 10:45:44 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Gfsy/ZhF"; dkim-atps=neutral Received: by mail-wr1-x42a.google.com with SMTP id j15so8874983wrr.2 for ; Tue, 02 Aug 2022 01:45:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=E1krntqBcBJwd4+qPKQeBz5OU+FqK9ZkyZ44a48mf8g=; b=Gfsy/ZhF9IUjhv+yLF6NDKYTArbaXDZIIHmp6HvXeAVwlMo7+l4G1eYWhjoFZ9YxR7 hMAleG/5B/p3VhBIY2Y6iJd57NY7rkcMm9Xpx4fHGl9YJoPXLrrbugtMEI8ddSL7bnQG Id/B0/WhaiRqXgDs+u+qDIe8xU+cPL3av6d5qkYTnsEtTRiHBC+vEtK19Y1TE0g1q7J8 NlDzGMa0fG1KB1dZtUY5xZkhW/KW7RU/3MCmBy625AHPG625s8Eso+tcjci0UeY7DSTW E6Hi8bWrh9MK53d9PVaW5r7ZpDwPdWDEvcu47Tp6QFT3en9rKT0C3mZWWmt6xFaey0uU nkgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=E1krntqBcBJwd4+qPKQeBz5OU+FqK9ZkyZ44a48mf8g=; b=xBgDvN+UPDe8pIJyP3ZoPhS0dBR0OXnP2F+cx4rGVnmarCIk8vHhWzMvliXShcADDT PpkoO0A9L5sqUfb/OWOTmfDE7G6fjOoYPcMQi6Q7vb89NwCjeF4HMk+qnOHsO05qeR8K /q7vInz+/F1V6j4OsMFYISGRc0KlgSz5Dwk8HtO2e2HGOiyP8NSyl2IDwgpdsLDogqbQ BvziWgy9n07FM6rfhkWqMMkRU1xJufOvqprMn9DRxmxfEuMrbgkPe0kt5uZL5wBExytt 2be49XZFxpOjdkg5Wpr4Gk+NW3TmVETtVcro+3ZLVkkr+zxqOUM812QlHdgruEPGyQTN QzSg== X-Gm-Message-State: ACgBeo1hJl2BHeEbWlTJawcYMtGlsEi5PGbl2O08e0/+D3qBweyhtXSk ufUz28Y52bUOiNSwD79iqzOjriQxRUuAD/SS X-Google-Smtp-Source: AA6agR5Wxqb2sOyuxZ/gh0pINSHhN5MIl7/64B4IfY8QtmxPH/chRtnc7nLeHxU6qeoh007OuBXnAQ== X-Received: by 2002:a05:6000:1b83:b0:21e:5254:e014 with SMTP id r3-20020a0560001b8300b0021e5254e014mr12458624wru.277.1659429944225; Tue, 02 Aug 2022 01:45:44 -0700 (PDT) Received: from pi4-davidp.pitowers.org ([2a00:1098:3142:14:e4a2:3070:eea4:e434]) by smtp.gmail.com with ESMTPSA id k18-20020a5d6d52000000b0021f0c05859esm14101339wri.71.2022.08.02.01.45.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Aug 2022 01:45:43 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Tue, 2 Aug 2022 09:45:26 +0100 Message-Id: <20220802084526.4786-1-david.plowman@raspberrypi.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] ipa: raspberrypi: Reset embedded data parser on configure 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: , X-Patchwork-Original-From: David Plowman via libcamera-devel From: David Plowman Reply-To: David Plowman Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" When we switch camera mode following a pipeline reconfiguration, the embedded data parser should be "reset" to discard any data that it may have cached and that might now be invalid. Signed-off-by: David Plowman Reviewed-by: Naushir Patuck Reviewed-by: Laurent Pinchart --- src/ipa/raspberrypi/cam_helper.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ipa/raspberrypi/cam_helper.cpp b/src/ipa/raspberrypi/cam_helper.cpp index 37b66198..cac8f39e 100644 --- a/src/ipa/raspberrypi/cam_helper.cpp +++ b/src/ipa/raspberrypi/cam_helper.cpp @@ -106,6 +106,7 @@ void CamHelper::setCameraMode(const CameraMode &mode) { mode_ = mode; if (parser_) { + parser_->reset(); parser_->setBitsPerPixel(mode.bitdepth); parser_->setLineLengthBytes(0); /* We use SetBufferSize. */ }