From patchwork Wed Apr 6 07:58:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 15622 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 253F9C0F1B for ; Wed, 6 Apr 2022 07:59:07 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4DB7865642; Wed, 6 Apr 2022 09:59:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1649231946; bh=AoMTlmx4nkNH6r9byOirgwVUnZGXqEjyvdMGb0Oe3zs=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=rE6tjrJee6nDsnATPrRstybHmUBCVX+uQ/Aebcv4sZaA+xuz1526iHZr2c3Gb3JEV V1quF4Xb85uJl1JAVoQ7haD0XtjqABeTRYsyEmTLEWj7SZVeBdeYPSNsKnM3UoXhmA +HP/S8MkW8Acsv7er2iz8U3vBbrqdf6IDWrTc/O9Z1s6wr0iWWJY11p7j4J+80y6bb oFUdZ0McjFk8ufylIZzEmhiUbZ66rNiK7RrFlQ9my0n85bXNEGNVaH5NEqyQWVx0zF Q5CPC4K1qk1ow1tFMOq2k2/1wU1/cbdC5NU6wktubcOlsbF7rXkCLW9QaW9e6A7dhT mPAKxARRFFqWw== Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 55217604B8 for ; Wed, 6 Apr 2022 09:59:04 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="RHehl6k6"; dkim-atps=neutral Received: by mail-wm1-x333.google.com with SMTP id n35so900374wms.5 for ; Wed, 06 Apr 2022 00:59:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+A7/LuGt/ju2YrP6poOqjI64B2Oxj0q3InksCIwp1Kg=; b=RHehl6k6XZkHeEuKdF5Avrkce2ABgs/xcddpRPOABfIxoiAsrA5ob1rXIvr9yBgJ4v l6TbbWJaydR5Lx4VhpQ2YKd8HJyLYG3fVxummUBvsnsKMkOgh8pGNUcFawb/GwaDEAGX RLqFwOcsbsj6EKmo6r6rl5TK2KpKkmrRyolLke3yXjrym8vWiA1jKYVXTauLS+SCVbjw 8eDwqTbDBa1GBDju4kvX2+1ZUuDwpTX4zCUXf3ktIQEODRjoFEHQ7XjTRFi0MtECdOMY 0j2pPXQyqxpGmoGzEFjOswC4rCsnKfh+dByS+k6kOlgpwcp8xuR81O37m62Ow446pa9K H9RQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=+A7/LuGt/ju2YrP6poOqjI64B2Oxj0q3InksCIwp1Kg=; b=bXKF18rnfXwUFWkt1VgMIjLBP86kx4nDIzu4upx1r8g1hPxH4PhPPuJvS821QK92Yo UWE15pIbZx4Cf7OnoDhkTqh3a78QDjKaGrPxsgehCsuW7JVyRl9wpSySF0d4RQu5T+42 WKdXMY5LR1x+NOHk8kJNQi0MMnJYrjt6+hKcD5Mfipdj1jhGpbL942nYw8N3t/LVwKoF hahU8DP+SoE4DxNNI9v2dF2IGuLOy6UGHAN/k7bMxdKz9TZkNxL6NuLampwMBbcJ4MTF Y4Z1Ba585RlxkraaouzdcMeFoFF9KL3AnCM4t40CjZvAQqIxrLKY2HbLJvoPgu/IK9N2 redA== X-Gm-Message-State: AOAM532qQd05hVLmnKV+BfqqBuNHIMvgqjgRqyKraNL4IkwTbWAHeKS1 H2Mz59J02hzDqYBbSDs6zSqe+ijrPD/Tkw== X-Google-Smtp-Source: ABdhPJz0/sBhoz6XwbZOqFrGOyAClPxIPFg44L27thQFh/htCRPsch00cyiUl+/+0H1PWaXrQfBKvg== X-Received: by 2002:a05:600c:35cc:b0:38c:6d25:f4ad with SMTP id r12-20020a05600c35cc00b0038c6d25f4admr6239717wmq.127.1649231943700; Wed, 06 Apr 2022 00:59:03 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:eedb:32e2:e3d4:3bfa]) by smtp.gmail.com with ESMTPSA id 14-20020a056000154e00b00203f8adde0csm17235503wry.32.2022.04.06.00.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 00:59:03 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Wed, 6 Apr 2022 08:58:56 +0100 Message-Id: <20220406075859.3857121-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v4 0/3] Dequeue timeout 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: Naushir Patuck via libcamera-devel From: Naushir Patuck Reply-To: Naushir Patuck Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi, I've updated this patch with all the suggested changes for version 4. In particular, I've switched back to using utils::Duration to store the timeout value in the v4l2_videodevice class. However, because of this change, I have to do a slightly awkward cast when setting the Timer value: watchdog_.start(std::chrono::duration_cast(watchdogDuration_)); This is becase the base type of utils::Duration whereas std::chrono::milliseconds uses an integer, and you are not allowed an implicit conversion between the two. Once we switch utils::Duration to use an integer base type, implicit conversions will be possible, and we can get rid of the above cast. Does that seem reasonable? Thanks, Naush Kieran Bingham (1): test: v4l2_videodevice: Verify the Dequeue Watchdog Naushir Patuck via libcamera-devel (2): libcamera: v4l2_videodevice: Add a dequeue timer pipeline: raspberrypi: Add a Unicam dequeue timeout include/libcamera/internal/v4l2_videodevice.h | 10 ++ include/libcamera/ipa/raspberrypi.mojom | 1 + src/ipa/raspberrypi/raspberrypi.cpp | 2 + .../pipeline/raspberrypi/raspberrypi.cpp | 15 +++ src/libcamera/v4l2_videodevice.cpp | 55 +++++++++++ test/v4l2_videodevice/dequeue_watchdog.cpp | 96 +++++++++++++++++++ test/v4l2_videodevice/meson.build | 1 + 7 files changed, 180 insertions(+) create mode 100644 test/v4l2_videodevice/dequeue_watchdog.cpp