From patchwork Wed Sep 29 07:17:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13973 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 464CFBDC71 for ; Wed, 29 Sep 2021 07:17:18 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 87E3969191; Wed, 29 Sep 2021 09:17:17 +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="wm3rW1G2"; 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 08D846918A for ; Wed, 29 Sep 2021 09:17:16 +0200 (CEST) Received: from perceval.ideasonboard.com (unknown [103.251.226.9]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id D535E3F0; Wed, 29 Sep 2021 09:17:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1632899835; bh=Jv8MKs+S3xorRQndzIkgEcNnwZzRh+U7RBePwGmOfcc=; h=From:To:Cc:Subject:Date:From; b=wm3rW1G2TygRI6PaqSTC3CyfP2ahzZzpEAOGJ2F2VaFniq6gOHqlKYlFFFI7J5BTD sl8ActGOkDWUrWTx33XD0GxQNxcq098tjZH9JZl++7UVsMbj2KTKe39QsQLmGgrBvw ozljvFtAAQYjpXUjB8F8kYZ5Nv+8HPb8to3e2pKE= From: Umang Jain To: libcamera-devel@lists.libcamera.org Date: Wed, 29 Sep 2021 12:47:05 +0530 Message-Id: <20210929071708.299946-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/3] Camera3RequestDescriptors std::map => std::queue 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" As per the extended design discussion for libcamera HAL, this series addresses the part I of the design that will lead to new iterations for async post-processor eventually. The series mainly ports storage of Camera3RequestDescriptor from std::map => queue while fixing out-of-order request completion from abortRequest(). The series also accounts for a singular location to send back capture results to the framework (find sendCaptureResults()). The series has been validated on CTS: 229 / 231 (carrying [PATCH v3 0/1] android: Wait on acquisition fences in CameraStream) \wip: Checkstyle isn't happy with 2/3's camera_device.h, not sure why! Changes in v3: - Change abortRequest to accept a descriptor only, in 3/3 - Fix wrong logic around abortRequest() descriptor selection - Last request descriptor was selected instead of current one - Use of `auto` whereever applicable - simplify descriptors_ clearance on stop() Changes in v2: - Use queue instead of deque - Fix a race between abortRequest() and queuing a descriptor in 2/3 - address general comments in v1 review. Umang Jain (3): android: camera_worker: Use Camera3RequestDescriptor as cookie android: camera_device: Transform descriptors_ map to queue android: camera_device: Send capture results by inspecting the queue src/android/camera_device.cpp | 140 ++++++++++++++++++++-------------- src/android/camera_device.h | 17 ++++- src/android/camera_worker.cpp | 4 +- src/android/camera_worker.h | 3 +- 4 files changed, 102 insertions(+), 62 deletions(-)