From patchwork Mon Apr 26 08:38:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hirokazu Honda X-Patchwork-Id: 12109 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 D0672BDC99 for ; Mon, 26 Apr 2021 08:38:39 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 4A3CC602D1; Mon, 26 Apr 2021 10:38:39 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="Jww0vop2"; dkim-atps=neutral Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CE179602D1 for ; Mon, 26 Apr 2021 10:38:37 +0200 (CEST) Received: by mail-pl1-x62d.google.com with SMTP id v13so14950757ple.9 for ; Mon, 26 Apr 2021 01:38:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ojWrFUNsBTazA/I61fLOsjdeB76MzEpM/959EXdyq3w=; b=Jww0vop2oXV5tM1v+ZR2UacDEI894UB7kF9+mcUdY7mN7wCRTyCMzo/vsBlrnIilTz xDcAdmcVSCR928kN5CdiKzlNpILCCv6deqNA8OxkoR25ZJ2xQ9dDgE1lrErOTh5yugQ2 z/W4gy8eot0S76/q2IShSzYc/W6herSKwUE5A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ojWrFUNsBTazA/I61fLOsjdeB76MzEpM/959EXdyq3w=; b=HF2Ivtm+R7CWr+hfyEjZTAuNJ0H2uDol6wHKCzNV/0Mcl7nHPsOyDZak6g+NwWdS4l ZOYmFyBGwU6BShKLGX+r2AcyJ1EbpeQZhHy8A64PIq7PskPIaIvCyzg7e/1rKohUtgsC 2YnFzxenDLf8YnIoSp4K97yT2Mtvk6XbH7WYhcxgL7qBUYA30br3r0jncLjiNmoOKgu9 GKvYvEyXmm+o2IzzDtmSlzoFVOPMNrQfmKQ005Dx2ZnB8MHeO1H/xtgxqzeIEoBZTkui Uhd9n+lwzRQEig5PKYdpc1HYWaY1hc6YBI/nc5h009v36JJ4T8siUspOl3KpJzC8xuWp XDRQ== X-Gm-Message-State: AOAM532Cg4b9gC0ln2zKajw3NyFFwZVHhLJAj8sgJRYr+Cpatuybb8A+ L3459gh/HO0L+7PbDTg+7tNypYQbG0H1dA== X-Google-Smtp-Source: ABdhPJzRI/3qCYQ6e6PXMT8KI9av6gsZ4BtA0CsNuEQ0fgmYh9TpzfX0XE/YYV9iMKOPuymxQSDRRg== X-Received: by 2002:a17:90a:b00b:: with SMTP id x11mr21608582pjq.67.1619426316048; Mon, 26 Apr 2021 01:38:36 -0700 (PDT) Received: from hiroh2.tok.corp.google.com ([2401:fa00:8f:2:a407:b8c2:d8b:a449]) by smtp.gmail.com with ESMTPSA id e18sm4873728pgr.8.2021.04.26.01.38.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Apr 2021 01:38:35 -0700 (PDT) From: Hirokazu Honda To: libcamera-devel@lists.libcamera.org Date: Mon, 26 Apr 2021 17:38:27 +0900 Message-Id: <20210426083830.2965095-1-hiroh@chromium.org> X-Mailer: git-send-email 2.31.1.498.g6c1eba8ee3d-goog MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v3 0/3] Support HAL3 API flush 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" This patch series implements flush and also fix potential races due to concurrent HAL API calls. Change in v3: - Separate CaptureRequest from Camera3RequestDescriptor to avoid touching invalid request - Introduce a new mutex for HAL calls Hirokazu Honda (3): android: CameraDevice: Separate CaptureRequest from Camera3RequestDescriptor android: CameraDevice: Prevent race due to concurrent HAL calls android: CameraDevice: Implement HAL3 API flush src/android/camera_device.cpp | 98 ++++++++++++++++++++++++----------- src/android/camera_device.h | 15 ++++-- src/android/camera_ops.cpp | 8 ++- 3 files changed, 85 insertions(+), 36 deletions(-) --- 2.31.1.498.g6c1eba8ee3d-goog