From patchwork Fri Oct 18 07:57:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harvey Yang X-Patchwork-Id: 21665 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 29EA7C32FC for ; Fri, 18 Oct 2024 07:59:52 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 267C86538E; Fri, 18 Oct 2024 09:59:51 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="AAJwJuBx"; dkim-atps=neutral Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 056E465387 for ; Fri, 18 Oct 2024 09:59:50 +0200 (CEST) Received: by mail-pg1-x536.google.com with SMTP id 41be03b00d2f7-7ea6a4f287bso1271089a12.3 for ; Fri, 18 Oct 2024 00:59:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1729238388; x=1729843188; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=jeWZkFEjJSq2WegfOcySsHRlekdWBIIX+WdrIESgmSQ=; b=AAJwJuBxwCYgcjaVgdRefG0dVDkIWi1feCADU+o6xHWUKOmInBUVxsFDt6hKyJ8Rvp xiRVZLe5A2FcQ/Xmd7XRzXXK82oli0kpfiFIlniXDgnNVtZzH7bdcnVHQiX4ztCDrF2i I2B3PUTOfdu4p1kKpRsuArcOjEgedlHZ0RZYs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729238388; x=1729843188; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=jeWZkFEjJSq2WegfOcySsHRlekdWBIIX+WdrIESgmSQ=; b=CQRZgLPv7EAYg7xNvNN0fn/gJK7Id/oGvMn2zwpoMU/46CvFj4u5ZQPKyOwQ6cc2sM NL7Xie2DlKcNSHGy6gb+fhe8BxXZgQwl2xANmMb2zGCAqNFl+T12e1GceBFbrICYZZrB iVmrVrM9OOLZJu9dOzk35JWQ01Qo+v9NwmrExHxXQHSd6YPIw3gCigj8fm1orN8t6PTp 64KaT2ZQGoqila++5KBTliv8UreoD6qKOYPHfuyv7qx2bWwlK2t/EdHsUiRt7/1I94aC n5DmHvi+XMHAhXllWnJ8mYjNaBRNTe5QkmR1snbtz/Xhv6Haqff0P16LRoNc25fT3ONz YJuA== X-Gm-Message-State: AOJu0YyapBaM12poiCvxvA3FtrtxI0uqAdaiWJVpSGVUb1wPSKgkS9Je k+RZ4pA/PResFdNfBAtopdMLzcdKq2+p/KEE7DeOyT5IMdH7qfRE48nhsYvfWny3YpDtZskKgQw = X-Google-Smtp-Source: AGHT+IETYK9rIeCjhG6kcut19bZOLrtNU7lNFJJmxV78sZ5OGbXR0RDVV342uv9LwerqFVpkoPalFg== X-Received: by 2002:a05:6a21:6b0b:b0:1d8:f977:8cda with SMTP id adf61e73a8af0-1d92c5087f1mr2017624637.27.1729238387663; Fri, 18 Oct 2024 00:59:47 -0700 (PDT) Received: from chenghaoyang-low.c.googlers.com.com (27.247.221.35.bc.googleusercontent.com. [35.221.247.27]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-71ea345b0c3sm901274b3a.172.2024.10.18.00.59.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2024 00:59:47 -0700 (PDT) From: Harvey Yang To: libcamera-devel@lists.libcamera.org Cc: Harvey Yang Subject: [PATCH 0/4] IPC disconnect signals Date: Fri, 18 Oct 2024 07:57:33 +0000 Message-ID: <20241018075942.1150378-1-chenghaoyang@chromium.org> X-Mailer: git-send-email 2.47.0.rc1.288.g06298d1525-goog MIME-Version: 1.0 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Hi folks, This series of patches adds signals to detect disconnections in the IPC. It also reuses signal `Camera::disconnected`, which were used when a whole pipeline handler is disconnected. This passes gitlab pipeline: https://gitlab.freedesktop.org/chenghaoyang/libcamera/-/pipelines/1292655 BR, Harvey Harvey Yang (4): libcamera: Add signal disconnected for IPC libcamera: Use disconnect signal in ipa proxy worker libcamera: Detect IPC disconnection with poll libcamera: Make Camera::Private::isAcquired() protected include/libcamera/base/event_notifier.h | 1 + include/libcamera/internal/camera.h | 6 +++- .../libcamera/internal/ipc_pipe_unixsocket.h | 2 ++ include/libcamera/internal/ipc_unixsocket.h | 3 ++ src/libcamera/base/event_dispatcher_poll.cpp | 9 ++++++ src/libcamera/base/event_notifier.cpp | 5 +++ src/libcamera/camera.cpp | 13 ++++++++ src/libcamera/ipc_pipe_unixsocket.cpp | 8 +++++ src/libcamera/ipc_unixsocket.cpp | 32 +++++++++++++++++-- .../module_ipa_proxy.cpp.tmpl | 8 +++++ .../module_ipa_proxy.h.tmpl | 2 ++ .../module_ipa_proxy_worker.cpp.tmpl | 5 +++ 12 files changed, 91 insertions(+), 3 deletions(-)