{"id":10038,"url":"https://patchwork.libcamera.org/api/1.1/covers/10038/?format=json","web_url":"https://patchwork.libcamera.org/cover/10038/","project":{"id":1,"url":"https://patchwork.libcamera.org/api/1.1/projects/1/?format=json","name":"libcamera","link_name":"libcamera","list_id":"libcamera_core","list_email":"libcamera-devel@lists.libcamera.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20201009133956.77396-1-jacopo@jmondi.org>","date":"2020-10-09T13:39:54","name":"[libcamera-devel,0/2] android: Introduce CameraWorker","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/1.1/people/3/?format=json","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"mbox":"https://patchwork.libcamera.org/cover/10038/mbox/","series":[{"id":1371,"url":"https://patchwork.libcamera.org/api/1.1/series/1371/?format=json","web_url":"https://patchwork.libcamera.org/project/libcamera/list/?series=1371","date":"2020-10-09T13:39:54","name":"android: Introduce CameraWorker","version":1,"mbox":"https://patchwork.libcamera.org/series/1371/mbox/"}],"comments":"https://patchwork.libcamera.org/api/covers/10038/comments/","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B2B21BEEE0\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  9 Oct 2020 13:36:28 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5A15660730;\n\tFri,  9 Oct 2020 15:36:28 +0200 (CEST)","from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net\n\t[217.70.183.199])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 52F5360358\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  9 Oct 2020 15:36:27 +0200 (CEST)","from uno.lan (93-34-118-233.ip49.fastwebnet.it [93.34.118.233])\n\t(Authenticated sender: jacopo@jmondi.org)\n\tby relay9-d.mail.gandi.net (Postfix) with ESMTPSA id CC0C2FF80E;\n\tFri,  9 Oct 2020 13:36:26 +0000 (UTC)"],"X-Originating-IP":"93.34.118.233","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"libcamera-devel@lists.libcamera.org","Date":"Fri,  9 Oct 2020 15:39:54 +0200","Message-Id":"<20201009133956.77396-1-jacopo@jmondi.org>","X-Mailer":"git-send-email 2.28.0","MIME-Version":"1.0","Subject":"[libcamera-devel] [PATCH 0/2] android: Introduce CameraWorker","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"},"content":"This two small patches implement a worker in the libcamera HAL that is used to\nhandle synchronization fences before queueing a Request to the\nlibcamera::Camera.\n\nThe camera framework provides for each buffer part of a capture request\nan acquisition fence the camera HAL is supposed to wait on before using\nthe buffer. The wait procedure cannot be performed in the Camera HAL thread, as\nthe HAL runs in the camera service thread.\n\nThe CameraWorker::Worker::waitFence() function implementes the same mechanism as\nthe libdrm provided sync_wait() function without introducing an explicit\ndependency in libcamera.\n\nCompared to the RFC version the following has changed:\n- Add a start()/stop() function to start and stop the Worker thread and\n  call them from the CameraDevice at Camera::stop() and Camera::start() time\n- Add CaptureRequest::queue(Camera *camera) and CaptureRequest::fences()\n  methods to remove friend statement in CaptureRequest\n- Add more context to 1/2 commit message\n\nRework will be needed to rebase on the reusable Request patch.\n\nThanks\n   j\n\nJacopo Mondi (2):\n  android: camera_worker: Introduce CameraWorker\n  android: camera_device: Queue request to Worker\n\n src/android/camera_device.cpp | 19 ++++----\n src/android/camera_device.h   |  3 ++\n src/android/camera_worker.cpp | 88 +++++++++++++++++++++++++++++++++++\n src/android/camera_worker.h   | 73 +++++++++++++++++++++++++++++\n src/android/meson.build       |  1 +\n 5 files changed, 174 insertions(+), 10 deletions(-)\n create mode 100644 src/android/camera_worker.cpp\n create mode 100644 src/android/camera_worker.h\n\n--\n2.28.0"}