From patchwork Tue Jul 19 10:31:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 16686 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 CB731BE173 for ; Tue, 19 Jul 2022 10:31:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 8904463317; Tue, 19 Jul 2022 12:31:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1658226712; 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=MMh1Yj8Odsf3KqiM02oXW91LSOQwVmCgtE3p/6zqcKaqjAPP2HSyEfcu8XvJx3SPq jlitQhyiP2N5cYFfWb2HejKww74WS9LR/casyNsej4WJZibJs1wxysxuZWjgngauwH 4u/Ej9skqZOMPWmXTvlZ4YYSh+sq7crESXPjuVe+/QPc+bpaUDU8C67dWnG32XZuhJ NZFUKxLD+zplR1kexo4gmZ9lqaM3sCZFaq6dtzX44j3GkAllpNzKLcsr6CYKT6DRPS qO7dHPT8z8fGIVgIvDBw3ZRWsG8vxgsB4w+kwnrhc9cURA8F/SObh4qAVvjfbBm0QD iNkqV6mDUSIbQ== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id B523660489 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="CaaWYwDt"; 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 5D8BA8B1; Tue, 19 Jul 2022 12:31:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1658226708; bh=IGBbScQGZcbTQmRMFjagqowF/O41SSAC2/ooNjSvQ8s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CaaWYwDtmFq5llvTiwQga6d72o4DuBpxmzcT+kjZNvpCE5IRs32G7F+ot7g+tcoJj aYrYGAsjCi6WnCslQ3upr+5awB/OkkASJGUOBQigdYYMPKUsotVuZkhmnA6s9xXm/T ayF4gsEyI41RD70Csq8T9jahvlCuHY/5ry/gvavI= To: libcamera devel Date: Tue, 19 Jul 2022 11:31:44 +0100 Message-Id: <20220719103144.3686313-3-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220719103144.3686313-1-kieran.bingham@ideasonboard.com> References: <20220719103144.3686313-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 2/2] 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: 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)