From patchwork Mon Sep 29 07:47:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 24486 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 CC867C328C for ; Mon, 29 Sep 2025 07:47:13 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5775E6B5F3; Mon, 29 Sep 2025 09:47:12 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="OwtRCzMF"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 68FFE6B58E for ; Mon, 29 Sep 2025 09:47:10 +0200 (CEST) Received: from pb-laptop.local (185.221.142.146.nat.pool.zt.hu [185.221.142.146]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E19321121 for ; Mon, 29 Sep 2025 09:45:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1759131943; bh=GMXVxgwzI6+tW4qRSFg6gpXBM7GmOv3+Ohujb3BRSbs=; h=From:To:Subject:Date:From; b=OwtRCzMFY+q7tHT1MFE6hy+tlCvgFytGVGvWQgAmsTD0im3eyW3EwlnqwtwKUXbKs jAHxDmT0IlrN7q5IcIItZLI/nLrMmWlBFm87HzU0uTpOMl/xANamAa4wDcKnfNBGKE hqCXkP8VBmwQpzMDVjoWIIB6TTLB1fB5Hb7XrNW4= From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= To: libcamera-devel@lists.libcamera.org Subject: [RFC PATCH v1] libcamera: software_isp: Clear pending async work Date: Mon, 29 Sep 2025 09:47:06 +0200 Message-ID: <20250929074706.420894-1-barnabas.pocze@ideasonboard.com> X-Mailer: git-send-email 2.51.0 MIME-Version: 1.0 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" Debayering is carried out on `ispWorkerThread_`. When stopping, the queued work needs to be flushed or cancelled to ensure that the next time it starts, it won't process stale data. So remove all messages targeting the `Debayer` object on the worker thread. Signed-off-by: Barnabás Pőcze --- src/libcamera/software_isp/software_isp.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/libcamera/software_isp/software_isp.cpp b/src/libcamera/software_isp/software_isp.cpp index b7651b7d2..fdadf79e1 100644 --- a/src/libcamera/software_isp/software_isp.cpp +++ b/src/libcamera/software_isp/software_isp.cpp @@ -358,6 +358,7 @@ void SoftwareIsp::stop() { ispWorkerThread_.exit(); ispWorkerThread_.wait(); + ispWorkerThread_.removeMessages(debayer_.get()); Thread::current()->dispatchMessages(Message::Type::InvokeMessage, this);