From patchwork Thu Apr 8 08:50:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 11866 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 DDE23BD16B for ; Thu, 8 Apr 2021 08:51:11 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 1B979687F6; Thu, 8 Apr 2021 10:51:11 +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="PqHIOqGB"; dkim-atps=neutral Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 90EC6687F2 for ; Thu, 8 Apr 2021 10:51:09 +0200 (CEST) Received: by mail-pl1-x62c.google.com with SMTP id 7so669635plb.7 for ; Thu, 08 Apr 2021 01:51:09 -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=RHeP2LkIQgzgj2VYxOZJ7Im+JOFYIDBQQ9lFBHma6WA=; b=PqHIOqGB/SkoDaAdXL+3nDUVOvvKcMQTfe0Yj6I2B6K6ETGPwnFB0C68EUXrxlW/ah XWRMMehLLBtzR5f+G4Kn8Nocixr3Xmd2aK1kSG44g/yPFATMI0V2urE9Gl9p18OUHCfk e6khwmYgKeTrGzhEp86LHlgb1FSl4tyL3pakE= 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=RHeP2LkIQgzgj2VYxOZJ7Im+JOFYIDBQQ9lFBHma6WA=; b=jajlBvEUBtJiMT35AgZjBCVuqkkYI7TJQx1vIyPUsHiO6FRU5dTU463duNqeA6O00T zqDTtrD34Gb3vQiW26s0YcP03BkqJki8xVG8yKcWAy5c67Yj6pTAloTFhBd9WHuEaWv3 iAPbl8RYD3GrD07pLMANSRsP7LsImIV/ORLFYB29PoEoawa7kqlMgFGZ4QAO319D+cM/ LdLwysJqTY8K4aUCR330Uh8mRSaR4GOCLdSszuRvvapFxaaAu7E/3TvG5fHr4tFb6i8z c2ncS+RDS9z8FqgYS00RW8iNSgTD2Wbu+dLU430QcvTUBe0GgYTNU7tGOiK1hAbERZcj rwqg== X-Gm-Message-State: AOAM533rF/ESsHBLMXLY9OoQN3k1+Ufe/eQ0tQwa0yrGL8oLI4DSoU8L bb9sFQYRI44A1+qURNmGWqXSIe0EfmoOlA== X-Google-Smtp-Source: ABdhPJyDJvWwqx71mt+S56Rt7nSESZE1Hh3jva0HllwEzGRP46zz2qCvtV3YzM5LODDCwBUbaCxo+w== X-Received: by 2002:a17:902:e784:b029:e9:997a:6a27 with SMTP id cp4-20020a170902e784b02900e9997a6a27mr1008655plb.9.1617871867504; Thu, 08 Apr 2021 01:51:07 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:8822:ec6c:14d8:eea9]) by smtp.gmail.com with ESMTPSA id g80sm1755993pfb.181.2021.04.08.01.51.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Apr 2021 01:51:06 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Thu, 8 Apr 2021 17:50:58 +0900 Message-Id: <20210408085101.1691729-1-hiroh@chromium.org> X-Mailer: git-send-email 2.31.0.208.g409f899ff0-goog MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH v3 0/3] 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 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 (3): pipeline: ipu3: Store requests in the case a buffer shortage libcamera: ipu3: Try queuing pending requests if a buffer is available libcamera: ipu3: Cancel pending requests correctly include/libcamera/buffer.h | 3 + src/libcamera/pipeline/ipu3/cio2.cpp | 4 +- src/libcamera/pipeline/ipu3/cio2.h | 3 + src/libcamera/pipeline/ipu3/frames.cpp | 6 +- src/libcamera/pipeline/ipu3/frames.h | 5 ++ src/libcamera/pipeline/ipu3/ipu3.cpp | 77 +++++++++++++++++++------- 6 files changed, 75 insertions(+), 23 deletions(-) --- 2.31.0.208.g409f899ff0-goog