From patchwork Fri Mar 13 23:38:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 3090 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 6E1EC62826 for ; Sat, 14 Mar 2020 00:39:08 +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 C272F1854; Sat, 14 Mar 2020 00:39:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1584142748; bh=ntkBsA9pLZuz2jgxwEgP5mGrgPBqce/PuPPjrfLPvdw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dQn0AqDPrgpuzJibZvGnynjnjmr8CiVh/jEP3MgCn9J+L9lBdCDa98vZcOSTsrEsR GXzen8yg2v0Qy9LIWig+xuMm7stYDO8fjVqKAdnwTX9jfpfx0dBdVaiEu0R0EgQN70 Mbl1vYqtnzl3W3WNXKRImrlmp7l/oljJTXjEDEKA= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Cc: Martijn Braam , Andrey Konovalov , Mickael GUENE , Benjamin GAIGNARD Date: Sat, 14 Mar 2020 01:38:54 +0200 Message-Id: <20200313233856.25202-7-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200313233856.25202-1-laurent.pinchart@ideasonboard.com> References: <20200313233856.25202-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 6/8] 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, 13 Mar 2020 23:39:09 -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 86b262ba2436..f68b67b33293 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -1485,7 +1485,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; @@ -1566,7 +1566,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;