From patchwork Fri Jan 8 18:01:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 10844 X-Patchwork-Delegate: umang.jain@ideasonboard.com 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 BD56CC3256 for ; Fri, 8 Jan 2021 18:01:20 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 533B768062; Fri, 8 Jan 2021 19:01:20 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=uajain.com header.i=@uajain.com header.b="wdk0FvfL"; dkim-atps=neutral Received: from mail.uajain.com (static.126.159.217.95.clients.your-server.de [95.217.159.126]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4FEFF68056 for ; Fri, 8 Jan 2021 19:01:19 +0100 (CET) From: Umang Jain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=uajain.com; s=mail; t=1610128878; bh=zQOMLf7+S07cr1K+1u105qml4bqM7cz61/F40/jxZ1o=; h=From:To:Cc:Subject; b=wdk0FvfL4+JqsQcX395fKwHF7NSV2M5ciPkEFbJpeaf3FfaQjCoN/DfcGPjVAq5j4 gp6/VpGh0CewMRoh+uxfHNuT9ZVya1+/zA8NBvAPTwlcDiOMz3OLMkRIkHCwLurcjI 4mGyc68aaYFmzc7e0BqXxTu+EKEQy5c4Z6eyUY9hFVOtJYkagFhehu3zQ55hQNCBEc UrrwZwWShHnCVLnxyfeJt4VLQV9w2oBMLzaguOb6U61zsDFPc2+JsbauzRz0qEwlNl oHtXPnCK5QibjmuRYSEHnSOwZ+x/Z1bQy339/RuNQX9Jap8SAwM4yulJenlPTJF0UC SJc5rXLMBgTdQ== To: libcamera-devel@lists.libcamera.org Date: Fri, 8 Jan 2021 23:31:13 +0530 Message-Id: <20210108180113.17039-1-email@uajain.com> Mime-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: pipeline: ipu3: Stop ImgU and CIO2 on IPA error path 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" Do not let freeBuffers() run before ImgU and CIO2 are stopped on IPA configuration failure path. Signed-off-by: Umang Jain Suggested-by: Jacopo Mondi Change-Id: Iadf0c950c24dcd3b6788275e36f2c028fbc53d7b --- src/libcamera/pipeline/ipu3/ipu3.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp index 6cd1879a..3c7f98a9 100644 --- a/src/libcamera/pipeline/ipu3/ipu3.cpp +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp @@ -694,6 +694,8 @@ int PipelineHandlerIPU3::start(Camera *camera, [[maybe_unused]] ControlList *con if ((result.operation != IPU3_IPA_STATUS_CONFIGURATION) || (result.data.size() != 1) || (result.data.at(0) != 1)) { LOG(IPU3, Warning) << "Failed to configure IPA"; + imgu->stop(); + cio2->stop(); ret = -EINVAL; goto error; }