From patchwork Tue Apr 20 13:07:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 12012 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 66F0DBDB16 for ; Tue, 20 Apr 2021 13:07:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id D4EE468840; Tue, 20 Apr 2021 15:07:49 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="grORsmnd"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 9E0A06883E for ; Tue, 20 Apr 2021 15:07:46 +0200 (CEST) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 211DC89B; Tue, 20 Apr 2021 15:07:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1618924066; bh=PJagYQs1QPFKkU8d8OPlYToJNuQFN8DkwVdmIBn5Qr8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=grORsmndLMA2GVTP5GjMtsNVYujmqBuU00qm9whsDKFNiUrc0eiUG0lQ448oePZ0S RCssbJt3U+er6CnYSzIBggEbRxKI7bI2/1EKthK/VvCLUF8lCLwHxz+VD+fmF7U4yu NNcS1iHltNvZHmxIH4wflojJZ0pH49lHFHR++o3s= From: Kieran Bingham To: libcamera devel Date: Tue, 20 Apr 2021 14:07:37 +0100 Message-Id: <20210420130741.236848-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210420130741.236848-1-kieran.bingham@ideasonboard.com> References: <20210420130741.236848-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 2/6] libcamera: pipeline: ipu3: frames: Fail if the FrameInfo can't be found 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 FrameInfo structure associates the data sent to the IPA and is essential for handling events. If it can not be found, this is a fatal error which must be fixed. Signed-off-by: Kieran Bingham Reviewed-by: Jean-Michel Hautbois Reviewed-by: Laurent Pinchart Reviewed-by: Hirokazu Honda --- v3: - Make all occurrences of failing to find a frame info fatal. --- src/libcamera/pipeline/ipu3/frames.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/ipu3/frames.cpp b/src/libcamera/pipeline/ipu3/frames.cpp index 03e8131c4829..a1b014eed8d7 100644 --- a/src/libcamera/pipeline/ipu3/frames.cpp +++ b/src/libcamera/pipeline/ipu3/frames.cpp @@ -113,7 +113,8 @@ IPU3Frames::Info *IPU3Frames::find(unsigned int id) if (itInfo != frameInfo_.end()) return itInfo->second.get(); - LOG(IPU3, Error) << "Can't find tracking informaton for frame " << id; + LOG(IPU3, Fatal) << "Can't find tracking informaton for frame " << id; + return nullptr; } @@ -131,7 +132,8 @@ IPU3Frames::Info *IPU3Frames::find(FrameBuffer *buffer) return info; } - LOG(IPU3, Error) << "Can't find tracking informaton from buffer"; + LOG(IPU3, Fatal) << "Can't find tracking informaton from buffer"; + return nullptr; }