[{"id":28709,"web_url":"https://patchwork.libcamera.org/comment/28709/","msgid":"<20240221131352.GC18146@pendragon.ideasonboard.com>","date":"2024-02-21T13:13:52","subject":"Re: The first valid settings should be saved","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Hui,\n\nThank you for the patch.\n\nOn Wed, Feb 21, 2024 at 01:38:00PM +0800, hui fang wrote:\n> The first valid settings should be saved, or will be deferred to the next frame.\n\nThis is missing a Signed-off-by tag, and the subject is missing a\nprefix. Both issues should have been caught by the checkstyle.py\nutility part of libcamera.\n\nPlease see https://libcamera.org/contributing.html#submitting-patches\nfor more information about Signed-off-by, and\nhttps://libcamera.org/coding-style.html#tools for more information about\nthe coding style and checkstyle.py utility.\n\n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 25cedd44..d45ed1a5 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -952,8 +952,8 @@ int CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques\n>          */\n>         if (camera3Request->settings)\n>                 lastSettings_ = camera3Request->settings;\n> -       else\n> -               descriptor->settings_ = lastSettings_;\n> +\n> +       descriptor->settings_ = lastSettings_;","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 6A131BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 21 Feb 2024 13:13:50 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id BD21462816;\n\tWed, 21 Feb 2024 14:13:49 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 05EDE61C9D\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 21 Feb 2024 14:13:49 +0100 (CET)","from pendragon.ideasonboard.com (89-27-53-110.bb.dnainternet.fi\n\t[89.27.53.110])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D75803F1;\n\tWed, 21 Feb 2024 14:13:40 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"M/bQUNce\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1708521221;\n\tbh=+SuUvgdBMtHQ8/i30rpSWuwGfJ15x77J+Hph+GmvEO4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=M/bQUNceky/FPIv4zV9UyWEr2I01gm6qRGV+LrdoqpK93K5JiajvQzfkhOTmNSi+7\n\t5Ef9qqZQ3ZtANtipXrqJHquRKNYIJnu+o+oLexNVy+zm3AlMTUzL9h1DA/9z7A0y/K\n\tLkTd/2ZUMElGkuhGcW4BxUY+3vADOxKSiCkhAZRg=","Date":"Wed, 21 Feb 2024 15:13:52 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"hui fang <biomifang118@gmail.com>","Subject":"Re: The first valid settings should be saved","Message-ID":"<20240221131352.GC18146@pendragon.ideasonboard.com>","References":"<CANWxtmn7ZNYWnPPsN7AsEQbfPXfHLLpa8tXAeZ33s1C_-aWhxQ@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CANWxtmn7ZNYWnPPsN7AsEQbfPXfHLLpa8tXAeZ33s1C_-aWhxQ@mail.gmail.com>","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28712,"web_url":"https://patchwork.libcamera.org/comment/28712/","msgid":"<CANWxtmkZBK=8=9YxniHB3b8TC-KVPpE=o3fVd-Lj=DFVUa00Cw@mail.gmail.com>","date":"2024-02-23T03:26:29","subject":"Re: The first valid settings should be saved","submitter":{"id":185,"url":"https://patchwork.libcamera.org/api/people/185/","name":"hui fang","email":"biomifang118@gmail.com"},"content":"commit 4c220580fc2c71a978dc768619b6e65f3a5aea4a (HEAD -> master)\nAuthor: Fang Hui <hui.fang@nxp.com>\nDate:   Thu Jan 25 02:11:04 2024 +0800\n\n    android: camera_device: The first valid settings should be saved\n\n    If not, it will be deferred to the next frame.\n\n    Signed-off-by: Fang Hui <hui.fang@nxp.com>\n\ndiff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\nindex 25cedd44..d45ed1a5 100644\n--- a/src/android/camera_device.cpp\n+++ b/src/android/camera_device.cpp\n@@ -952,8 +952,8 @@ int\nCameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques\n         */\n        if (camera3Request->settings)\n                lastSettings_ = camera3Request->settings;\n-       else\n-               descriptor->settings_ = lastSettings_;\n+\n+       descriptor->settings_ = lastSettings_;\n\n        LOG(HAL, Debug) << \"Queueing request \" <<\ndescriptor->request_->cookie()\n                        << \" with \" << descriptor->buffers_.size() << \"\nstreams\";\n\n\nBRs,\nFang Hui\n\nLaurent Pinchart <laurent.pinchart@ideasonboard.com> 于2024年2月21日周三 21:13写道：\n\n> Hi Hui,\n>\n> Thank you for the patch.\n>\n> On Wed, Feb 21, 2024 at 01:38:00PM +0800, hui fang wrote:\n> > The first valid settings should be saved, or will be deferred to the\n> next frame.\n>\n> This is missing a Signed-off-by tag, and the subject is missing a\n> prefix. Both issues should have been caught by the checkstyle.py\n> utility part of libcamera.\n>\n> Please see https://libcamera.org/contributing.html#submitting-patches\n> for more information about Signed-off-by, and\n> https://libcamera.org/coding-style.html#tools for more information about\n> the coding style and checkstyle.py utility.\n>\n> > diff --git a/src/android/camera_device.cpp\n> b/src/android/camera_device.cpp\n> > index 25cedd44..d45ed1a5 100644\n> > --- a/src/android/camera_device.cpp\n> > +++ b/src/android/camera_device.cpp\n> > @@ -952,8 +952,8 @@ int\n> CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques\n> >          */\n> >         if (camera3Request->settings)\n> >                 lastSettings_ = camera3Request->settings;\n> > -       else\n> > -               descriptor->settings_ = lastSettings_;\n> > +\n> > +       descriptor->settings_ = lastSettings_;\n>\n> --\n> Regards,\n>\n> Laurent Pinchart\n>","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 4B497BD80A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Feb 2024 03:26:44 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 747FD627FC;\n\tFri, 23 Feb 2024 04:26:43 +0100 (CET)","from mail-wr1-x431.google.com (mail-wr1-x431.google.com\n\t[IPv6:2a00:1450:4864:20::431])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 144AE61C99\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Feb 2024 04:26:42 +0100 (CET)","by mail-wr1-x431.google.com with SMTP id\n\tffacd0b85a97d-33d6bd39470so188174f8f.3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 22 Feb 2024 19:26:42 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"O+bf5jwn\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20230601; t=1708658801; x=1709263601;\n\tdarn=lists.libcamera.org; \n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:from:to:cc:subject:date:message-id:reply-to;\n\tbh=NicMrE04kHEQJlxa/tpjPthBFSrOhHrPH1Kw34Z8pts=;\n\tb=O+bf5jwnIr36Y38dyFA7nWgfkgPvDBOH6aD3OdEmRH6kGWkIbLiwRMq2cfKAVqRaTq\n\tNgKNivxx0VT3uxCcK78GdJHAk3/Iw8dGTHshDVqu5YpjNYu+n+IqmOGdTNemlkjuUKUT\n\tNgKmHqLDiwx67M80Lm6V0CfZp4dVtI0bRP6s3aT1J7zu+uHbJpMN3e3lbzk7nfDWrB/z\n\tSR71Lz1c3X1RNUz32VhkBEMDsLv6Yh9+I2Rl2+Izo9sYDhHVSmjmwRRm8rJPlpLcElYH\n\tr6sUrk5iN16CwPBghsml5FIKIh6PiCEk+35sKmXLL5SrVC5K02QP9Gz52VdoOQoLhZpA\n\tlEdA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20230601; t=1708658801; x=1709263601;\n\th=cc:to:subject:message-id:date:from:in-reply-to:references\n\t:mime-version:x-gm-message-state:from:to:cc:subject:date:message-id\n\t:reply-to;\n\tbh=NicMrE04kHEQJlxa/tpjPthBFSrOhHrPH1Kw34Z8pts=;\n\tb=YO3yxGdp+zTkCVDz+A/5X6M1pYWskyex8XOg8srtSkCwKrd9X97FOogRdcqLEJrpjM\n\t3xjzyUUiTvL3P+QYDuxMsQhHCddHrXQYh7b0/RZECnNrZ3jHx7cD8TJVcyv6uOBxGcfg\n\tNRDPHnoBNWb2dB5zGcw+BQ1UecYAMAMa3Fm6uE46FxQ0QvznlfpX7V9GydD0lajyFnis\n\tzh0bAkRX9zvp/qlzs91SSlKn9FpQJL4PGz+18VLVODzYfvlZoCB08kXt6Mh/VnudDGcV\n\tpR4j+yUNm4lQVu7LqUfRpc+yYVgPo5d1PTLrINbVyf4MeT8VwovabtBuftCOSeskOgGz\n\tIeBg==","X-Gm-Message-State":"AOJu0Yz20ye/gT57RHh+zHMTzplRKh+O8tzQpYeYmQgvNuhPL0Fdaypq\n\tUSQ9Cd3i1+aimoo17roB/VNKxQg+XyexbAYz92WxFPwqlJUbbCQP1qlnhngk1ldnwf2QupfWce4\n\tTHcnEwj18wTCq8uSkguo7+4eLDkOF48PykCogGQ==","X-Google-Smtp-Source":"AGHT+IH0tPbAPLw8HOBb/C3+69p/CSFZkfMoAcT5mSxAEQvtUhf9XG32MVL5ojc9M4X74peMfGJ5HczFd6k7GQYr+34=","X-Received":"by 2002:a5d:5547:0:b0:33d:93c8:af96 with SMTP id\n\tg7-20020a5d5547000000b0033d93c8af96mr529566wrw.9.1708658801164;\n\tThu, 22 Feb 2024 19:26:41 -0800 (PST)","MIME-Version":"1.0","References":"<CANWxtmn7ZNYWnPPsN7AsEQbfPXfHLLpa8tXAeZ33s1C_-aWhxQ@mail.gmail.com>\n\t<20240221131352.GC18146@pendragon.ideasonboard.com>","In-Reply-To":"<20240221131352.GC18146@pendragon.ideasonboard.com>","From":"hui fang <biomifang118@gmail.com>","Date":"Fri, 23 Feb 2024 11:26:29 +0800","Message-ID":"<CANWxtmkZBK=8=9YxniHB3b8TC-KVPpE=o3fVd-Lj=DFVUa00Cw@mail.gmail.com>","Subject":"Re: The first valid settings should be saved","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"multipart/alternative; boundary=\"000000000000e2c44a061204205e\"","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28713,"web_url":"https://patchwork.libcamera.org/comment/28713/","msgid":"<26olgou33hrogwbw2zym4fnqhnc4le6ba6r2kkm572ixlpk5er@sb6bxslu6222>","date":"2024-02-23T08:21:05","subject":"Re: The first valid settings should be saved","submitter":{"id":143,"url":"https://patchwork.libcamera.org/api/people/143/","name":"Jacopo Mondi","email":"jacopo.mondi@ideasonboard.com"},"content":"Hello Fang Hui\n   thanks for your patch\n\nThe patch does not seem to be in a valid format, it is being\ncopied into an email ? Could you have a read to https://git-send-email.io/\nand try it ? :)\n\nOn Fri, Feb 23, 2024 at 11:26:29AM +0800, hui fang wrote:\n> commit 4c220580fc2c71a978dc768619b6e65f3a5aea4a (HEAD -> master)\n> Author: Fang Hui <hui.fang@nxp.com>\n> Date:   Thu Jan 25 02:11:04 2024 +0800\n>\n>     android: camera_device: The first valid settings should be saved\n>\n>     If not, it will be deferred to the next frame.\n\nOn the patch itself, if I get the issue right, the problem is that the\nvery first frame won't have descriptor->settings_ initialized and you\npatch indeed fixes this. How did you detect the problem, did you get run-time\nerrors or was that just from looking at the code (I'm asking to know\nwhat test I could run to reproduce the issue).\n\nThanks\n  j\n\n>\n>     Signed-off-by: Fang Hui <hui.fang@nxp.com>\n>\n> diff --git a/src/android/camera_device.cpp b/src/android/camera_device.cpp\n> index 25cedd44..d45ed1a5 100644\n> --- a/src/android/camera_device.cpp\n> +++ b/src/android/camera_device.cpp\n> @@ -952,8 +952,8 @@ int\n> CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques\n>          */\n>         if (camera3Request->settings)\n>                 lastSettings_ = camera3Request->settings;\n> -       else\n> -               descriptor->settings_ = lastSettings_;\n> +\n> +       descriptor->settings_ = lastSettings_;\n>\n>         LOG(HAL, Debug) << \"Queueing request \" <<\n> descriptor->request_->cookie()\n>                         << \" with \" << descriptor->buffers_.size() << \"\n> streams\";\n>\n>\n> BRs,\n> Fang Hui\n>\n> Laurent Pinchart <laurent.pinchart@ideasonboard.com> 于2024年2月21日周三 21:13写道：\n>\n> > Hi Hui,\n> >\n> > Thank you for the patch.\n> >\n> > On Wed, Feb 21, 2024 at 01:38:00PM +0800, hui fang wrote:\n> > > The first valid settings should be saved, or will be deferred to the\n> > next frame.\n> >\n> > This is missing a Signed-off-by tag, and the subject is missing a\n> > prefix. Both issues should have been caught by the checkstyle.py\n> > utility part of libcamera.\n> >\n> > Please see https://libcamera.org/contributing.html#submitting-patches\n> > for more information about Signed-off-by, and\n> > https://libcamera.org/coding-style.html#tools for more information about\n> > the coding style and checkstyle.py utility.\n> >\n> > > diff --git a/src/android/camera_device.cpp\n> > b/src/android/camera_device.cpp\n> > > index 25cedd44..d45ed1a5 100644\n> > > --- a/src/android/camera_device.cpp\n> > > +++ b/src/android/camera_device.cpp\n> > > @@ -952,8 +952,8 @@ int\n> > CameraDevice::processCaptureRequest(camera3_capture_request_t *camera3Reques\n> > >          */\n> > >         if (camera3Request->settings)\n> > >                 lastSettings_ = camera3Request->settings;\n> > > -       else\n> > > -               descriptor->settings_ = lastSettings_;\n> > > +\n> > > +       descriptor->settings_ = lastSettings_;\n> >\n> > --\n> > Regards,\n> >\n> > Laurent Pinchart\n> >","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 22500C0F1B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 23 Feb 2024 08:21:13 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 4AE6D627FD;\n\tFri, 23 Feb 2024 09:21:12 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 67DFE627FC\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 23 Feb 2024 09:21:09 +0100 (CET)","from ideasonboard.com (unknown\n\t[IPv6:2001:b07:5d2e:52c9:cc1e:e404:491f:e6ea])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 1D1B12E7;\n\tFri, 23 Feb 2024 09:21:00 +0100 (CET)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"kOsFRWtP\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1708676460;\n\tbh=NGQ39cf6a/5OYzin935JZ6UYrinwOnTsB91cwH/MyT4=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=kOsFRWtPmS7Gh5LLENATXzM2j9aN3Zq/RAeYqb5ksevFb9snSMGVRdobGSNL1t7yb\n\t0BZljEcSJNSKgrUwqSj/1XSPNuIyqQflkoDvSIqowqulmkdRLFhBonfMf3QL02ZQA8\n\tlSncdqUCEGLusuSF/WVzjRhFX7KzLNOuXcDqLneI=","Date":"Fri, 23 Feb 2024 09:21:05 +0100","From":"Jacopo Mondi <jacopo.mondi@ideasonboard.com>","To":"hui fang <biomifang118@gmail.com>","Subject":"Re: The first valid settings should be saved","Message-ID":"<26olgou33hrogwbw2zym4fnqhnc4le6ba6r2kkm572ixlpk5er@sb6bxslu6222>","References":"<CANWxtmn7ZNYWnPPsN7AsEQbfPXfHLLpa8tXAeZ33s1C_-aWhxQ@mail.gmail.com>\n\t<20240221131352.GC18146@pendragon.ideasonboard.com>\n\t<CANWxtmkZBK=8=9YxniHB3b8TC-KVPpE=o3fVd-Lj=DFVUa00Cw@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<CANWxtmkZBK=8=9YxniHB3b8TC-KVPpE=o3fVd-Lj=DFVUa00Cw@mail.gmail.com>","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>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]