From patchwork Fri Aug 5 13:53:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 16977 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 2E002C3272 for ; Fri, 5 Aug 2022 13:53:26 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CFE2D63334; Fri, 5 Aug 2022 15:53:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1659707605; bh=JDasz4YVrK4E+L/SvZPCkQc1lQ9cWlzn+yfqm/fq91U=; 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=Q1xP8uB7gEV6GSk6st4lpmQtjqCH+pM8zXuei9atGw6EaG17fr92M47o509Im9Vd2 77J2kETjfgekhVP8507QQjsjK8Smsk2wUDYZ1D5J13+ZOIRygGVIvZVMDxu1RrAI0E +V7Qrh1OFVr/toMLi5+ichwzHzIv08bgGPkZrnGQkusrTBgRs+Nfx15BhM8PFHACgk Vq9u8w6LGhH2yMDmyF8m9T9re/+zNB6KpqCV40gG+RUH8EE3+YztStgnFP1Dhn8FX3 KlSB1YKxZd8uJNAdkqU4NtV3TTREV1uBesOdgeF6WOaLsZBmOSnPOqJfV3UL4RfhxH 7yhHsi7B3sPBA== Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4D262603E4 for ; Fri, 5 Aug 2022 15:53:23 +0200 (CEST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 53BA11C0004; Fri, 5 Aug 2022 13:53:22 +0000 (UTC) To: libcamera-devel@lists.libcamera.org Date: Fri, 5 Aug 2022 15:53:04 +0200 Message-Id: <20220805135312.47497-3-jacopo@jmondi.org> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20220805135312.47497-1-jacopo@jmondi.org> References: <20220805135312.47497-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 02/10] 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: Jacopo Mondi via libcamera-devel From: Jacopo Mondi Reply-To: Jacopo Mondi Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" From: Kieran Bingham via 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 Signed-off-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 fbe02cdcd520..8ffa27b1337b 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()->setError(Request::ControlError); + } ret = data->video_->queueBuffer(buffer); if (ret < 0)