{"id":25301,"url":"https://patchwork.libcamera.org/api/1.1/patches/25301/?format=json","web_url":"https://patchwork.libcamera.org/patch/25301/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20251202133157.661407-16-bryan.odonoghue@linaro.org>","date":"2025-12-02T13:31:46","name":"[v3,15/22] libcamera: software_isp: Start the ISP thread in configure","commit_ref":null,"pull_url":null,"state":"superseded","archived":false,"hash":"f15eebb7c60746935ec55f953c786798ff77e881","submitter":{"id":175,"url":"https://patchwork.libcamera.org/api/1.1/people/175/?format=json","name":"Bryan O'Donoghue","email":"bryan.odonoghue@linaro.org"},"delegate":null,"mbox":"https://patchwork.libcamera.org/patch/25301/mbox/","series":[{"id":5630,"url":"https://patchwork.libcamera.org/api/1.1/series/5630/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=5630","date":"2025-12-02T13:31:31","name":"GPUISP precursor series","version":3,"mbox":"https://patchwork.libcamera.org/series/5630/mbox/"}],"comments":"https://patchwork.libcamera.org/api/patches/25301/comments/","check":"pending","checks":"https://patchwork.libcamera.org/api/patches/25301/checks/","tags":{},"headers":{"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\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id EFDEEC32F2\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  2 Dec 2025 13:32:30 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 2511160D13;\n\tTue,  2 Dec 2025 14:32:30 +0100 (CET)","from mail-wm1-x333.google.com (mail-wm1-x333.google.com\n\t[IPv6:2a00:1450:4864:20::333])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id EAD3F60D17\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  2 Dec 2025 14:32:18 +0100 (CET)","by mail-wm1-x333.google.com with SMTP id\n\t5b1f17b1804b1-4779cc419b2so56870815e9.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 02 Dec 2025 05:32:18 -0800 (PST)","from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie.\n\t[188.141.3.146]) by smtp.gmail.com with ESMTPSA id\n\tffacd0b85a97d-42e1c5c30c4sm33363322f8f.9.2025.12.02.05.32.17\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tTue, 02 Dec 2025 05:32:17 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=linaro.org header.i=@linaro.org\n\theader.b=\"a0malalK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=linaro.org; s=google; t=1764682338; x=1765287138;\n\tdarn=lists.libcamera.org; \n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:from:to:cc:subject:date\n\t:message-id:reply-to;\n\tbh=lfymFnUumpfpGi9F2+IbOl+GrSQcUmyE43/IcLR2ZZQ=;\n\tb=a0malalK5Zn03YF/lBGb/mHhPlN3ohKxRHBhkhQJ1Q/xnCGs/YPc4tVbjwiKR/Q0qT\n\tGuFIl8qnDTz80EmMuPDXCVQhx5Sj0x9XwrjY8TGO8ydWKku5Dtl4WvNgwpVFe6pQbOCX\n\tfJycNAJ4JmcWgRBJoKoxwYX+cLGXxaiSXng40IqKsf6cCogEnH5gaOIC4ljqy7EyftZn\n\tB7tB0PkiK1zrYlgSAQ9URA7hpC2CYjwGcGCldFL7lR7/vxanHeyKLqhyxVZK+TqrX4md\n\t4osM00lylDyNCAAAMFSZFCoUIiUl7jrj6m+TOaB+bzy2glNzq6s5RyeHMaGRyrba96Yi\n\tpFdA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1764682338; x=1765287138;\n\th=content-transfer-encoding:mime-version:references:in-reply-to\n\t:message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n\t:to:cc:subject:date:message-id:reply-to;\n\tbh=lfymFnUumpfpGi9F2+IbOl+GrSQcUmyE43/IcLR2ZZQ=;\n\tb=bQ9ItdlsEJDB6wJJgLvk3SOJP3rgObKetVtk6VKFagTH8PhuRgJHY9gcL7vjAD0ugk\n\tIXHuzJ04WM+M/OaT9t3QYtDMbhn6fnhqj2BtSi7zh+JTpW7ku8Zdw7QxI6TDMwEl4E+k\n\t1uch7ym60NgsP69ITxtJJHGERN6Gs35/jDhO/HLAcNYsFx8/183Y3JneILsRAxU7PQC9\n\tG+7zjhdYERefJhZF6CzedcyTstDgN1oaXCDjsV54YmbzfHsqfIM91OmlqpcaF0FuW6yP\n\tiBJOxQin3kbUcfpvkorKCreFhrhk2Y//xE+uQ+v6WXBaR50eYzhctP7o8aEHzVN111sL\n\t9ryQ==","X-Gm-Message-State":"AOJu0YwhyHraLgOMDws9QnTTYKHFUwrwfsX/aTPhceOYg8yul8yNw8Ga\n\tF4PmV+nqJFfIe+zXy4HLL6KriRfjhEm12087kEvc4tnHJmgzeHALgBnqSojoBI3zPB1BFHQUyV1\n\twL+fW","X-Gm-Gg":"ASbGncsc9zVp3bxF68Rnw/gkeBu0vzzg/ebtxnbE1QndsGhqPXd+vXzpD97Ov52K/6N\n\tVUIauDqufPrxQtw1igKqYP094VCQ5+1myOjJz+f1sS8ZLCO49Xq4/rAdl1/NWCP9ZcJo+s6Z0jZ\n\tgbNyV6wcL3BVXS/DotHnYJx4ph3998ciHmVsZneNa9+X0zS52LfAtd2De3AwTn5Nk8sCpZf0n7i\n\ta71xE31OVhKlm5uPPwqUMbZu54wkxs0u4++rknxpRWJBmtzYXGFue25mtaUeqrN5/7Ouf0eK5Ln\n\t6bsVMwsk8fj1/icC7Xf6eydk0Isp3cXUP7b63bihFdGY/8HMy4KPWxeFBUVYneegc7FOXy74Nuu\n\t9iM+AaLOXxbdOH+Q1zBe73yL08qRwv1Tvm7vn3DZj2Husm2PXgXVyfbD44EAORhCDACYVcY8roB\n\tuu//it5rfaE2breR+lgllGut5Tm2lkgvkUkyLbH1Fbl2UB85qLF9AYdnkZSOPLCz/W1eo=","X-Google-Smtp-Source":"AGHT+IH+u5UkfLTD9xyGDNV4Vr/D2Np+eYCZBJLLkM0HPhUDxAbZVf4EkSZbJyFJjDy1CCVKbMTbVQ==","X-Received":"by 2002:a05:600c:5252:b0:477:582e:7a81 with SMTP id\n\t5b1f17b1804b1-477c110328amr424495355e9.4.1764682338008; \n\tTue, 02 Dec 2025 05:32:18 -0800 (PST)","From":"Bryan O'Donoghue <bryan.odonoghue@linaro.org>","To":"libcamera-devel@lists.libcamera.org","Cc":"pavel@ucw.cz, Bryan O'Donoghue <bryan.odonoghue@linaro.org>,\n\tRobert Mader <robert.mader@collabora.com>,\n\tKieran Bingham <kieran.bingham@ideasonboard.com>","Subject":"[PATCH v3 15/22] libcamera: software_isp: Start the ISP thread in\n\tconfigure","Date":"Tue,  2 Dec 2025 13:31:46 +0000","Message-ID":"<20251202133157.661407-16-bryan.odonoghue@linaro.org>","X-Mailer":"git-send-email 2.52.0","In-Reply-To":"<20251202133157.661407-1-bryan.odonoghue@linaro.org>","References":"<20251202133157.661407-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>,\n\t<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>,\n\t<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>"},"content":"EGL is not thread-safe and in fact associates invisible handles with the\nthreadid of the calling context.\n\nAs a result we need to make Deabyer::configure() and Debayer::process() in SoftISP execute on\nthe same thread.\n\nWhen we call Debayer::configure() in the egl class this will setup and egl context\nfor us which is associated with the calling thread context. Hence when\nDebayer::process(); runs it must run in the same thread as\nDebayer::configure() or the hidden Gegl context handles will not point\nto the same place.\n\nMove start thread into configure() as a first step towards this.\n\nCo-developed-by: Robert Mader <robert.mader@collabora.com>\nSigned-off-by: Robert Mader <robert.mader@collabora.com>\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>\n---\n src/libcamera/software_isp/software_isp.cpp | 3 ++-\n 1 file changed, 2 insertions(+), 1 deletion(-)","diff":"diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp\nindex 928a2520c..afa4eb7a8 100644\n--- a/src/libcamera/software_isp/software_isp.cpp\n+++ b/src/libcamera/software_isp/software_isp.cpp\n@@ -265,6 +265,8 @@ int SoftwareIsp::configure(const StreamConfiguration &inputCfg,\n \tif (ret < 0)\n \t\treturn ret;\n \n+\tispWorkerThread_.start();\n+\n \treturn debayer_->configure(inputCfg, outputCfgs, ccmEnabled_);\n }\n \n@@ -346,7 +348,6 @@ int SoftwareIsp::start()\n \tif (ret)\n \t\treturn ret;\n \n-\tispWorkerThread_.start();\n \treturn 0;\n }\n \n","prefixes":["v3","15/22"]}