From patchwork Mon Mar 16 21:43:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3123 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 73AB56299E for ; Mon, 16 Mar 2020 22:43:27 +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 C1ED2AC1; Mon, 16 Mar 2020 22:43:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1584395007; bh=qp1IwdmpGTF15rtbkuVBmpldWAU1tfcElyuXFFKBvaE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iJwNDdYM1+hkTtSiJ4h5C21JMkzMTNONENzPwMl0iHF9uHGdMJSodyTsNFiEpStlj pawWw1y/se1UbasyKyFTJelg/vieXaDWFThQy/aM1LLFckbPjpU2A1vSWcR2ybRdXQ 4tvTh4oMlMfBQqidWddwPrDgajwWUPclqcRZvZP0= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Martijn Braam , Mickael GUENE , Benjamin GAIGNARD , Andrey Konovalov Date: Mon, 16 Mar 2020 23:43:06 +0200 Message-Id: <20200316214310.27665-7-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200316214310.27665-1-laurent.pinchart@ideasonboard.com> References: <20200316214310.27665-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 06/10] 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: Mon, 16 Mar 2020 21:43:27 -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 --- 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 f5a925d97b63..28de3d2fe5c6 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -1626,7 +1626,7 @@ PixelFormat V4L2VideoDevice::toPixelFormat(uint32_t 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 " << utils::hex(v4l2Fourcc); return 0; @@ -1707,7 +1707,8 @@ uint32_t V4L2VideoDevice::toV4L2Fourcc(PixelFormat pixelFormat, bool multiplanar * \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 " << utils::hex(pixelFormat); return 0;