From patchwork Sat Dec 11 16:57:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 15135 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 CA4BABDB13 for ; Sat, 11 Dec 2021 16:56:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 036446088C; Sat, 11 Dec 2021 17:56:26 +0100 (CET) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id E36D760112 for ; Sat, 11 Dec 2021 17:56:24 +0100 (CET) Received: (Authenticated sender: jacopo@jmondi.org) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 5EE1E20007; Sat, 11 Dec 2021 16:56:24 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Sat, 11 Dec 2021 17:57:03 +0100 Message-Id: <20211211165714.23067-1-jacopo@jmondi.org> X-Mailer: git-send-email 2.33.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 00/11] libcamera: Add Fence support 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" Fixed two issues spotted by Laurent in review: - Request::prepare(): If timeout > 0 then start the timer - Test: set requestCompleted_ for successful requests too The combination of the two bugs made the issue went unnoticed, as: 1) Fence timer was never started 2) In the test, the timer to signal the fence timeout was not started It also went un-noticed when running CTS as simply a fence timeout could never happen. Buildbot and CTS validated. Thanks j Jacopo Mondi (10): libcamera: Print Timer identifier libcamera: fence: Introduce Fence libcamera: framebuffer: Add Fence to FrameBuffer libcamera: request: Add Fence to Request::addBuffer() libcamera: pipeline_handler: Split request queueing libcamera: pipeline: Introduce stopDevice() libcamera: request: Add Request::Private::prepare() libcamera: pipeline_handler: Prepare Request test: fence: Add test for the Fence class android: Remove CameraWorker Laurent Pinchart (1): libcamera: request: Make Request class Extensible include/libcamera/fence.h | 31 ++ include/libcamera/framebuffer.h | 4 + include/libcamera/internal/framebuffer.h | 8 + include/libcamera/internal/meson.build | 1 + include/libcamera/internal/pipeline_handler.h | 9 +- include/libcamera/internal/request.h | 65 +++ .../libcamera/internal/tracepoints/request.tp | 22 +- include/libcamera/meson.build | 1 + include/libcamera/request.h | 23 +- src/android/camera_device.cpp | 42 +- src/android/camera_device.h | 3 - src/android/camera_request.cpp | 3 +- src/android/camera_request.h | 6 +- src/android/camera_stream.cpp | 10 +- src/android/camera_worker.cpp | 129 ------ src/android/camera_worker.h | 70 ---- src/android/meson.build | 1 - src/libcamera/base/event_dispatcher_poll.cpp | 3 +- src/libcamera/base/timer.cpp | 4 +- src/libcamera/fence.cpp | 112 +++++ src/libcamera/framebuffer.cpp | 58 +++ src/libcamera/meson.build | 1 + src/libcamera/pipeline/ipu3/ipu3.cpp | 4 +- .../pipeline/raspberrypi/raspberrypi.cpp | 4 +- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 4 +- src/libcamera/pipeline/simple/simple.cpp | 4 +- src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 4 +- src/libcamera/pipeline/vimc/vimc.cpp | 4 +- src/libcamera/pipeline_handler.cpp | 101 ++++- src/libcamera/request.cpp | 395 ++++++++++++++---- test/fence.cpp | 335 +++++++++++++++ test/meson.build | 1 + 32 files changed, 1094 insertions(+), 368 deletions(-) create mode 100644 include/libcamera/fence.h create mode 100644 include/libcamera/internal/request.h delete mode 100644 src/android/camera_worker.cpp delete mode 100644 src/android/camera_worker.h create mode 100644 src/libcamera/fence.cpp create mode 100644 test/fence.cpp --- 2.33.1