Message ID | 20250611013245.133785-13-bryan.odonoghue@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 AE7EEC3328 for <parsemail@patchwork.libcamera.org>; Wed, 11 Jun 2025 01:33:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2276568DD1; Wed, 11 Jun 2025 03:33:39 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="Yaii2vC0"; dkim-atps=neutral Received: from mail-wm1-x330.google.com (mail-wm1-x330.google.com [IPv6:2a00:1450:4864:20::330]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id D991E68DD7 for <libcamera-devel@lists.libcamera.org>; Wed, 11 Jun 2025 03:33:35 +0200 (CEST) Received: by mail-wm1-x330.google.com with SMTP id 5b1f17b1804b1-4508287895dso2307325e9.1 for <libcamera-devel@lists.libcamera.org>; Tue, 10 Jun 2025 18:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1749605615; x=1750210415; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wJmpJgXrFEG5KEN1zSnXvlqRixc3EGKyYYkVA8Fbs4k=; b=Yaii2vC0X+c9Nj1ZS3kyd2tljheXQL+05HgXcw9hirnFOvC2YjRIsfOzGU6fiLYAVW HRffkgNEbZklt1ZKTEQ3EEufNn72uOZdV+Ou+rum/03TsYElNuO/z7HA4JvjvG8rxF/y U78i7mVQPK7Fow9NbC97k2eIydD0GjKSNEkA5m4e+PZ2KG1xNPLm3rLw3agtayAL3Mo4 bBbxdIeIEk1D9vABn2SHBqdoA8GYgGehoc5Lr4Wi5XbZCctX61BvWKeTkxy3+iPE1WpI fj02dCSI1PHd6gcxW+3QI7SuWJrR2t1c0ccrP+G0bD+W+nMWrfj4bdn+tXq2yFkekVIo hpXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749605615; x=1750210415; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wJmpJgXrFEG5KEN1zSnXvlqRixc3EGKyYYkVA8Fbs4k=; b=mlZeO3ECSBI6O/KVKl9myZrWjI82xM6VuWflHn1ucuGc+pKZhoNt+mgM13iFKLztkg 60j6c1oFm/VrS0KBfFMgMdmxp7OdL6PX/Itg+Ut63sCwa5HFK1wdzt5Bv+LLqEoO34+b jKbUFj3sioSIv7HixqNryfaZfG7fSvegZor6cnjl84Ymt54W9wANIyxH2wOIEn4ZVumK HWZTIAsFALrmmhukddoYbh8TKFnuW21lljpM571cbwuiCRsFtoTGnR56qie9zlbtzEHF wvFkg4C0k13r9flA0fTYrPe0A/O/SyxkdplQrkPMDtdSu1uYAeUivjRdtkujxxjQTpwP QE1g== X-Gm-Message-State: AOJu0YzIh5YaoD3JeqHn/Zd2qLe32JWxjU2/nBjj5DPj6en2rG6foJ6p vt+qZ6WkyrlXDVArV8pxqv8psJr76yvVOSa49OhzqfUHhhF76n/dVyhybH1O950IAcu6yj5lUio Z3SHa7R0= X-Gm-Gg: ASbGnctB9ZdAtXCV+QHMf0vd/aKcbw+DVqChAzGcQa4saSrDalXYwZAQtFXNrv2n83s Gxxin+JJxryBtVSTk2/0aHu6Hlrnh0UXWbAuZSu0Zlg6WOGQsWbX8JlqOrDiU9ADJk76ceRgC3I L64vUQPO9RnkahkFwZD+4IsJmyf4r8Uc5ICCKJS21HTiO5fRDQNXYsOlGmno1IuvjUCuH8utQHf r8dQ6bZA4ABL5o8eBZ82MHTcOKaredQWEOLpWod5wAmb3rqo2OD04fnc+5cbeWoYED8wYiRODjA dqNosGMtseuudh3jTXLULMEaFjWR2rxmarXBtPv1tXUPuf5JirzDYLvgrO4ErUrwrCMh+QCHx7p y4BZbHSrdjzmeZhhxvTO3omEQs7pW/+3btKgX/DP00w== X-Google-Smtp-Source: AGHT+IFX33Ge+A79gy1L3x3sARL5/59K/DSecbNM4W/0WwlBDjTHvkWhoHdPaZHXe9qQWTrCSyknUg== X-Received: by 2002:a05:600c:1d0a:b0:44a:b468:87b1 with SMTP id 5b1f17b1804b1-453240bf6d3mr12061455e9.4.1749605615215; Tue, 10 Jun 2025 18:33:35 -0700 (PDT) Received: from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4532514138asm5680625e9.3.2025.06.10.18.33.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Jun 2025 18:33:34 -0700 (PDT) From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> To: libcamera-devel@lists.libcamera.org Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Subject: [PATCH 12/35] libcamera: software_isp: Start the ISP thread in configure Date: Wed, 11 Jun 2025 02:32:22 +0100 Message-ID: <20250611013245.133785-13-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250611013245.133785-1-bryan.odonoghue@linaro.org> References: <20250611013245.133785-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 28e2a360..7bee8f06 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -159,8 +159,6 @@ SoftwareIsp::SoftwareIsp(PipelineHandler *pipe, const CameraSensor *sensor, metadataReady.emit(frame, metadata); }); ipa_->setSensorControls.connect(this, &SoftwareIsp::setSensorCtrls); - - debayer_->moveToThread(&ispWorkerThread_); } SoftwareIsp::~SoftwareIsp() @@ -262,6 +260,9 @@ int SoftwareIsp::configure(const StreamConfiguration &inputCfg, if (ret < 0) return ret; + debayer_->moveToThread(&ispWorkerThread_); + ispWorkerThread_.start(); + return debayer_->configure(inputCfg, outputCfgs, ccmEnabled_); } @@ -343,7 +344,6 @@ int SoftwareIsp::start() if (ret) return ret; - ispWorkerThread_.start(); return 0; }
OpenGL is not thread-safe and in fact associates invisible handles with the threadid of the calling context. As a result we need to make configure() and process() in SoftISP execute on the same thread. Move start thread into configure() as a first step towards this. Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- src/libcamera/software_isp/software_isp.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)