[{"id":5224,"web_url":"https://patchwork.libcamera.org/comment/5224/","msgid":"<20200616215153.GI913@pendragon.ideasonboard.com>","date":"2020-06-16T21:51:53","subject":"Re: [libcamera-devel] [PATCH v5 0/6] Introduce UVC hotplugging\n\tsupport","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Umang,\n\nOn Tue, Jun 16, 2020 at 07:45:32PM +0000, Umang Jain wrote:\n> v4->v5:\n>   - Rework \"libcamera: CameraManager: Drop the vector of created\n>     PipelineHandlers\" commit to guard against the possibility of\n>     pipeline handler getting deleted in PipelineHandler::disconnect().\n>     Add a _lot_ of documentation to it via commit message and a comment.\n>   - Make sure no use-after-free errors are present when the unit-test\n>     runs under valgrind. Fold the patch given by Laurent in previous\n>     review to properly address and document it.\n>   - Provide more past context to \"libcamera: CameraManager: Drop the\n>     vector of created PipelineHandlers\" in commit message, to 'why'\n>     pipes_ vector is not needed anymore.\n>   - Few typos fixes.\n> \n> v3->v4:\n>   - Introduce one additional commit to eliminate Pipehandlers' vector\n>     from CameraManager. It was leaving behind a leaked reference which\n>     was causing unclean unbind->bind operation (due to dangling dirs)\n>     for the hotplug unit test to run.\n>   - Simplify hotplug unit test with use of std::ofstream.\n>   - Change CameraManager::Private::addCamera() signature to accept\n>     Camera arg as pass-by-value instead of pass-by-reference.\n>   - qcam: Finalize HotplugEvent naming with ::HotPlug and ::HotUnplug\n>   - Few small improvements in commit messages and rebase. \n> \n> Umang Jain (6):\n>   libcamera: CameraManager: Drop the vector of created PipelineHandlers\n>   libcamera: camera_manager: Refactor pipelines creation into separate\n>     function\n>   libcamera: device_enumerator: Emit a signal when new devices are added\n>   libcamera: camera_manager: Introduce signals when a camera is added or\n>     removed\n>   qcam: main_window: Introduce initial hotplug support\n>   tests: Introduce hotplug hot-unplug unit test\n\nAll patches pushed to master. Thank you !\n\n>  include/libcamera/camera_manager.h            |   6 +-\n>  .../libcamera/internal/device_enumerator.h    |   4 +\n>  src/libcamera/camera_manager.cpp              |  65 ++++++---\n>  src/libcamera/device_enumerator.cpp           |  13 ++\n>  src/libcamera/pipeline_handler.cpp            |  20 ++-\n>  src/qcam/main_window.cpp                      |  76 +++++++++++\n>  src/qcam/main_window.h                        |   6 +\n>  test/hotplug-cameras.cpp                      | 128 ++++++++++++++++++\n>  test/meson.build                              |   1 +\n>  9 files changed, 298 insertions(+), 21 deletions(-)\n>  create mode 100644 test/hotplug-cameras.cpp","headers":{"Return-Path":"<laurent.pinchart@ideasonboard.com>","Received":["from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id AB545603C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 16 Jun 2020 23:52:16 +0200 (CEST)","from pendragon.ideasonboard.com (81-175-216-236.bb.dnainternet.fi\n\t[81.175.216.236])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id DFDB0F9;\n\tTue, 16 Jun 2020 23:52:15 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"iVHJd3Gb\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1592344336;\n\tbh=vsoH3A0HYhcGvWaQv2bOpZH25QiPDIUgGIWfdxpl74Y=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=iVHJd3GbovZ86VDYC4HiinRmI9r+MJDcV5mLPpfezS6cYV+peOOk1r0D0UOTGfKoq\n\tObJ5JVWVXbKDluBPex4kXoG0E8fK9i0hFGbedfWuuj/5ufuP1hjUJn8F2oGJw+sLzV\n\tMah2qyzPQe8smSUnCEPj8ozJbQ0qwze2iqfbUp1c=","Date":"Wed, 17 Jun 2020 00:51:53 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Umang Jain <email@uajain.com>","Cc":"kieran.bingham@ideasonboard.com, libcamera-devel@lists.libcamera.org","Message-ID":"<20200616215153.GI913@pendragon.ideasonboard.com>","References":"<20200616194523.23268-1-email@uajain.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20200616194523.23268-1-email@uajain.com>","Subject":"Re: [libcamera-devel] [PATCH v5 0/6] Introduce UVC hotplugging\n\tsupport","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>","X-List-Received-Date":"Tue, 16 Jun 2020 21:52:16 -0000"}},{"id":5233,"web_url":"https://patchwork.libcamera.org/comment/5233/","msgid":"<2d44d571-c862-65f9-5eaa-1ce4de2e30e7@uajain.com>","date":"2020-06-17T06:10:22","subject":"Re: [libcamera-devel] [PATCH v5 0/6] Introduce UVC hotplugging\n\tsupport","submitter":{"id":1,"url":"https://patchwork.libcamera.org/api/people/1/","name":"Umang Jain","email":"email@uajain.com"},"content":"Hi Laurent, Kieran,\n\nOn 6/17/20 3:21 AM, Laurent Pinchart wrote:\n> Hi Umang,\n>\n> On Tue, Jun 16, 2020 at 07:45:32PM +0000, Umang Jain wrote:\n>> v4->v5:\n>>    - Rework \"libcamera: CameraManager: Drop the vector of created\n>>      PipelineHandlers\" commit to guard against the possibility of\n>>      pipeline handler getting deleted in PipelineHandler::disconnect().\n>>      Add a _lot_ of documentation to it via commit message and a comment.\n>>    - Make sure no use-after-free errors are present when the unit-test\n>>      runs under valgrind. Fold the patch given by Laurent in previous\n>>      review to properly address and document it.\n>>    - Provide more past context to \"libcamera: CameraManager: Drop the\n>>      vector of created PipelineHandlers\" in commit message, to 'why'\n>>      pipes_ vector is not needed anymore.\n>>    - Few typos fixes.\n>>\n>> v3->v4:\n>>    - Introduce one additional commit to eliminate Pipehandlers' vector\n>>      from CameraManager. It was leaving behind a leaked reference which\n>>      was causing unclean unbind->bind operation (due to dangling dirs)\n>>      for the hotplug unit test to run.\n>>    - Simplify hotplug unit test with use of std::ofstream.\n>>    - Change CameraManager::Private::addCamera() signature to accept\n>>      Camera arg as pass-by-value instead of pass-by-reference.\n>>    - qcam: Finalize HotplugEvent naming with ::HotPlug and ::HotUnplug\n>>    - Few small improvements in commit messages and rebase.\n>>\n>> Umang Jain (6):\n>>    libcamera: CameraManager: Drop the vector of created PipelineHandlers\n>>    libcamera: camera_manager: Refactor pipelines creation into separate\n>>      function\n>>    libcamera: device_enumerator: Emit a signal when new devices are added\n>>    libcamera: camera_manager: Introduce signals when a camera is added or\n>>      removed\n>>    qcam: main_window: Introduce initial hotplug support\n>>    tests: Introduce hotplug hot-unplug unit test\n> All patches pushed to master. Thank you !\nThank you for all the reviews and hand-holding through various hairy bits :)\n>\n>>   include/libcamera/camera_manager.h            |   6 +-\n>>   .../libcamera/internal/device_enumerator.h    |   4 +\n>>   src/libcamera/camera_manager.cpp              |  65 ++++++---\n>>   src/libcamera/device_enumerator.cpp           |  13 ++\n>>   src/libcamera/pipeline_handler.cpp            |  20 ++-\n>>   src/qcam/main_window.cpp                      |  76 +++++++++++\n>>   src/qcam/main_window.h                        |   6 +\n>>   test/hotplug-cameras.cpp                      | 128 ++++++++++++++++++\n>>   test/meson.build                              |   1 +\n>>   9 files changed, 298 insertions(+), 21 deletions(-)\n>>   create mode 100644 test/hotplug-cameras.cpp","headers":{"Return-Path":"<bounces+15657259-5c31-libcamera-devel=lists.libcamera.org@em7280.uajain.com>","Received":["from o1.f.az.sendgrid.net (o1.f.az.sendgrid.net [208.117.55.132])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id E5909603C4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 17 Jun 2020 08:10:23 +0200 (CEST)","by filterdrecv-p3mdw1-66f8c6985f-kcqm7 with SMTP id\n\tfilterdrecv-p3mdw1-66f8c6985f-kcqm7-18-5EE9B3CE-B\n\t2020-06-17 06:10:22.40045764 +0000 UTC m=+22256.281854845","from mail.uajain.com (unknown)\n\tby ismtpd0006p1maa1.sendgrid.net (SG) with ESMTP\n\tid dic60TqtSN6asxlTfIDvrQ Wed, 17 Jun 2020 06:10:22.036 +0000 (UTC)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=uajain.com\n\theader.i=@uajain.com header.b=\"XhjDxOLy\"; \n\tdkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=uajain.com;\n\th=subject:references:from:mime-version:in-reply-to:to:cc:content-type:\n\tcontent-transfer-encoding;\n\ts=s1; bh=tt8sXzdVeTKA/dBTGvdGLRYCWIJ1qG4TtW6t10qRxnU=;\n\tb=XhjDxOLynC3agkW+YmUOoLsDRxGA5HWYYzawMTJ0Of6iAmM8s+g9mcxo5MWS8JXRxO52\n\tHTiRaMREQoDP/HQrwNpoAA6QemGzx1e+JFpfBSPNpAjDSTGBNWJBh5k9j+wM3pBtnbLpGt\n\tUXt3CsKkM8NsvZwehYC1oVJ9UV3G7SJYE=","References":"<20200616194523.23268-1-email@uajain.com>\n\t<20200616215153.GI913@pendragon.ideasonboard.com>","From":"Umang Jain <email@uajain.com>","Message-ID":"<2d44d571-c862-65f9-5eaa-1ce4de2e30e7@uajain.com>","Date":"Wed, 17 Jun 2020 06:10:22 +0000 (UTC)","Mime-Version":"1.0","In-Reply-To":"<20200616215153.GI913@pendragon.ideasonboard.com>","X-SG-EID":"1Q40EQ7YGir8a9gjSIAdTjhngY657NMk9ckeo4dbHZDiOpywc/L3L9rFqlwE4KPcO0wIVNwfic3Culi7Uik3l7nFBqwmmCE2wjSmfhd3MOxBHWM8lZC7E+8TSZ4bceuzQSQQINC32DwfcdCF3yfT3T+lD6wqD+Hwnp3iOCvhsNzF4AX8eoh6sscjOovx58itr0EGCcohQQjo3uoyvFK9ehRgiGCBPl01LXe+77AwDD7OU9AEbzC9SnGxNz0rDRnUa8MI+2L5wRl2vvkblGbRcw==","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"kieran.bingham@ideasonboard.com, libcamera-devel@lists.libcamera.org","Content-Type":"text/plain; charset=us-ascii; format=flowed","Content-Transfer-Encoding":"7bit","Content-Language":"en-US","Subject":"Re: [libcamera-devel] [PATCH v5 0/6] Introduce UVC hotplugging\n\tsupport","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>","X-List-Received-Date":"Wed, 17 Jun 2020 06:10:24 -0000"}}]