Message ID | 20250422215920.4297-11-bryan.odonoghue@linaro.org |
---|---|
State | RFC |
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 78275C3320 for <parsemail@patchwork.libcamera.org>; Tue, 22 Apr 2025 21:59:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2187268B39; Tue, 22 Apr 2025 23:59:41 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="mPvkJEjG"; 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 1526168B25 for <libcamera-devel@lists.libcamera.org>; Tue, 22 Apr 2025 23:59:33 +0200 (CEST) Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-43cfa7e7f54so2378965e9.1 for <libcamera-devel@lists.libcamera.org>; Tue, 22 Apr 2025 14:59:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1745359172; x=1745963972; 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=mPvkJEjGOKGn0UcVsN9/UcxBEa+22ZED2/h5Cgio7sFL3lKCBuDdRqgwwxRzYXg6oE qos6IBBQ++kfOgtGIETRVTHKftZI5641ychmnrxEO06goxaGOCz/4QDz7EP1k3delqF5 +LcbCrr3zENfRR/zl9YYEMFk858n73cEGVmDkLhKTPeMq7eAQFGzisjNX23MW+krrcYX //0Y1oc7PwSsHOp/pyHAsLbODcGNZMZKawJij5VyboRGG8ZqjgdEd8JMcjgH32ZL9iR0 ffa6kj38cqHu/9w692cfaPsltekXatAHmYSJoTlFIpnPs1xvh6S8E0VUwWNvXKG83KG1 V7ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745359172; x=1745963972; 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=PP5JKOnxiD3U1IYUKAnWSnAeCQluJnaRb1mAmn0ZcNYWuxkKALDsKuxzRVDV7eEkaX HDkMaDNPMIdAiTfs8O7p9eell7mNq4WhJYvzLUs07BoZKGiagqvWp2W7OnvHkICXw67i jV05vmu4xQtWAQYPXdbIGWHSFxtJo96AhrqntfvI7w2oHi2edvQrO7YmjPlDVg1HEaXM 0df4o//T0va5iYjIL6IXhQFnKtJiZYHp1J3ETNO6wkfTze77j0KIE0PGKhJowbnPEuGU o5TDTI4bLlb2aUtbuyguJ4Z9JLXQM7DzMxlUh2VKIiYwJoIgyVCOjZh/0omPr92u3DZS 7miw== X-Gm-Message-State: AOJu0Yx9DWDqnTDyYW5Or7EjO1o3rLXbTJMqHRWx4q0Jis3KdKmZXcdl JXqVibQR/1zEppBZ1nrbycq53T6p5OnHcFwnXwdkxVp6li1uF7nNGO5tdA4uRx02RO89tiyhxKq d558= X-Gm-Gg: ASbGncsN+7mEE0lbQyH6edvsopYWBP7CmlleLVTSC3cRUb/4irge2XuvLA0wnAEXF38 dhBrMgfgICZy212I98AVkGYs+0TJjiqCoSTFLQBs1M+3Z9KlW5x2tYyYeplLMwizurdBAYuVODy oVbXh/R7GR0RbdFnEEmG+0Ahp36nyUMc4/T4eG98UeDWTvxAGj+27ujBylDMlYmDXyPkTnZjP37 RWVVQy0wkx02fEaj8nBQATNFJv+2w65YsM/wwcuorY0AEhT3+ITMgdke0w8WoTkxpAX650NI/ip OFhelDIN0MRr0JTT48UgJDSv9K+r2oiyAqqu5HJoUngkv8vdtwn1cRnilPUxKKLcg5KeXzi95KZ Vfo3366u+MGnPFjNFBlnh X-Google-Smtp-Source: AGHT+IFubzulSIaleFtvZ/1sAxA9nhmqbt6gLnDqmrgkbiAZNHA75lMTureXquHN6a0/h2IC8/wejg== X-Received: by 2002:a05:600c:698e:b0:440:6a68:826a with SMTP id 5b1f17b1804b1-44091f6f402mr5184395e9.13.1745359172422; Tue, 22 Apr 2025 14:59:32 -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-44092d2eccesm2726615e9.20.2025.04.22.14.59.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Apr 2025 14:59:31 -0700 (PDT) From: Bryan O'Donoghue <bryan.odonoghue@linaro.org> To: libcamera-devel@lists.libcamera.org Cc: hdegoede@redhat.com, mzamazal@redhat.com, bryan.odonoghue@linaro.org, bod.linux@nxsw.ie Subject: [PATCH 10/27] libcamera: software_isp: Start the ISP thread in configure Date: Tue, 22 Apr 2025 22:59:03 +0100 Message-ID: <20250422215920.4297-11-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250422215920.4297-1-bryan.odonoghue@linaro.org> References: <20250422215920.4297-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(-)