From patchwork Wed Feb 21 17:40:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 19524 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 55201C3263 for ; Wed, 21 Feb 2024 17:40:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id C8D7462816; Wed, 21 Feb 2024 18:40:30 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="NQVhpOPS"; 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 0CE1561C9D for ; Wed, 21 Feb 2024 18:40:28 +0100 (CET) Received: from localhost.localdomain (unknown [IPv6:2001:b07:5d2e:52c9:cc1e:e404:491f:e6ea]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0483F2B3; Wed, 21 Feb 2024 18:40:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1708537220; bh=3z7DvESK+liXlMgHMPObKGRjmwfcjoLZ0B7SC62+AIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NQVhpOPS/TLzH+8w3MeRSvnYZdPhV4cuEd4zUEGaH9aYEYFezdMiM9yiV0+QIxJ/v u/emnfWF/kNCwH7pXHQvZto7KV9JI9HezVm8CZZpJ92ZrjRpNZ2P1F+gOdW9wERfYi B2lAtZ7+p6HM/qmONw33dRJ2heD3hYEU9JRlx3i4= From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Subject: [PATCH 2/5] libcamera: rkisp1: Create a request with a custom private class Date: Wed, 21 Feb 2024 18:40:10 +0100 Message-ID: <20240221174015.52958-3-jacopo.mondi@ideasonboard.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240221174015.52958-1-jacopo.mondi@ideasonboard.com> References: <20240221174015.52958-1-jacopo.mondi@ideasonboard.com> MIME-Version: 1.0 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: , Cc: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Signed-off-by: Jacopo Mondi Reviewed-by: Daniel Scally Tested-by: Daniel Scally Reviewed-by: Stefan Klug --- src/libcamera/pipeline/rkisp1/rkisp1.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 586b46d64630..e981e60758f7 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -39,6 +39,7 @@ #include "libcamera/internal/ipa_manager.h" #include "libcamera/internal/media_device.h" #include "libcamera/internal/pipeline_handler.h" +#include "libcamera/internal/request.h" #include "libcamera/internal/v4l2_subdevice.h" #include "libcamera/internal/v4l2_videodevice.h" @@ -83,6 +84,15 @@ private: std::map frameInfo_; }; +class RkISP1Request : public Request::Private +{ +public: + RkISP1Request(Camera *camera) + : Request::Private(camera) + { + } +}; + class RkISP1CameraData : public Camera::Private { public: @@ -157,6 +167,8 @@ public: int start(Camera *camera, const ControlList *controls) override; void stopDevice(Camera *camera) override; + std::unique_ptr createRequestDevice(Camera *camera, + uint64_t cookie) override; int queueRequestDevice(Camera *camera, Request *request) override; bool match(DeviceEnumerator *enumerator) override; @@ -1020,6 +1032,13 @@ void PipelineHandlerRkISP1::stopDevice(Camera *camera) activeCamera_ = nullptr; } +std::unique_ptr PipelineHandlerRkISP1::createRequestDevice(Camera *camera, + uint64_t cookie) +{ + auto request = std::make_unique(camera); + return Request::create(std::move(request), cookie); +} + int PipelineHandlerRkISP1::queueRequestDevice(Camera *camera, Request *request) { RkISP1CameraData *data = cameraData(camera);