From patchwork Tue Mar 22 13:16:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 15506 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 E1BA4C0F1B for ; Tue, 22 Mar 2022 13:16:41 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id CB264604E6; Tue, 22 Mar 2022 14:16:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org; s=mail; t=1647955000; bh=/LhhURl9jSXPdzsKZpbjZ6X9AiPh0WWw/sc9iG44zGk=; h=To:Date:Subject:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=xxnygLhw/3S70gu4Ax2CbqcXqUCK37cD9sAo/ZVuhrF0/Zod7Qg5arwOPTM0HD+Hf 2IN2sWQGPbSw15Vcg3uZSmXN6EkDXO90yKu0tn2i2oX1pnsn6lR0YUh9uHiz2yuEKB /MGuQtRlwG1pWsCiuUVq0uKxO3pA2LNKyIis+ztxM2RIeK4BSRT+ySHeucFvq8P6pk Qn39NgcC20nmK6zYvAMgD4D5dvnd06taal4HsrHiLhhaLaKMRbGpbs1qWRS46nLTZp UebGDB5mm6ROXNDtqW+uSCa40rzynZgZ+Gx8ouoF4yg4otEgdP+p6dIgN7dZvjoxOL zjB75UjovaDcA== Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 15176604C5 for ; Tue, 22 Mar 2022 14:16:39 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="e5QXw964"; dkim-atps=neutral Received: by mail-wm1-x332.google.com with SMTP id h16so10379983wmd.0 for ; Tue, 22 Mar 2022 06:16:39 -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=1Ejz9kP7kSkRBOvQgqMIITB0p/HMR1BjPBufWhYAGBA=; b=e5QXw964TlGZ1NVcTL6jHM/MYwMdubaNtcxubvo2x/Q1tFo56Zaynlf84p/KzdmJy5 2d9Op3PLxWsHFLplUWcwo48TB8WXysrhnSLuKrHJsjgisESQGrrTBzGOw9A2x04IToS9 PVINuwbARpnxrRij2CABfS7vz9d3RSABjNqlbz/fieRRnLJs7ziIWmzO6r24NVDCqYim hZvfMKUzS56oiXmqA6dgwNX+Ll8XTG6WhnpE1NHWlGtKEarrv6oUOdMmlf1Gn1ckF502 Ke+t5OWXwbMUZwnjZSKzEzu292CPx9vA+dL4u42EUwxIo85SjZgT55STZKuyF8nAGeTZ OqZw== 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=1Ejz9kP7kSkRBOvQgqMIITB0p/HMR1BjPBufWhYAGBA=; b=Y8i1+YPiTV1GJFVDDUgBXfoL2/FI6qtHgV3GAA3L+X7UX7a67tRLQkp4FUBhgcYeA5 DIuRPOkiChKv8/SxSrGv7h7kW+nc43jt1iDn5y2cfW7MwBIdd2ZpecVRWZuJReyKF6r+ IDf+enajA0WiN1ASj8paxSHqUJnTtKFp5lDcLvZnw2bebLiL157mITKQRRVXMo9biIym eUIqB+Jd7YsPfSdx5X6oTIREebzZbXFMfkoN0okcNRYKVBaeCLYAsRgVdJoCXC0feSOM 06g30a7pFXywzVFOoRd69VjIFHPBqbZaJOAGieMbbGGuz/UtV8xauYkyMNP3cJ1hItnl XmhA== X-Gm-Message-State: AOAM530i7nuJV8xkT45vgQh7r2W8o513bPOzhdi45of7Zawhg7wg6yD6 CA3vLBhKTJRCAKreoy4Tl6mA/SSbcv70Pg== X-Google-Smtp-Source: ABdhPJygFTvOoABfiMDKJqWWOA7o0rUpnEVcEZLehmoa7SUD2QpjZxb3IPoqyi/vQCjFCNOEbns5kQ== X-Received: by 2002:a05:6000:2a4:b0:204:f41:13da with SMTP id l4-20020a05600002a400b002040f4113damr9067226wry.0.1647954998253; Tue, 22 Mar 2022 06:16:38 -0700 (PDT) Received: from naush-laptop.pitowers.org ([2a00:1098:3142:14:9e9a:99af:e5a6:319b]) by smtp.gmail.com with ESMTPSA id n14-20020a7bcbce000000b0038c7776a300sm2293478wmi.0.2022.03.22.06.16.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Mar 2022 06:16:37 -0700 (PDT) To: libcamera-devel@lists.libcamera.org Date: Tue, 22 Mar 2022 13:16:32 +0000 Message-Id: <20220322131635.2869526-1-naush@raspberrypi.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v1 0/3] V4L2 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, This change essentially superscedes the work done in https://patchwork.libcamera.org/project/libcamera/list/?series=2978. I've moved the dequeue timeout functionality into the v4l2_videodevice class, allowing any pipeline handler to use the functionality. This change also allows us to set a timeout on any device node easily. Thanks, Naush Naushir Patuck (3): utils: timer: Allow Timer::start to use utils::Duration libcamera: v4l2_videodevice: Add a dequeue timer pipeline: raspberrypi: Add a Unicam dequeue timeout include/libcamera/base/timer.h | 2 + include/libcamera/internal/v4l2_videodevice.h | 9 ++++ include/libcamera/ipa/raspberrypi.mojom | 1 + src/ipa/raspberrypi/raspberrypi.cpp | 2 + src/libcamera/base/timer.cpp | 14 ++++++ .../pipeline/raspberrypi/raspberrypi.cpp | 15 ++++++ src/libcamera/v4l2_videodevice.cpp | 47 +++++++++++++++++++ 7 files changed, 90 insertions(+)