From patchwork Fri Mar 20 01:48:35 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3215 Return-Path: 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 681C060418 for ; Fri, 20 Mar 2020 02:48:55 +0100 (CET) Received: from pendragon.bb.dnainternet.fi (81-175-216-236.bb.dnainternet.fi [81.175.216.236]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C851E1529; Fri, 20 Mar 2020 02:48:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1584668935; bh=UkHMEsSEIZFaLoQiV9nRaF6yz+t3etZAzboZO1q5XJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GeK3phWjMbTLe/c/zhopaOsKm+KVAS46DYiTmh4RCFZsDje2JXwNF32FJm8bM6ThD dDJ+LKgj1qaZhzSDCd4IfCuzwq/mTfLc4DfA5P4Gmb9dN5ch76xbxZRaCmSHZCdg9c RuqXCWFgz1AjHuoxG+OvOylZvBKIWyuwT4dWPLbw= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Martijn Braam , Benjamin GAIGNARD , Andrey Konovalov Date: Fri, 20 Mar 2020 03:48:35 +0200 Message-Id: <20200320014839.14683-8-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200320014839.14683-1-laurent.pinchart@ideasonboard.com> References: <20200320014839.14683-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 07/11] libcamera: v4l2_videodevice: Downgrade 4CC conversion errors to warnings 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-List-Received-Date: Fri, 20 Mar 2020 01:48:55 -0000 Failing to convert between V4L2 and DRM 4CCs indicates something is likely wrong, but doesn't necessarily prevent the camera from being usable. It may for instance only limit the number of supported formats. Downgrade the related log messages from LogError to LogWarning. Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham --- src/libcamera/v4l2_videodevice.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 096ebc1bbb88..180eb192a951 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -1691,7 +1691,7 @@ PixelFormat V4L2VideoDevice::toPixelFormat(V4L2PixelFormat v4l2Fourcc) * class. Until we fix the logger, work around it. */ libcamera::_log(__FILE__, __LINE__, _LOG_CATEGORY(V4L2)(), - LogError).stream() + LogWarning).stream() << "Unsupported V4L2 pixel format " << v4l2Fourcc.toString(); return PixelFormat(); @@ -1773,7 +1773,8 @@ V4L2PixelFormat V4L2VideoDevice::toV4L2PixelFormat(const PixelFormat &pixelForma * \todo We can't use LOG() in a static method of a Loggable * class. Until we fix the logger, work around it. */ - libcamera::_log(__FILE__, __LINE__, _LOG_CATEGORY(V4L2)(), LogError).stream() + libcamera::_log(__FILE__, __LINE__, _LOG_CATEGORY(V4L2)(), + LogWarning).stream() << "Unsupported V4L2 pixel format " << pixelFormat.toString(); return {}; }