From patchwork Tue Jul 19 10:31:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 16684 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 29F40BE173 for ; Tue, 19 Jul 2022 10:31:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4D69A63314; Tue, 19 Jul 2022 12:31:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658226709; bh=Yev8h52PoyJAFTOqRg9EhppuA3ADetNeDg+IS862x8c=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=q2UBsKFtKViAiLrR+bRawE3L09tAh5pe4YWQtoGH+ATlXnOyfRpWyOq9PLn5lLs1i SkcJ6gGUT1ny0sp3xfO0JbF336CacBMMkofcd15DQzwySAEw6IaaiGzSmPYlFho6MZ xSUOX29Ad0whmkfmP35TJHnfy5dJgRvq7dtIHme957wSqHpsjlJNf/+Dys1l3wNqY+ 82Pu8eIuifHOfcaUmp/HNUepeUjfDaisLqZCkurJsl+3Cpjbwbr3QorBMILNU1dqAs v3vft66UBlo1bSIdAnHuxK3o5t4LduzUkpSeIiHMGnLBFgpqrmP0FaKLBLY34GPcoF P5AYbhyHIIUmg== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5BD3160489 for ; Tue, 19 Jul 2022 12:31:48 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="vNWWb0tX"; dkim-atps=neutral Received: from Monstersaurus.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CA8236EE; Tue, 19 Jul 2022 12:31:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1658226707; bh=Yev8h52PoyJAFTOqRg9EhppuA3ADetNeDg+IS862x8c=; h=From:To:Cc:Subject:Date:From; b=vNWWb0tXZPjKMI5DPqZjv4aV4Jjcj+tW/ebxhJFZgpKIKKX6DH7N2P8enrZoa0J/3 TL5zt1EjI9QCimY71G781h7rOySfV+otgnSaqdHDbgudj62VxVKQemkdvxq8ZGKqKt WLihfuo1TRJSJfKH+yuBZKR8sSdW7lceLp6IAUtQ= To: libcamera devel Date: Tue, 19 Jul 2022 11:31:42 +0100 Message-Id: <20220719103144.3686313-1-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 0/2] request: Support non fatal errors 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: , X-Patchwork-Original-From: Kieran Bingham via libcamera-devel From: Kieran Bingham Reply-To: Kieran Bingham Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Requests may have internal processing errors that don't prevent an image from being captured, but may for instance prevent setting controls or other minor errors that we can report to the application. These non-fatal errors should not cause the Request to be cancelled, as this is currently used specifically to prevent reqeusts from being requeued. Cancelling otherwise re-usable requests can therefore lead rapidly to a resource starvation where the application believes it is shutting down when the pipeline is still operating. Whilst this definition of Request completion status needs further clarification, introduce the ability to set an error flag on a request and use it to set a ControlError when the UVC pipeline handler fails to set a control. This can happen already for instance if an incorrect exposure control is applied to the camera in the Request. Kieran Bingham (1): libcamera: pipeline: uvcvideo: Report control errors Paul Elder (1): libcamera: request: Add support for error flags include/libcamera/internal/request.h | 3 ++ include/libcamera/request.h | 9 +++++ src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 7 ++-- src/libcamera/request.cpp | 36 ++++++++++++++++++++ 4 files changed, 53 insertions(+), 2 deletions(-)