From patchwork Thu Mar 17 14:08:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dufresne via libcamera-devel X-Patchwork-Id: 15470 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 98FE8BD80A for ; Thu, 17 Mar 2022 14:08:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id E80FD6118A; Thu, 17 Mar 2022 15:08:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1647526113; bh=srFdUt40kgw6DrlNN/MwTYhAPSJ/wA4CwRJMRMy+Q0w=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=4QCxADAGOtFRu6NsrLl0thTfD/Wy9KwQQ/KKFb4ygv8vI9J/co+IDSxH/6caorjWw ualB/p8/ruMPITYWVzzcqkABS3GUcHY6x+mWhqwAMM/NxNMgSedg1D7BeSraOvx2hf LyCzsn4KSIRhwBd01/eTTWl8U6gsD5Gxl2cuReeJ1tKqawKFrd2K4qh0OZc7NpG2zR nTXiffMWghTL3pmIq5XnUEZWGYjCEq8cAezWYu95JEQzKHMfACwfjW61rLjveyDYjX /0IoIJeBfImkW5uiXk3Qk+CnJUC6OTZS8ExZR/lXEkgqRA2RRqz18Lshd852+Fif36 ScWAgTbdZDWMA== Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id EBBD8601F8 for ; Thu, 17 Mar 2022 15:08:32 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="a4t/nECy"; dkim-atps=neutral Received: by mail-wm1-x330.google.com with SMTP id m42-20020a05600c3b2a00b00382ab337e14so5012007wms.3 for ; Thu, 17 Mar 2022 07:08:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BPBQf1u72sq02WNfM3PjQqEjUnYHWho2kYAIHJzpPKs=; b=a4t/nECy+kspc+RQ+ia7FqrEw6mx9wUd/ePK9c/GwZbWqrINHPCiFHY/wMfkBKTlu8 Q/F6jrUoie1YTOyXZXZN5d0+pAK+H1vQSFXkTPnWyEext7Bbd+TcksYdgOcEX0cB2rLj bUAWhYL0EmpRf+ANz5GDqgFDI1POM65OtnHwHs+gYJiqwjnxYZ+e82OY2sLpcj0fO+Ub fDYDNqZLVUaB6pjgCYTX/KK3Frw/Os7vCGXEm8gVcuCVZprHA89Q1tUn8UkWysyp2sQX ZJnweMFNM8FprXNo9FunBJi5RHGl/u6P39YvA3l7mFIrMHluKrd7B/1csJXAX+7xjPuA mBqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=BPBQf1u72sq02WNfM3PjQqEjUnYHWho2kYAIHJzpPKs=; b=f9ni3YNuNZwSLVGU5+ELoCnPXRr23aqB2/U8oiFN3ATpXJ9EkTE9hqs6GmLNJ/X0+s D1GaHJtF0YhYIXE6bB7Cv0KziMvVgBZjX6WD0Aqexd64zhekHrKl3Ailo6oJJQxcpu/Z LyUMvpCMhUdSuh7HS71JY08+YMa1R5Kt1tkApKbAlR9rmaKKDFvqlECe3Ds1ghHCCIex 8X70cE7eF9XzIMLjEKB2KXclNedmeQsAaq9MDlq8DWc+/7ReyQqx/+byWG3QsG5khNav HPLLXONTmt0g3S9RuuEe/r3aaP0Gnaba3bTbpLgj1AhEL/KioKW1+z2XAjaul8+F+Ltl AZkQ== X-Gm-Message-State: AOAM532WoCzoLV05KYFmy5ZbNybQ6DPNKii98gkCYsqbBUx266a8+AQr myMHIOirdPoaWHBUOjZVqSqqBCb8RGrlyw== X-Google-Smtp-Source: ABdhPJzShzC1I6X+rz1H91MJ+6/RVUBUbdSZ4nPPq+TmPW4sDrnnLqPnxmaSf3Yi0zO3YSjnhtlSaQ== X-Received: by 2002:a05:600c:3552:b0:389:95b2:5f4a with SMTP id i18-20020a05600c355200b0038995b25f4amr4203148wmq.24.1647526112297; Thu, 17 Mar 2022 07:08:32 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:371b:8e01:111f:5322]) by smtp.gmail.com with ESMTPSA id z5-20020a05600c0a0500b0037fa93193a8sm5287831wmp.44.2022.03.17.07.08.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 07:08:31 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Thu, 17 Mar 2022 14:08:21 +0000 Message-Id: <20220317140827.1835029-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 0/6] Raspberry Pi: Efficient start/stop/start sequences 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: Nicolas Dufresne via libcamera-devel Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi, Version 2 of this series has the follwing changes over v1: - Fixed typos in commit message in 1/6. - Squashed patches 3 and 4 from the v1. - Renamed the reconfigured_ flag to reallocate_. - Renamed RPi::Stream::reset() to RPi::Stream::resetBuffers() in 4/6. - Added a 5 second timeout after stopDevice() to free buffers in patch 5/6. Thanks, Naush Naushir Patuck (6): pipeline: raspberrypi: Avoid over-allocation for ISP Output 1 pipeline: raspberrypi: Move freeBuffers() to the RPiCameraData class pipeline: raspberrypi: Free buffers in the RPiCamera destructor and re-configure pipeline: raspberrypi: Repurpose RPi::Stream::reset() pipeline: raspberrypi: Add a timeout to free buffers on stopDevice() libcamera: v4l2_videodevice: Empty the V4L2 buffer cache on streamOff() include/libcamera/internal/v4l2_videodevice.h | 1 + .../pipeline/raspberrypi/raspberrypi.cpp | 73 ++++++++++++++----- .../pipeline/raspberrypi/rpi_stream.cpp | 13 ++-- .../pipeline/raspberrypi/rpi_stream.h | 2 +- src/libcamera/v4l2_videodevice.cpp | 16 ++++ 5 files changed, 77 insertions(+), 28 deletions(-)