From patchwork Tue Aug 10 16:11:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 13290 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 039D0C3240 for ; Tue, 10 Aug 2021 16:11:40 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 53954687F0; Tue, 10 Aug 2021 18:11:39 +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="YnblcY+E"; 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 341DC687F0 for ; Tue, 10 Aug 2021 18:11:37 +0200 (CEST) Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id B48253F0; Tue, 10 Aug 2021 18:11:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1628611896; bh=RElEe+JDb6yYZ5QAMrwdT023Pm91OW9Ik7FIbqjjDVQ=; h=From:To:Cc:Subject:Date:From; b=YnblcY+Ee5K/AHLyfpDeLW0Vt6vDJC/4u4wgwqCcXIUQlHkDFRPn6WvOdxe+qtdJZ Ni+H606GZaseRc3gR8+Xnb+OZpm4Z7fWreE+0M+0vsLrJJDbts/8Obzh7+leVhXkH6 9Zlo08oBsK4KP5VXymMWzmHDGA3cRx0CJnQikK8A= From: Kieran Bingham To: libcamera devel Date: Tue, 10 Aug 2021 17:11:31 +0100 Message-Id: <20210810161134.2243796-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/3] Request: Use the Camera's CameraControlValidator 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" Now that we have the d-pointer designs growing, we can put a CameraControlValidator in the Camera's private class, and expose it internally such that the Request class can reference the single instance, rather than constructing one for each request. Patch 1/3 first fixes up the ControlList to take a const pointer to ControlValidator as a pre-requisite to patch 3/3. Patch 2/3 constructs a CameraControlValidator instance on the Camera, and exposes an internal helper on it's private interface to access it. - Please note / check the use of the _o() pointer here. Patch 3/3 then takes the Camera's CameraControlValidator to use on all Requests when they are constructed. Kieran Bingham (3): libcamera: controls: Use a const ControlValidator libcamera: camera: Create a CameraControlValidator libcamera: request: Use external CameraControlValidator include/libcamera/controls.h | 6 +++--- include/libcamera/internal/camera.h | 6 ++++++ include/libcamera/request.h | 1 - src/libcamera/camera.cpp | 2 +- src/libcamera/controls.cpp | 6 ++++-- src/libcamera/request.cpp | 11 ++++------- 6 files changed, 18 insertions(+), 14 deletions(-)