From patchwork Tue Apr 20 13:07:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 12010 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 22483BDB16 for ; Tue, 20 Apr 2021 13:07:49 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E8E7568842; Tue, 20 Apr 2021 15:07:47 +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="GawlGFQ2"; 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 078C060516 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 70A983EE; Tue, 20 Apr 2021 15:07:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1618924065; bh=RMouApho6fDFyRj6ElY4xlpi/He4l6PhkhtNWZCZouw=; h=From:To:Cc:Subject:Date:From; b=GawlGFQ2EPU/lJVER4WSHZYYNJao095cfQAcgmRO9bwcAdp7+A217TOfpnptKzycN WZCpALtvMdeReuXFzhbyND6ZckbFt2O0qCla9zgN3JUugBhVDa2KROeJ/L1LMLABuK pbfwCMklGZCWvXYWyh037ckttlRpwds96Q/c4xrw= From: Kieran Bingham To: libcamera devel Date: Tue, 20 Apr 2021 14:07:35 +0100 Message-Id: <20210420130741.236848-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/6] IPU3 Debug Improvements 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 is 'very loosely' the next iteration of my earlier IPU3 debug improvements series as it contains a reimplementation of the Request Canary (by implementing Extensible Requests), a new version of libcamera: camera: Assert pipelines complete all requests and a repost of: libcamera: pipeline: ipu3: frames: Fail if the FrameInfo can't be found which is further joined by the equivalent change in the RKISP1. Furthermore, buffers now have a method to be able to mark them as cancelled if they are not used, allowing pipeline handlers to ensure buffer statuses are correctly set when the buffers don't actually get sent to hardware for any reason. This is used by the IPU3 to make sure when buffers are cancelled by the time they complete on the CIO2, and they don't get queued to the IMGU, they are marked accordingly. Finally, the internal logging mechanism for assertions is extended to report the function the assertion occurs in ... simply because it helps identify the issue quicker. Of course this information can be located by following the lines reported to the assertion, but it helps in the initial understanding of the report. Kieran Bingham (6): libcamera: camera: Assert pipelines complete all requests libcamera: pipeline: ipu3: frames: Fail if the FrameInfo can't be found libcamera: pipeline: rkisp1: Fail RkISP1FrameInfo can't be found libcamera: pipeline: ipu3: Cancel unused buffers libcamera: internal: log: Report function on asserts libcamera: request: Make it extensible include/libcamera/buffer.h | 2 ++ include/libcamera/internal/log.h | 7 ++-- include/libcamera/internal/pipeline_handler.h | 1 + include/libcamera/request.h | 4 ++- src/libcamera/buffer.cpp | 8 +++++ src/libcamera/camera.cpp | 2 ++ src/libcamera/pipeline/ipu3/frames.cpp | 6 ++-- src/libcamera/pipeline/ipu3/ipu3.cpp | 7 ++-- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 9 +++-- src/libcamera/pipeline_handler.cpp | 15 ++++++++ src/libcamera/request.cpp | 34 +++++++++++++++++-- 11 files changed, 82 insertions(+), 13 deletions(-)