From patchwork Thu Apr 7 03:54:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 15645 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 DDA79C3256 for ; Thu, 7 Apr 2022 03:54:31 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 23EDF65642; Thu, 7 Apr 2022 05:54:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1649303671; bh=W6n0r9wR+Y5exH+LYn0ebECnZfe2YWnYAGVHuV5v54M=; 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=S5Ww80TVkpxwgE/wsPAJucAViB+UqkIw2pHFKyRMbcwW+FbkXIpZ5s01iVD/uipn3 I/VrAXLYWUO6ySommdJRkiFmrSLlD7Ok5snVOG/YFdk5p1zEX/KZ2rfDYAlIT+k0j8 uiHp0GBiiFnzqmGSpJQG3RbukY2m62JNCaoVZ9DC8hv2ek1E38kkDm39fYLVL2nGHc F4G4jhkFcp7ZiNs3o40FDAan8vB7xknuZ/nWVpyDwlriAskmv9RZTbkN1oU2E/ntPM i4utuB17hI2+NnIsxiCdat/pCorpZRUaHsW5mCaFQK0Ltl05Zb7g9GXYyB9YVnwAFK fmhIUW5hA1O6w== Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 3C845604B5 for ; Thu, 7 Apr 2022 05:54:29 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="o1YurKjN"; dkim-atps=neutral Received: from perceval.ideasonboard.com (unknown [27.57.186.178]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8A98830C; Thu, 7 Apr 2022 05:54:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1649303668; bh=W6n0r9wR+Y5exH+LYn0ebECnZfe2YWnYAGVHuV5v54M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=o1YurKjNSGcaLOWTOSqEQxYsw6sajZXhC8gFmx9i/WhlvN7CYT5qL/t1fWEjNMvEJ IOL7vQiLv5DDUsNdJnTUeMfv2jkrV0Yqg/QSQhUc3lYGFxG/yL6neNGZjZJK4lNeN6 Noe1yd0kDpCgcWh72p5kZiBfSZLSeERuIdWzHwLI= To: libcamera-devel@lists.libcamera.org Date: Thu, 7 Apr 2022 09:24:09 +0530 Message-Id: <20220407035409.226233-1-umang.jain@ideasonboard.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20220406144553.193858-1-umang.jain@ideasonboard.com> References: <20220406144553.193858-1-umang.jain@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1.1] libcamera: v4l2_videodevice: Fix uninitialised watchdogDuration_ 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: Umang Jain via libcamera-devel From: Umang Jain Reply-To: Umang Jain Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Initialise the watchdogDuration_ member to 0ms before it is used in rest of the code base. Failing to do so, spews out log warnings regarding dequeue timer being expired. Fixes: 16f3d2de50ff ("libcamera: v4l2_videodevice: Add a dequeue timer") Signed-off-by: Umang Jain Reviewed-by: Naushir Patuck Reviewed-by: Laurent Pinchart --- - Rebased over "libcamera: base: utils: Add missing constructor for Duration" --- src/libcamera/v4l2_videodevice.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp index 634ac4a5..87976fb2 100644 --- a/src/libcamera/v4l2_videodevice.cpp +++ b/src/libcamera/v4l2_videodevice.cpp @@ -39,6 +39,8 @@ namespace libcamera { +using namespace std::literals::chrono_literals; + LOG_DECLARE_CATEGORY(V4L2) /** @@ -520,7 +522,8 @@ const std::string V4L2DeviceFormat::toString() const */ V4L2VideoDevice::V4L2VideoDevice(const std::string &deviceNode) : V4L2Device(deviceNode), formatInfo_(nullptr), cache_(nullptr), - fdBufferNotifier_(nullptr), state_(State::Stopped) + fdBufferNotifier_(nullptr), state_(State::Stopped), + watchdogDuration_(0.0) { /* * We default to an MMAP based CAPTURE video device, however this will