From patchwork Sat Apr 4 00:44:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3384 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5BCBF629B9 for ; Sat, 4 Apr 2020 02:44:55 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Kg6tYjyE"; dkim-atps=neutral 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 BE97414DA; Sat, 4 Apr 2020 02:44:54 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1585961095; bh=SLE8NyRGi69ia6Vcrm2HnZBLNbgV81C/Kfg5Chlui80=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kg6tYjyE/3aisHLNCP96hHHTAnBey8WGIu9tTinBN8oaDp9eo7ltvGwOxItYzyiqL 12ocyqWMRY/niBaC23aIorai0RI78B5u9GLLgM9srYV3MN0JovqcITGYoGdaZGuZSY ydq87hgUmDdsG0Mh0m3eyB+MTCKwrmkWUKkCiJDU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Martijn Braam , Benjamin GAIGNARD , Andrey Konovalov Date: Sat, 4 Apr 2020 03:44:34 +0300 Message-Id: <20200404004438.17992-8-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200404004438.17992-1-laurent.pinchart@ideasonboard.com> References: <20200404004438.17992-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 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: Sat, 04 Apr 2020 00:44: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 Reviewed-by: Niklas Söderlund --- 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 42b6c1ed1ef8..5208e5a47148 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -1711,7 +1711,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(); @@ -1799,7 +1799,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 {}; }