From patchwork Thu Jul 21 12:13:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 16714 X-Patchwork-Delegate: kieran.bingham@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 29ADCBD1F1 for ; Thu, 21 Jul 2022 12:13:22 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 5D0436331F; Thu, 21 Jul 2022 14:13:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658405599; bh=IGBbScQGZcbTQmRMFjagqowF/O41SSAC2/ooNjSvQ8s=; h=To:Date:In-Reply-To:References:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ipieflcWKf22sWHughbEW0fjqI5QsUXAXUBfqn92LkrNjJvVQ+FTq9WAYQi3pDMWs cXAkcIGFduO2xluLQ61nnSdclLxQD4vFXrQzi9aN6zxUrsN2ERFI9bAxA7RXTqpnVr uVK1R8sKGqJavfs1moMoKpkGg0CWQ8XOoIu3oy1InKGpWEJTPqbFUZD6+TGIkpvhmH fb4+mkY8nzqUTqItEHcqeBSNPAsFPr4Uz/m8ABsNpM6BTBEsnqYMRJVf9w+wjJqlDa lHuRyObpzcWtXwThrCmiusGy9H1tiCFomR7v2rj85XpwgYh4VNCvPlXB20rIEf+FEP CIBqZo9lwAaqw== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 2DA826330E for ; Thu, 21 Jul 2022 14:13:14 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="A67ADneJ"; 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 BDB44A38; Thu, 21 Jul 2022 14:13:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1658405593; bh=IGBbScQGZcbTQmRMFjagqowF/O41SSAC2/ooNjSvQ8s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A67ADneJ7E7I51SRRW22et8m0Kg3eptavGa1kNovPE9xrWSjEA85HdwPKcwx1D9bW oG98SsN/kiNcYCJnwiqBa4+LR/7M5ACBk5lI+478km0tET15It8nax2OeF1RNM/vw8 dkN8G6Nbximsr7OnSToUgjbzpbLwRG1ZBrSzkV4g= To: libcamera devel Date: Thu, 21 Jul 2022 13:13:00 +0100 Message-Id: <20220721121310.1286862-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220721121310.1286862-1-kieran.bingham@ideasonboard.com> References: <20220721121310.1286862-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [RFC PATCH 02/12] libcamera: pipeline: uvcvideo: Report control 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" Report an error when failing to process controls, but still allow the request to process and complete where possible. The Request ControlError flag is raised on the request. Bug: https://bugs.libcamera.org/show_bug.cgi?id=135 Signed-off-by: Kieran Bingham Reviewed-by: Umang Jain Reviewed-by: Jacopo Mondi --- src/libcamera/pipeline/uvcvideo/uvcvideo.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp index 53b2f23ab029..1f282f26bec3 100644 --- a/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp +++ b/src/libcamera/pipeline/uvcvideo/uvcvideo.cpp @@ -26,6 +26,7 @@ #include "libcamera/internal/device_enumerator.h" #include "libcamera/internal/media_device.h" #include "libcamera/internal/pipeline_handler.h" +#include "libcamera/internal/request.h" #include "libcamera/internal/sysfs.h" #include "libcamera/internal/v4l2_videodevice.h" @@ -373,8 +374,10 @@ int PipelineHandlerUVC::queueRequestDevice(Camera *camera, Request *request) } int ret = processControls(data, request); - if (ret < 0) - return ret; + if (ret < 0) { + LOG(UVC, Error) << "Failed to process controls"; + request->_d()->setErrorFlags(Request::ControlError); + } ret = data->video_->queueBuffer(buffer); if (ret < 0)