From patchwork Wed Oct 9 17:21:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Milan Zamazal X-Patchwork-Id: 21563 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 9EDEEC32DE for ; Wed, 9 Oct 2024 17:21:23 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4E19C618C5; Wed, 9 Oct 2024 19:21:22 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="E+HSE/M1"; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8A57D618C5 for ; Wed, 9 Oct 2024 19:21:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728494479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hRskMf0bDLMg+pNOG9sYWDVRlKW8DhLfS5A2S8MGYUQ=; b=E+HSE/M1lCx4nqGNay6Pg9ib1IclGzrqOqt3P29SJqIAYgV5OAUUQQbZBWv5MjPZkZZpce 0pRjeujA/s4UrARrFtqKxVCab3kMrW46cF3B9cJq9MkSrSQMASymbii9va/9HbYb3RnHfr n2L1/FyPhKq6gJBm6aaIIxi7QQpJWiI= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-448-Fr6FmvOmMHuO6LmzU8p5jQ-1; Wed, 09 Oct 2024 13:21:16 -0400 X-MC-Unique: Fr6FmvOmMHuO6LmzU8p5jQ-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3C24B1955EA8; Wed, 9 Oct 2024 17:21:13 +0000 (UTC) Received: from nuthatch.redhat.com (unknown [10.45.224.78]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4D5AE1956086; Wed, 9 Oct 2024 17:21:11 +0000 (UTC) From: Milan Zamazal To: libcamera-devel@lists.libcamera.org Cc: Milan Zamazal , robert.mader@posteo.de, kieran.bingham@ideasonboard.com, laurent.pinchart@ideasonboard.com Subject: [PATCH v3 0/2] Clean up pending requests on stop in software ISP Date: Wed, 9 Oct 2024 19:21:06 +0200 Message-ID: <20241009172108.2058320-1-mzamazal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com 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" Fix for the bug #234 where software ISP may not clean up some pending buffers in stopDevice. Changes in v3: - Split to two patches according to different code areas affected. - Added a check for the request status to prevent canceling a request multiple times. - Calling conversionBuffers_.clear() after the cleanup, to be safer. Changes in v2: - The request is additionally canceled. - New helper method PipelineHandler::cancelRequest() introduced. Milan Zamazal (2): libcamera: pipeline_handler: Provide cancelRequest libcamera: software_isp: Clean up pending requests on stop include/libcamera/internal/pipeline_handler.h | 1 + src/libcamera/pipeline/simple/simple.cpp | 15 ++++++++++++ src/libcamera/pipeline_handler.cpp | 23 +++++++++++++------ 3 files changed, 32 insertions(+), 7 deletions(-)