From patchwork Tue Nov 15 09:07:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 17794 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 F1E3EBE08B for ; Tue, 15 Nov 2022 09:08:05 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CD43663095; Tue, 15 Nov 2022 10:08:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1668503284; bh=aMyrgkzUOkwUYQTup5cASIlz0rdgebhBWZ2ofkFbw4g=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=SYoz3pKuX9mg0TVvuO/ZP7RnYyYJYVBivJZjeSvcQ+8tXBPT96LJXBUwzLR52Lef5 xuKxRJ6Ab50LFq8wnRutSN6OLbFwtvnFZ8+tcn79H1OrB3iX5F0X7JW+153+HrX4Ak RIpv6HYr+ca/zCNKFOhHjG/iNuSGB7fBkw8+J8aeIPG9ZlaQOtTHtI7arCpxQ0xmO4 OSMvYN00dagUA43SFIhAZl46LAkG9AXzCVK0o/12ua4cb1AK+gHlx7oto13bvpHj8k bveG6VL+WOIyy/BbPDlr4UWqyETpjTLkNnAyHQpPdiNuBQPmAUaYhTRYNrhpfrZsz5 1pg+XKz4j7ubw== Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1844063079 for ; Tue, 15 Nov 2022 10:08:02 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="qBnZbjlY"; dkim-atps=neutral Received: by mail-wr1-x42c.google.com with SMTP id j15so23120680wrq.3 for ; Tue, 15 Nov 2022 01:08:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=9/S6c5LA/uGjh5irR7dj+to8pxwOG/wP47q4LrRMbC8=; b=qBnZbjlYrrd6D4FBjccvVqbbFzyFbQ+93kw6V4qQTeD07KsXSFqDTot5RxsTDesoL0 sfDd8MD/I64C9xSiQkUDzX0Ht6VI7qZ6XNuUEucSUIGs8BBXca1cgfizhLQKebYioFtC YKIzaryIZQvcrKQw1CUMU+c5eYWUKgyVNo03UA7HcXThc5WMdlmq/K2IH3vtoJ/D2RLT Ty6KmnjxH1xF+u5rBHjkdsCOVAncLlimsLhcqDENdyRSAsG1zA38xeyHdGRZ6F6C9g+i Fl4QhYJ3KfatL0bWO3lb77ITCCgoEJ3YHKmqOLCFAVRO4Xd+Tdm8/usqT943rJu41rDY JLMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=9/S6c5LA/uGjh5irR7dj+to8pxwOG/wP47q4LrRMbC8=; b=1Vt+wAJe2B3ds9aj6fy8vhQgMzLC0PCpKsogkAGK+/fS9+dvxN21ZRl18og5Y/X3ex EmdI35rSrQxHnkSpZWp8QpfgARLU8oBRqHR5INkyBJ7CG/E5Z+rwKizgAn8VJxMt9C5A RThyFqcw0qqDED1f6UhY5Gs+cMgRmA/Prbs5LC/YeX6wkCNWp1uTQAfZ8JL3qneHlfvL 6TS04ZZCDxVWWkZbZovLfz18umscn5vUfWL2wnjVBEOJr0uwsr6jjKX5DEsq3U85ixLp KTlL9IBWqNOvQtnVnG0/KriR63lZHPsBdngGMEomXpOxBlxgf/33cXL4z9L8huCxIEIC ZE2w== X-Gm-Message-State: ANoB5pm/CJ2TyDzEcv3P3DL0Zjx1s2A8URufHu4onA02Fqeg5U8tmcgq P2vEu9toKTie8NfJ81HypelNuYgoJ/7d2Q== X-Google-Smtp-Source: AA0mqf7HTr44cTeoudvCbfO6JwyrGnuLwjDy4nZcKPQkCZab6SrpM5IQlvIXMZB8LmM7GYbstLlKgg== X-Received: by 2002:a05:6000:12d0:b0:22e:2c8b:993d with SMTP id l16-20020a05600012d000b0022e2c8b993dmr9590821wrx.523.1668503281582; Tue, 15 Nov 2022 01:08:01 -0800 (PST) Received: from naush-laptop.localdomain ([93.93.133.154]) by smtp.gmail.com with ESMTPSA id p25-20020a05600c1d9900b003c64c186206sm15143696wms.16.2022.11.15.01.08.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 01:08:01 -0800 (PST) To: libcamera-devel@lists.libcamera.org Date: Tue, 15 Nov 2022 09:07:49 +0000 Message-Id: <20221115090755.2921-3-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221115090755.2921-1-naush@raspberrypi.com> References: <20221115090755.2921-1-naush@raspberrypi.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v6 2/8] pipeline: raspberrypi: Switch to RPi::DelayedControls 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: , X-Patchwork-Original-From: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Switch the Raspberry Pi pipeline handler to use the DelayedControls implementation in the RPi:: namespace. This will allow us to use Raspberry Pi specific API changes in future commits. Signed-off-by: Naushir Patuck Reviewed-by: David Plowman --- src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp index 343f8cb2c7ed..f3be4ee3b730 100644 --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp @@ -33,7 +33,6 @@ #include "libcamera/internal/bayer_format.h" #include "libcamera/internal/camera.h" #include "libcamera/internal/camera_sensor.h" -#include "libcamera/internal/delayed_controls.h" #include "libcamera/internal/device_enumerator.h" #include "libcamera/internal/framebuffer.h" #include "libcamera/internal/ipa_manager.h" @@ -41,6 +40,7 @@ #include "libcamera/internal/pipeline_handler.h" #include "libcamera/internal/v4l2_videodevice.h" +#include "delayed_controls.h" #include "dma_heaps.h" #include "rpi_stream.h" @@ -243,7 +243,7 @@ public: RPi::DmaHeap dmaHeap_; SharedFD lsTable_; - std::unique_ptr delayedCtrls_; + std::unique_ptr delayedCtrls_; bool sensorMetadata_; /* @@ -1294,13 +1294,13 @@ int PipelineHandlerRPi::registerCamera(MediaDevice *unicam, MediaDevice *isp, Me * Setup our delayed control writer with the sensor default * gain and exposure delays. Mark VBLANK for priority write. */ - std::unordered_map params = { + std::unordered_map params = { { V4L2_CID_ANALOGUE_GAIN, { result.sensorConfig.gainDelay, false } }, { V4L2_CID_EXPOSURE, { result.sensorConfig.exposureDelay, false } }, { V4L2_CID_HBLANK, { result.sensorConfig.hblankDelay, false } }, { V4L2_CID_VBLANK, { result.sensorConfig.vblankDelay, true } } }; - data->delayedCtrls_ = std::make_unique(data->sensor_->device(), params); + data->delayedCtrls_ = std::make_unique(data->sensor_->device(), params); data->sensorMetadata_ = result.sensorConfig.sensorMetadata; /* Register initial controls that the Raspberry Pi IPA can handle. */