From patchwork Wed Apr 21 06:48:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12025 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 756B2BDB16 for ; Wed, 21 Apr 2021 06:48:56 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id DF7DA68840; Wed, 21 Apr 2021 08:48:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VZZKVjPe"; dkim-atps=neutral Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4EA34602C3 for ; Wed, 21 Apr 2021 08:48:54 +0200 (CEST) Received: by mail-pf1-x42d.google.com with SMTP id y62so3964373pfg.4 for ; Tue, 20 Apr 2021 23:48:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qnFrKzVf9bqhZ/QU7Z7GNHJ/p7PfSgEDoBkt5y8Tur0=; b=VZZKVjPekXgkNG9HPV/LNtt/C4GbL0z5fYtyzQVCh6KEbbjE80nJ/6oDM34/wfFtUp f1Jce2kM8KeueD0lzDSjzMflBoVB4Pw8tK6GBxRgBetfD5DJqbeFpDcYK1dmOPXpFE7J QC6EDRWCF0VI+89bu6MSBacU/JgClbVdd3CD8= 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=qnFrKzVf9bqhZ/QU7Z7GNHJ/p7PfSgEDoBkt5y8Tur0=; b=K5gdt8YajODNiPXgDZndTFkyXSIv3ORVMYckXtKzlYzGhs4ioO/UX5TlwvMwWPZshk lODtpG4Rx7NtJtIENlr42eJkt/724i5rxUH9F1QImqmYx0pI/0bCPA1m8Hi4RiAznfni wFv/y+KCX4j7XpoTj+wHnFrwvK1Ma7WvW6dkx2bTLJDhdfcGlemY2TeygPpajqtAQMcZ b1G1DMao8jm9t/58d2df9kYJmfwLvl1p55QM5MgXXBJt8gAYabHIIUxEKrwavxcYmiKp Bosx6coCi/3xWCzuuzg7JoQhJ1p61cOW0A0u91YI2RoXaarKVAVKTqxFGLBnqGMQ20EX UwKA== X-Gm-Message-State: AOAM531v8xRhWtlfqE+lsjuisJ8f/jiSBOdQOxKslR09gMXOCM5T7cwy P/b3198gJLq4+wGTKQfZ4ZMZ51ZReAId2w== X-Google-Smtp-Source: ABdhPJx62p6Hy2MbaG7s2mEL5eXnlHlEJ4ru2TmaMSpWn7wGODrXV4KE9cXwn66XoX+reZYUVtOEog== X-Received: by 2002:a65:62c5:: with SMTP id m5mr10068955pgv.319.1618987732669; Tue, 20 Apr 2021 23:48:52 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:7aaa:cbeb:5d87:4ab6]) by smtp.gmail.com with ESMTPSA id ng6sm1021458pjb.14.2021.04.20.23.48.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Apr 2021 23:48:52 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Wed, 21 Apr 2021 15:48:45 +0900 Message-Id: <20210421064847.324118-1-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.368.gbe11c130af-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/2] ipu3: Enable to handle a number of concurrent requests 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" PipelineHandler originally discards a request with ENOBUFS or ENOMEM when a buffer is not available. The request will be successful if enough buffers are available. This patch series enables to process requests even if no buffer is available then by storing the requests and retry queuing later. Change in v4: - Squash 1/3 and 3/3 - Use FrameBuffer::cancel() introduced by Kieran's patch series - Address comments by Laurent Change in v3: - Cancel pending buffers correctly upon PipelineHandlerIPU3::stop() Change in v2: - Move a queue of pending requests to IPU3CameraData - Pass queuePendingRequests() as signal to CIO2Device and IPU3Frame and invoke it from them. Hirokazu Honda (2): pipeline: ipu3: Store requests in the case a buffer shortage libcamera: ipu3: Try queuing pending requests if a buffer is available src/libcamera/pipeline/ipu3/cio2.cpp | 4 +- src/libcamera/pipeline/ipu3/cio2.h | 2 + src/libcamera/pipeline/ipu3/frames.cpp | 6 +- src/libcamera/pipeline/ipu3/frames.h | 4 ++ src/libcamera/pipeline/ipu3/ipu3.cpp | 77 +++++++++++++++++++------- 5 files changed, 70 insertions(+), 23 deletions(-) --- 2.31.1.368.gbe11c130af-goog