From patchwork Sun Aug 18 01:13:15 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1837 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5A9A960BE5 for ; Sun, 18 Aug 2019 03:13:40 +0200 (CEST) Received: from pendragon.bb.dnainternet.fi (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id C95F62AF for ; Sun, 18 Aug 2019 03:13:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1566090820; bh=JPGCH7895pQKeas4XQ+reYd9zfSrpmrSHkBOhAKjiYg=; h=From:To:Subject:Date:From; b=VaaADpdI3WUNUiSxIz7QXvEp+grY9x71uNT6ub80vtqOAmIZikdAvID9ZD/AQPkG9 QKsXarBdIu6nZhQ6Sf42HiaRhtjuyx94GtlLmjWmZZUC8mzCZ/2UKPNPeElhc7ZHBD KnZlJJVRFJF+Ib6Ua9z5e5eCgnCIkTG7LgGtGyXU= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Sun, 18 Aug 2019 04:13:15 +0300 Message-Id: <20190818011329.14499-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 00/14] Assorted fixes for Android camera HAL X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Aug 2019 01:13:40 -0000 Hello, While trying to debug an issue on a recent Chromium OS image, I noticed that the camera service crashes when exiting. Investigating the issue led to this patch series. The main goal of this series is to improve destruction of resources at cleanup time, mainly through removal of the CameraManager::instance() method and making the CameraManager class manually constructible. The rationale is explained in path 13/14. Patches 01/14, 05/14, 06/14 and 09/14 are miscellaneous fixes (with 05/14 notably fixing a compilation error on Chromium OS). Patches 02/14 to 04/14, 07/14 and 08/14 then follow by preparing for the removal of CameraManager::instance(). Patch 10/14 to 14/14 free, release or destroy resources in the camera HAL at cleanup time, with 13/14 removing Camera::instance() tree-wide. I would like to fast-track at least 05/14 to fix the build, reviews will be appreciated. Laurent Pinchart (14): libcamera: device_enumerator: Print media device name in error message libcamera: proxy: Get event dispatcher from current thread qcam: Remove double stop of the camera manager qcam: Pass camera manager to MainWindow class test: event-thread: Fix compilation on Chromium OS test: unixsocket: Fix typo in error message test: Get event dispatcher from current thread test: camera: Use the CameraManager from the CameraTest base class android: Pass Camera shared pointer to CameraDevice by const reference android: camera_hal_manager: Stop thread when destroying android: camera_hal_manager: Remove unused close() method android: camera_hal_manager: Clean up resources when terminating libcamera: camera_manager: Construct CameraManager instances manually android: camera_device: Store static metadata in cache include/libcamera/camera_manager.h | 12 ++--- src/android/camera_device.cpp | 44 +++++++++---------- src/android/camera_device.h | 2 +- src/android/camera_hal_manager.cpp | 28 +++++++----- src/android/camera_hal_manager.h | 3 +- src/android/camera_proxy.cpp | 2 +- src/android/camera_proxy.h | 2 +- src/cam/main.cpp | 8 +++- src/libcamera/camera_manager.cpp | 36 +++++++-------- src/libcamera/device_enumerator.cpp | 3 +- .../proxy/worker/ipa_proxy_linux_worker.cpp | 4 +- src/qcam/main.cpp | 6 ++- src/qcam/main_window.cpp | 9 ++-- src/qcam/main_window.h | 5 ++- test/camera/buffer_import.cpp | 2 +- test/camera/camera_test.cpp | 3 +- test/camera/camera_test.h | 4 +- test/camera/capture.cpp | 2 +- test/controls/control_list.cpp | 3 +- test/event-dispatcher.cpp | 4 +- test/event-thread.cpp | 6 ++- test/event.cpp | 4 +- test/ipc/unixsocket.cpp | 8 ++-- test/list-cameras.cpp | 11 ++--- test/log/log_process.cpp | 4 +- test/meson.build | 6 +-- test/object-invoke.cpp | 3 +- test/pipeline/ipu3/ipu3_pipeline_test.cpp | 3 +- test/process/process_test.cpp | 4 +- test/timer.cpp | 4 +- test/v4l2_videodevice/buffer_sharing.cpp | 4 +- test/v4l2_videodevice/capture_async.cpp | 4 +- test/v4l2_videodevice/v4l2_m2mdevice.cpp | 4 +- 33 files changed, 132 insertions(+), 115 deletions(-)