Message ID | 20250824-b4-v0-5-2-gpuisp-v2-a-v2-13-96f4576c814e@linaro.org |
---|---|
State | New |
Headers | show
Return-Path: <libcamera-devel-bounces@lists.libcamera.org> 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 809FFBEFBE for <parsemail@patchwork.libcamera.org>; Sun, 24 Aug 2025 00:49:06 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id A98F66931F; Sun, 24 Aug 2025 02:49:05 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="SuaQoFiV"; dkim-atps=neutral Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id ECB0C69303 for <libcamera-devel@lists.libcamera.org>; Sun, 24 Aug 2025 02:48:48 +0200 (CEST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-45b4e5c3d0fso6424895e9.2 for <libcamera-devel@lists.libcamera.org>; Sat, 23 Aug 2025 17:48:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1755996528; x=1756601328; darn=lists.libcamera.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=NNAYhv4oH51PNDeH7ZZtRdYMZk/R8PHqFK1u1jXAV/E=; b=SuaQoFiV6Bff9Yg0WVz2o0+E3k/ItEMhhYiH4s4j3zaxJBSt5uWHB90BNpYTroVFIP dgwuNEbim63tKPc2xFSBkC6UD45Ms1Ml8l4NT9rhYy1MYx+Cqk3KnaXX+6zcP9Y8iz4f AqZMPpSSh3XTFsIlaAV7ETvYZDiEoiScS/3ATz+yZTSBmflD2YD7savgXTh5KukBcuIH 2Fr/0jG83deuoNGMvRJ8Q2+YaNd1ZUHzkkAidGA7irBfgy6Fx8a1om5mZa3IOWeZPcAP Id3OJOChDeXOKjPXYO6OTyKRlc8CIphRtpouRE5y1RKRDWgD0i3gziQlAQf4QyAPs5PA KaSA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755996528; x=1756601328; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NNAYhv4oH51PNDeH7ZZtRdYMZk/R8PHqFK1u1jXAV/E=; b=n5DaATQKBv89117ww9FtSVX+txJyg/m5XA8u7JPXxITo7jQajY3G/n885h4M1gnn/n DSLERrQmwSSExVM6iDDa4vpcObXSqS2m29TE6WWcQfGz/dH+q9DoStDfgHmAqadzIomG Sc2EgIwZ16qF7EIEOpCpurxPVbPwHVMAhSKhTJxez9QV5BGREEGj8yagnehmsDDNf84u vIV5XiubEbuLmsNk7vaiqZNE6cZI2tsRG5ClUEKTrR50djGN14bVUBKPi2TFBYTpista kfnK+qBVsPPVOdOBiLX5W3UG50Mld5WXnYqxBRd42ytnosDbwLo0g7SqRckuQ5Tkpj+s 89xA== X-Gm-Message-State: AOJu0Yw+10VoulwCjUfO/kweCSg3C3RjeA6izvbEVg4+VxmQULpGk1ER 7JujaGxuT9xFaygDPt+cuqTnpypO2258+YUnXUZhY2mCRPXLdSYiUiXCrfEIBJti8DjpiHcHLHA NNDOFE1Y= X-Gm-Gg: ASbGncu+SbK7ynZIIKiO0jx5VKsvqnzyFD6mx/GGjlKMk6ype05kCGOki5xZHIfDss0 vk3PKjRhlKyiTXEru9wIpesNuecMveUnmbjYIPTXDKnhwL1b/zip/Yr3vzuYdAS8weIHl1ywHnI gVtmdqdiRrBRzYN+OyT+MfJCmJw+Gky36WJ9XUT4tsmtZ9niNBZ0ANXZ1gXhoFAe+SZd6/9b4Gw ++zVvC58tVg8MNt+I/EiSIU/fDCv8+/XHTT9u4uId4jFfIh7WoGqJSem3mHkUqiWhA8iQPl+3gO +mo4P3kjFDFyy7UCSadw5yAGDEJ9RRb/5zoWy0zDSGG7u3W6NlEfKXj93KBzagt3AGagd7+mjyt PmyrV0mS/pJwO2L6i/9a7rhq04rD7wdddAJJPGHerIXo+lTC8JwTulhN2+v5AmTbPWRfLD3hcLx e0sr6MHXJYwrkB2mYa9OPp X-Google-Smtp-Source: AGHT+IFjIuWbknYbasQ29IzTrPAqkZVaNHzqQeWABKv0YRK0TFFNkFNCVGj00wEAtL52zZdUV3pp3g== X-Received: by 2002:a05:600c:4f41:b0:456:fc1:c26d with SMTP id 5b1f17b1804b1-45b5179557fmr55642855e9.2.1755996528080; Sat, 23 Aug 2025 17:48:48 -0700 (PDT) Received: from [192.168.0.13] (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45b4e1d530esm69347225e9.0.2025.08.23.17.48.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Aug 2025 17:48:47 -0700 (PDT) From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Date: Sun, 24 Aug 2025 01:48:25 +0100 Subject: [PATCH v2 13/37] libcamera: software_isp: Move configure to worker thread MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250824-b4-v0-5-2-gpuisp-v2-a-v2-13-96f4576c814e@linaro.org> References: <20250824-b4-v0-5-2-gpuisp-v2-a-v2-0-96f4576c814e@linaro.org> In-Reply-To: <20250824-b4-v0-5-2-gpuisp-v2-a-v2-0-96f4576c814e@linaro.org> To: libcamera-devel@lists.libcamera.org Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org> X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1537; i=bryan.odonoghue@linaro.org; h=from:subject:message-id; bh=yPLs+JaO0rbCfUdrjCCe0Lkj75znaoEZ8v5pMMr2iR8=; b=owEBbQKS/ZANAwAKASJxO7Ohjcg6AcsmYgBoqmFerCDGsqA5S7Kb0vS0+ft1dCgjgeklcoh9c hn6qZPJJy2JAjMEAAEKAB0WIQTmk/sqq6Nt4Rerb7QicTuzoY3IOgUCaKphXgAKCRAicTuzoY3I Ou+kD/0QsUbkYKyUSByqrpuGdAG8+EdXT81CJeVR/DzhOrSSCgvX3jZnyEelnAOznM1CcahsUkB 6WcdaYQioudpi8DtwUHqzsVm15Y6pmAHff0UE5ZN8sjmKPvWJwnY5du48DN2veWIA11GjRir0RR 0IDLUjcLZG8IfF9vZ8CAGuyt7kFtveaY05LxUM8IEkMhwqq9BoFRqBdg3y58d8ibXn+uT99SHFq eZDab/pK4eQMyRNCQVokXiAcITGHemcDDT5nK7A6WQ1JEXCrCY9BEKrVE9eo5kNy01Nw39lfWKg BrDAF84h6KEcFjJy5SqaEjje9WMiId1fQa9udibgM6SeugaD4Cz2hNybSlLMXRiEtq0odzs2l5N DIoyP1/F7NJ32W7OJ7NzDHibWJxRzVz/FPyyTF34ZgzqRRlPr0z4FMYfDyHV12nsKWFnkVQKrF7 j4oQtGU9Kk/E4+ptrQG7S5JIY6oP5NT2W31DRgKgwXw6rAyklMhjLdlvQgiof9mFHQLPgpZNhM0 JKLGbc1NLm8aiNxPD7WPTXxP2NwLDYGqYuoOmTZB1W7P0IXs45oAEjkqo0eMboXjQo1WgX5bzPf A9aykbQebkiER1iwm5GW6azXjToDly+VUtUtS5rF7f+2/i35dFaFnrovna0hzgpkvkO6cMLOVfX yF4mHJ3VyBCmjEg== X-Developer-Key: i=bryan.odonoghue@linaro.org; a=openpgp; fpr=E693FB2AABA36DE117AB6FB422713BB3A18DC83A X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: <libcamera-devel.lists.libcamera.org> List-Unsubscribe: <https://lists.libcamera.org/options/libcamera-devel>, <mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe> List-Archive: <https://lists.libcamera.org/pipermail/libcamera-devel/> List-Post: <mailto:libcamera-devel@lists.libcamera.org> List-Help: <mailto:libcamera-devel-request@lists.libcamera.org?subject=help> List-Subscribe: <https://lists.libcamera.org/listinfo/libcamera-devel>, <mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe> Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" <libcamera-devel-bounces@lists.libcamera.org> |
Series |
|
Related |
show
|
diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp index 7bee8f0681dd5cedcd81950ed49f611b514e763d..e8fa8a17a11c63ebab1338a90df204f4a888c4d6 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -263,7 +263,15 @@ int SoftwareIsp::configure(const StreamConfiguration &inputCfg, debayer_->moveToThread(&ispWorkerThread_); ispWorkerThread_.start(); - return debayer_->configure(inputCfg, outputCfgs, ccmEnabled_); + ret = debayer_->invokeMethod(&Debayer::configure, + ConnectionTypeBlocking, inputCfg, + outputCfgs, ccmEnabled_); + if (ret) { + ispWorkerThread_.exit(); + ispWorkerThread_.wait(); + } + + return ret; } /** @@ -386,7 +394,7 @@ void SoftwareIsp::stop() void SoftwareIsp::process(uint32_t frame, FrameBuffer *input, FrameBuffer *output) { ipa_->computeParams(frame); - debayer_->invokeMethod(&DebayerCpu::process, + debayer_->invokeMethod(&Debayer::process, ConnectionTypeQueued, frame, input, output, debayerParams_); }
EGL requires both configure() and process() to operate on the same thread. As preparation for that, move current CPU configure into the WorkerThread with a ConnectionTypeBlocking invocation of &DebayerCpu::configure. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- src/libcamera/software_isp/software_isp.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)