From patchwork Wed Jul 15 14:06:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 8823 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 170AFBD790 for ; Wed, 15 Jul 2020 14:07:12 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 562C46093A; Wed, 15 Jul 2020 16:07:11 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="Bzj2IbMI"; dkim-atps=neutral Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CF82360487 for ; Wed, 15 Jul 2020 16:07:09 +0200 (CEST) Received: by mail-wr1-x433.google.com with SMTP id a6so2876509wrm.4 for ; Wed, 15 Jul 2020 07:07:09 -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=d6RQmCJGtnP3knG95I+K2+q14F6DTt7HpF5INgwg1j0=; b=Bzj2IbMIymF8FiSj4P/DwghLD519PkdbV5XCqG45fTmxTtQnGvD2qbQ7bOfBfcbbJC Rqp0+g9IWhRQYFweWQMApi6jm9O0iiLZ0UFP9IX4QVDnmMa4ecT36cYl4Wu7SQx/SLQJ wqS4b3QZZnE/eegGD3LS1UXGT3eUSDDVrBTgbOc74YjVwC/Wo5ihmMQGiVxL+Ajv6YIg k22uOV8XnjEc/UOQN3dT6iXWFPwU1bIaDhEY7Vx9dU3lYEfZERiU7ZQ5bX1aDUrQzOP3 +hGCK24RhfndgOjEWOw12MHzV9cAUrG+W0LLagAporcRPAIUt3yg9JzEy2oYLDe32i0V hLbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=d6RQmCJGtnP3knG95I+K2+q14F6DTt7HpF5INgwg1j0=; b=SmpltI0q3m3Zhonkjs+rFw1RI01Tmaf/1Kap6pASBrN4fdMXHfl1c+i6pYFGhf4CZ7 f6EbPO00TSmyJtQq+2Wr5MRqCOSRC+IbvbI8occZSZraFlk+wThhJgfvLYmB9gEaXLXo qW0SxnUdHHYEGTFds1Q3pBGV+PsOL+F4yYsVwFp5puBVBMfefR7dKum3zjGzNFRjNGuL F3p1gdSvCieRpsKC28XB6191qLpp6S/loRcSg0ZlqpDLU6QWEohyU9F7INlq4MtYofr7 H9RS/oEp+PF7MrkxHwpv+8m3fcDWR8C3bObDX3/FWVa1fNonczM3yS5ebVYIw/ekWDFQ UKVw== X-Gm-Message-State: AOAM533I+TpTCyuEGAiyOPIw7OnALScjhG7vcTzVDX/faQ0FElANzkxV GSkoYa0HtTcaCc2vLeNWMMHUiWUM+dw= X-Google-Smtp-Source: ABdhPJxy0+gow5VJwK8jLI+cBpJtmF3+IrPNIkJcAJ+1/tu4q8HAlfzLODaB3LJCVXKUXn0gcn+/tw== X-Received: by 2002:adf:ee0f:: with SMTP id y15mr11343741wrn.76.1594822028743; Wed, 15 Jul 2020 07:07:08 -0700 (PDT) Received: from naushir-VirtualBox.patuck.local ([88.97.76.4]) by smtp.gmail.com with ESMTPSA id l67sm4195339wml.13.2020.07.15.07.07.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Jul 2020 07:07:07 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Wed, 15 Jul 2020 15:06:53 +0100 Message-Id: <20200715140703.566298-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [WIP PATCH v2 00/10] Zero-copy RAW stream work 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" Hi, Here is version 2 of the zero-copy RAW stream patch. The following changes have been made over v1: - Addressed Niklas review comments. - Removed use of FrameBuffer::cookie() as it could be set externally. - Added a change to address the use of dmabufs that could have been allocated outside of the v4l2 device. We must still track it in the pipeline and IPA. Commit 2/10 still will need rework once Laurnet's change for IPA configuration passing has been merged. Thanks, Naush Naushir Patuck (10): libcamera: pipeline: raspberrypi: Move RPiStream into a separate file libcamera: pipeline: ipa: raspberrypi: Rework drop frame signalling libcamera: pipeline: raspberrypi: Add some debug logging libcamera: pipeline: raspberrypi: Increase the number of RAW buffers libcamera: pipeline: raspberrypi: Remove const qualifier from RPiStream libcamera: pipeline: raspberrypi: Rework stream buffer logic for zero-copy libcamera: pipeline: raspberrypi: Fix bug in passing configuration to IPA libcamera: pipeline: raspberrypi: Add more robust stream buffer logic libcamera: pipeline: ipa: raspberrypi: Remove use of FrameBuffer cookie libcamera: pipeline: raspberrypi: Handle any externally allocated FrameBuffer include/libcamera/ipa/raspberrypi.h | 2 +- src/ipa/raspberrypi/raspberrypi.cpp | 21 +- .../pipeline/raspberrypi/meson.build | 1 + .../pipeline/raspberrypi/raspberrypi.cpp | 531 +++++++----------- .../pipeline/raspberrypi/rpi_stream.cpp | 219 ++++++++ .../pipeline/raspberrypi/rpi_stream.h | 118 ++++ 6 files changed, 552 insertions(+), 340 deletions(-) create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.cpp create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.h