From patchwork Tue Sep 8 07:49:00 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 9516 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 2CCDCBDB1C for ; Tue, 8 Sep 2020 07:49:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A26EB62BAA; Tue, 8 Sep 2020 09:49:19 +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="MHUNt07F"; dkim-atps=neutral Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5A44B60534 for ; Tue, 8 Sep 2020 09:49:18 +0200 (CEST) Received: by mail-wr1-x42e.google.com with SMTP id g4so18027059wrs.5 for ; Tue, 08 Sep 2020 00:49:18 -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=h/hVfZCPa+SgwQdNaI57E/9PbmKP0C2+REBSvsBh3W4=; b=MHUNt07FiEDkZULyrli+CEagBi2Eh4bFGXXHHEoiRzLWVuOc9QP15+CaYa7R6xB3mh LDhy3xSsW3gAT+hUWvwEyPppgs0ZK+WaB8BA7gkXjE2H3LaRLn+eK/e4rXw+RkWK5eIJ BN5aY79EL2Ro0yEUt1h/eGxUomuWMOZQHXHFB6LEQEXbqHzrzDl1SNFWAUuuTNNy+V27 TGpsTkZEv1ojdlDroMaRg940lX/V+tixBCSseKX/36USorvT4YHmZWqYq3MWyPZ5u726 LR4urW+TEgGqH9wQfRO2Nf11nZYcydzD4lc/Qxg3bnnVjfZU4Qlk5MpNB1OY3ZhvDTsm yQAw== 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=h/hVfZCPa+SgwQdNaI57E/9PbmKP0C2+REBSvsBh3W4=; b=rogSlrI3Gaj4IYUYR26NyIH5BE+nvT+Buzn8sOkQ0DXoPjCA2iQmVnhIjb7YKQWwjl aWbQ57Zx454FY5R1SbA6niw1oEt1JPUgSw+ybMtN0OHncXE2reKDItUQ/zB1nredfuCk xlakJqW3t1Kl+adPblo2/khOBKu5nb+L4xT31uyLHeRtKZn4gP/rXJhYwYhxpxbNQS9d SV+qBdvOiWYx7lzOyaVijauyoXWIs1GA3hqtm2qF68wJjJnnyLTutpYO3GsTEwjX0cCs yJWD8Xd0l/bbNYbq3mSF+lZIvYtZ7EfjMuemkykptHjhIS9Lsxlu0el3/IMp4iuhxxbp KvDQ== X-Gm-Message-State: AOAM532SfJjTOPNAxLJlVQyZnCmkMdqfVVxLwyZJ01fyByFAEm5bMXQ/ 8x71yS6JAj8WbZNUKITjjMURZ/5RK3wdOQ== X-Google-Smtp-Source: ABdhPJw1YLFhKfmWytKlzC85tqI1WwnCFxTZLB2TWmVMMMfN+CbfJNPP16DalEYIR9lX+ZafpJnktw== X-Received: by 2002:adf:f10a:: with SMTP id r10mr24513016wro.86.1599551357779; Tue, 08 Sep 2020 00:49:17 -0700 (PDT) Received: from naushir-VirtualBox.patuck.local ([88.97.76.4]) by smtp.gmail.com with ESMTPSA id q15sm32534502wrr.8.2020.09.08.00.49.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 00:49:17 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Date: Tue, 8 Sep 2020 08:49:00 +0100 Message-Id: <20200908074913.109244-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v7 00/12] 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 all, This is v7 of the zero copy patch series. The only change between v6 and v7 is the removal of the "on-the-fly" mmap/unmap of stats and embedded data buffers if they were passed in through a Request. This is no loss of functionality, as the application can never request these buffers, so the code path would never be exercised. Once the framework is in place for an app to request these types of buffer, we must revisit and find an efficient mechanism to map/unmap unknown buffers for use by the IPA. Regards, Naush Naushir Patuck (12): 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 pipeline: raspberrypi: Use an unordered_map for the stream buffer list pipeline: raspberrypi: Use an unordered_set to store IPA buffer ids pipeline: ipa: raspberrypi: Handle any externally allocated FrameBuffer include/libcamera/ipa/raspberrypi.h | 13 +- src/ipa/raspberrypi/raspberrypi.cpp | 26 +- .../pipeline/raspberrypi/meson.build | 1 + .../pipeline/raspberrypi/raspberrypi.cpp | 571 ++++++++---------- .../pipeline/raspberrypi/rpi_stream.cpp | 244 ++++++++ .../pipeline/raspberrypi/rpi_stream.h | 140 +++++ 6 files changed, 645 insertions(+), 350 deletions(-) create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.cpp create mode 100644 src/libcamera/pipeline/raspberrypi/rpi_stream.h