[{"id":21877,"web_url":"https://patchwork.libcamera.org/comment/21877/","msgid":"<YcU8Cda4PzFdtOUm@pendragon.ideasonboard.com>","date":"2021-12-24T03:18:33","subject":"Re: [libcamera-devel] [PATCH 1/3] include: linux: Add\n\tV4L2_CID_NOTIFY_GAINS control","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nThank you for the patch.\n\nOn Thu, Dec 23, 2021 at 08:01:08AM +0000, David Plowman wrote:\n> Add this control which is already present upstream.\n\nWe have a process to update the kernel headers. If possible, please use\nutils/update-kernel-headers.sh. You will need to then pick changes\nmanually to avoid dropping the currently not upstream features. The git\nlog for the include/linux/ directory can show you examples.\n\n> Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> ---\n>  include/linux/v4l2-controls.h | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> index 59a57418..9db06cb2 100644\n> --- a/include/linux/v4l2-controls.h\n> +++ b/include/linux/v4l2-controls.h\n> @@ -1109,6 +1109,7 @@ enum v4l2_jpeg_chroma_subsampling {\n>  #define V4L2_CID_TEST_PATTERN_BLUE\t\t(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)\n>  #define V4L2_CID_TEST_PATTERN_GREENB\t\t(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)\n>  #define V4L2_CID_UNIT_CELL_SIZE\t\t\t(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8)\n> +#define V4L2_CID_NOTIFY_GAINS\t\t\t(V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 9)\n>  \n>  \n>  /* Image processing controls */","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 DCE77BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 24 Dec 2021 03:18:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3B3A660909;\n\tFri, 24 Dec 2021 04:18:40 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6797B608E3\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 24 Dec 2021 04:18:38 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D8E4771;\n\tFri, 24 Dec 2021 04:18:37 +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=\"BwG148mB\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1640315918;\n\tbh=S6OhcYMKr4DjOUllxm+GVxSXLY/2Z/3XWhayASARW7Q=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=BwG148mBEXWzDOFq4/f3JUzKILXPUpG1O3I7gR7WOLC5ZTHDlvg8H4p+tmhL7RQRS\n\t7yvRaA2wG4fl7MY7+Nf4jVCp6Y0M1bN0ETriU16x38nKGQ3anF9wQpsPAdoRtJBOHp\n\tex/7Q+ARDps0TrcU2cZBLLSvmYyaMKiTkxhzGhiQ=","Date":"Fri, 24 Dec 2021 05:18:33 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<YcU8Cda4PzFdtOUm@pendragon.ideasonboard.com>","References":"<20211223080110.9766-1-david.plowman@raspberrypi.com>\n\t<20211223080110.9766-2-david.plowman@raspberrypi.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20211223080110.9766-2-david.plowman@raspberrypi.com>","Subject":"Re: [libcamera-devel] [PATCH 1/3] include: linux: Add\n\tV4L2_CID_NOTIFY_GAINS control","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":21911,"web_url":"https://patchwork.libcamera.org/comment/21911/","msgid":"<CAHW6GYKODRK2VjK-pt_OGQ14hNod9UJn3OiczDVkGwpdXnOc=g@mail.gmail.com>","date":"2021-12-30T10:52:54","subject":"Re: [libcamera-devel] [PATCH 1/3] include: linux: Add\n\tV4L2_CID_NOTIFY_GAINS control","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Laurent\n\nSure, I can do that. Could you perhaps give me a few more hints, I\ndidn't really understand how looking at commits in include/linux was\nhelping me. Anyway, here's what I've done:\n\n1. I've cloned the whole of linuxtv-master onto my Pi.\n2. I've run \"utils/update-kernel-headers.sh <path-to-my-linuxtv-master>\n3. There were some warnings about intel-ipu3.h being missing, I assume\nI can ignore that.\n4. Now I have about 7 files in include/linux that show up as\n\"modified\", and one (intel-ipu3.h) is \"deleted\".\n\nI'm guessing I shouldn't try and commit them all, so should I commit\njust the one file that I care about (v4l2-controls.h)? But I can't\ncommit the whole v4l2-controls.h either, not least because it doesn't\ncompile (V4L2_CID_USER_BCM2835_ISP_BASE has disappeared), and it has\nlots of other changes too. So maybe I just pick the single line that I\nwant? (only now it doesn't seem any different to what I did). So I've\nrather managed to confuse myself!\n\nThanks for your help!\n\nBest regards\nDavid\n\nOn Fri, 24 Dec 2021 at 03:18, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi David,\n>\n> Thank you for the patch.\n>\n> On Thu, Dec 23, 2021 at 08:01:08AM +0000, David Plowman wrote:\n> > Add this control which is already present upstream.\n>\n> We have a process to update the kernel headers. If possible, please use\n> utils/update-kernel-headers.sh. You will need to then pick changes\n> manually to avoid dropping the currently not upstream features. The git\n> log for the include/linux/ directory can show you examples.\n>\n> > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > ---\n> >  include/linux/v4l2-controls.h | 1 +\n> >  1 file changed, 1 insertion(+)\n> >\n> > diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> > index 59a57418..9db06cb2 100644\n> > --- a/include/linux/v4l2-controls.h\n> > +++ b/include/linux/v4l2-controls.h\n> > @@ -1109,6 +1109,7 @@ enum v4l2_jpeg_chroma_subsampling {\n> >  #define V4L2_CID_TEST_PATTERN_BLUE           (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)\n> >  #define V4L2_CID_TEST_PATTERN_GREENB         (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)\n> >  #define V4L2_CID_UNIT_CELL_SIZE                      (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8)\n> > +#define V4L2_CID_NOTIFY_GAINS                        (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 9)\n> >\n> >\n> >  /* Image processing controls */\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 1B5A3BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Dec 2021 10:53:10 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6F1AF6090D;\n\tThu, 30 Dec 2021 11:53:09 +0100 (CET)","from mail-wm1-x329.google.com (mail-wm1-x329.google.com\n\t[IPv6:2a00:1450:4864:20::329])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 437E4604F6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Dec 2021 11:53:07 +0100 (CET)","by mail-wm1-x329.google.com with SMTP id\n\tn14-20020a7bcbce000000b00332f4abf43fso7818863wmi.0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Dec 2021 02:53:07 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"q/XU3Axw\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=VuwlDwjZmMWDLgvqmtFJN0EyldiXCDMRGTPhQ+Z+oB4=;\n\tb=q/XU3AxwSkf1IhZNkwSN7XI4jIRWYEomSXaHGLdYwqmsrJriiSoGNbSrpm/xbSw656\n\tbB6ZHtU3n9On4SKfnWoZHxaKsv/LlxlBpF6OIX7L+2AWVtu5AItTdxMLKFPBhNbVnGQu\n\te0qHOnsaptdHH2kIuEpVPRCsoeTH4Ueh1R/vVTeZtD9y0h7z02syq3ZdR6qVzByCPyBJ\n\terSjjNC60P9nxd7z6COQQmdr0MlUaQBOZGwH0XBqhcM1ezZU7o5p8k6NXUt0wofBCM8j\n\tzU/UdzO+cLhZQP8H81o33rgiSeqCRGKbH7m8+lF4i1zIXFBE3M80Ir8Qb8DFz10IJZrP\n\tPpKQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=VuwlDwjZmMWDLgvqmtFJN0EyldiXCDMRGTPhQ+Z+oB4=;\n\tb=VW3J/bliLwv5Q0GFOIsm+5skZnZ0V/EyFUpwc5RSd1/mCJClSxqXhui/4p3es39mp8\n\t0i7vkh5lc+cFLMu9OyK7qPazUmJP3qVB6qCnYCjyOKZZDTXWAyu65ztAQCQoiZyuh9BY\n\tR4OOHftLCoNMIOnqkbtzxwOs7UwOFxL4h9AsksaqOc9IBrvzCXXW+qth2mWiyyu5PNA0\n\tweeITpblrrg30R/3yRCd/ES1gA9nrf8+Hv5adPAu9tQgXdO6f6ji9GD2TyQnW3+r07VS\n\tUj7/aSd1eiHKft705T1FV25lgvnBAeDayW2KGoC4+nUPkVDROfBzLE3/JyH0/PNbOgIh\n\t3qrw==","X-Gm-Message-State":"AOAM531BmQpENNlQXRX2iv4G+fD4pXbuUda/PJOcNVvf59Bf3XO/lNqD\n\tFn+YdrtW+amBguYljCcsI2LGB4l5ZKl+ZrCubbXx+jkmQ60=","X-Google-Smtp-Source":"ABdhPJwP+NSOH7tD1UKP8iq7XRFa2XPSXPApZnayKDHzKWUWtRd9u6Boe5ySgkt2PvCEOiPjkwSRsdgKNEDFVlMHh8Y=","X-Received":"by 2002:a05:600c:40d6:: with SMTP id\n\tm22mr25398038wmh.163.1640861586810; \n\tThu, 30 Dec 2021 02:53:06 -0800 (PST)","MIME-Version":"1.0","References":"<20211223080110.9766-1-david.plowman@raspberrypi.com>\n\t<20211223080110.9766-2-david.plowman@raspberrypi.com>\n\t<YcU8Cda4PzFdtOUm@pendragon.ideasonboard.com>","In-Reply-To":"<YcU8Cda4PzFdtOUm@pendragon.ideasonboard.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Thu, 30 Dec 2021 10:52:54 +0000","Message-ID":"<CAHW6GYKODRK2VjK-pt_OGQ14hNod9UJn3OiczDVkGwpdXnOc=g@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 1/3] include: linux: Add\n\tV4L2_CID_NOTIFY_GAINS control","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":21913,"web_url":"https://patchwork.libcamera.org/comment/21913/","msgid":"<Yc3alk7oh9fH041I@pendragon.ideasonboard.com>","date":"2021-12-30T16:13:10","subject":"Re: [libcamera-devel] [PATCH 1/3] include: linux: Add\n\tV4L2_CID_NOTIFY_GAINS control","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nOn Thu, Dec 30, 2021 at 10:52:54AM +0000, David Plowman wrote:\n> Hi Laurent\n> \n> Sure, I can do that. Could you perhaps give me a few more hints, I\n> didn't really understand how looking at commits in include/linux was\n> helping me. Anyway, here's what I've done:\n> \n> 1. I've cloned the whole of linuxtv-master onto my Pi.\n> 2. I've run \"utils/update-kernel-headers.sh <path-to-my-linuxtv-master>\n> 3. There were some warnings about intel-ipu3.h being missing, I assume\n> I can ignore that.\n> 4. Now I have about 7 files in include/linux that show up as\n> \"modified\", and one (intel-ipu3.h) is \"deleted\".\n\nThe path to intel-ipu3.h has changed in v5.14. I've just sent a patch to\nupdate the update-kernel-headers.sh script accordingly, and have CC'ed\nyou.\n\n> I'm guessing I shouldn't try and commit them all, so should I commit\n> just the one file that I care about (v4l2-controls.h)? But I can't\n> commit the whole v4l2-controls.h either, not least because it doesn't\n> compile (V4L2_CID_USER_BCM2835_ISP_BASE has disappeared), and it has\n> lots of other changes too. So maybe I just pick the single line that I\n> want? (only now it doesn't seem any different to what I did). So I've\n> rather managed to confuse myself!\n\nCommitting everything will indeed not work, as we carry local\nmodifications for a few uAPI extensions that are not upstream yet. This\nincludes\n\n- In include/linux/drm_fourcc.h, the MJPEG and Bayer formats, the\n  DRM_FORMAT_MOD_VENDOR_MIPI modifier vendor prefix, the\n  IPU3_FORMAT_MOD_PACKED modifier and the MIPI_FORMAT_MOD_CSI2_PACKED\n  modifier.\n\n- In include/linux/v4l2-controls.h, V4L2_CID_USER_BCM2835_ISP_BASE.\n\n- In include/linux/videodev2.h, V4L2_META_FMT_SENSOR_DATA and\n  V4L2_META_FMT_BCM2835_ISP_STATS.\n\nThose should be kept. All other modifications should be committed.\n\nBy the way, we could simplify the kernel headers update process by\nmoving the definitions of V4L2_CID_USER_BCM2835_ISP_BASE,\nV4L2_META_FMT_SENSOR_DATA and V4L2_META_FMT_BCM2835_ISP_STATS to the\nRaspberry Pi pipeline handler and/or IPA as appropriate, until those get\nmerged upstream.\n\n> Thanks for your help!\n> \n> On Fri, 24 Dec 2021 at 03:18, Laurent Pinchart wrote:\n> >\n> > Hi David,\n> >\n> > Thank you for the patch.\n> >\n> > On Thu, Dec 23, 2021 at 08:01:08AM +0000, David Plowman wrote:\n> > > Add this control which is already present upstream.\n> >\n> > We have a process to update the kernel headers. If possible, please use\n> > utils/update-kernel-headers.sh. You will need to then pick changes\n> > manually to avoid dropping the currently not upstream features. The git\n> > log for the include/linux/ directory can show you examples.\n> >\n> > > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > > ---\n> > >  include/linux/v4l2-controls.h | 1 +\n> > >  1 file changed, 1 insertion(+)\n> > >\n> > > diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> > > index 59a57418..9db06cb2 100644\n> > > --- a/include/linux/v4l2-controls.h\n> > > +++ b/include/linux/v4l2-controls.h\n> > > @@ -1109,6 +1109,7 @@ enum v4l2_jpeg_chroma_subsampling {\n> > >  #define V4L2_CID_TEST_PATTERN_BLUE           (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)\n> > >  #define V4L2_CID_TEST_PATTERN_GREENB         (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)\n> > >  #define V4L2_CID_UNIT_CELL_SIZE                      (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8)\n> > > +#define V4L2_CID_NOTIFY_GAINS                        (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 9)\n> > >\n> > >\n> > >  /* Image processing controls */","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 3A159BE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Dec 2021 16:13:14 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 893E9608EB;\n\tThu, 30 Dec 2021 17:13:13 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id F32EB60115\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Dec 2021 17:13:11 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 73F1A2A5;\n\tThu, 30 Dec 2021 17:13:11 +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=\"tpPb7Ixf\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1640880791;\n\tbh=omDje+M2lpTPkFPzRs8He3jigeZUuQfsuxAEe5RLWik=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=tpPb7IxfiHNJgwR8psaguz+CRdl5/CKyl3nMPT0i43sBVxKdol7A/J7g1xXNJemvq\n\tNQkA+D06RBrhsm9yHTzhBrDe4ExfeDzp0wyeytj9EQRYKB1MGoD11zbp+zmNWvp266\n\tmVvSlOsPGXOwGX8f+jIrHA3pfBgIK7FSYrTTrddU=","Date":"Thu, 30 Dec 2021 18:13:10 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<Yc3alk7oh9fH041I@pendragon.ideasonboard.com>","References":"<20211223080110.9766-1-david.plowman@raspberrypi.com>\n\t<20211223080110.9766-2-david.plowman@raspberrypi.com>\n\t<YcU8Cda4PzFdtOUm@pendragon.ideasonboard.com>\n\t<CAHW6GYKODRK2VjK-pt_OGQ14hNod9UJn3OiczDVkGwpdXnOc=g@mail.gmail.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<CAHW6GYKODRK2VjK-pt_OGQ14hNod9UJn3OiczDVkGwpdXnOc=g@mail.gmail.com>","Subject":"Re: [libcamera-devel] [PATCH 1/3] include: linux: Add\n\tV4L2_CID_NOTIFY_GAINS control","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":21916,"web_url":"https://patchwork.libcamera.org/comment/21916/","msgid":"<Yc4D8q8DVxLv4aaN@pendragon.ideasonboard.com>","date":"2021-12-30T19:09:38","subject":"Re: [libcamera-devel] [PATCH 1/3] include: linux: Add\n\tV4L2_CID_NOTIFY_GAINS control","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi David,\n\nOn Thu, Dec 30, 2021 at 06:13:11PM +0200, Laurent Pinchart wrote:\n> On Thu, Dec 30, 2021 at 10:52:54AM +0000, David Plowman wrote:\n> > Hi Laurent\n> > \n> > Sure, I can do that. Could you perhaps give me a few more hints, I\n> > didn't really understand how looking at commits in include/linux was\n> > helping me. Anyway, here's what I've done:\n> > \n> > 1. I've cloned the whole of linuxtv-master onto my Pi.\n\nBy the way, we prefer updating to known tags from Linus' tree when\npossible. As the V4L2_CID_NOTIFY_GAINS control has been merged in\nv5.16-rc1, could you update to v5.16-rc7 instead of linuxtv/master ?\n\n> > 2. I've run \"utils/update-kernel-headers.sh <path-to-my-linuxtv-master>\n> > 3. There were some warnings about intel-ipu3.h being missing, I assume\n> > I can ignore that.\n> > 4. Now I have about 7 files in include/linux that show up as\n> > \"modified\", and one (intel-ipu3.h) is \"deleted\".\n> \n> The path to intel-ipu3.h has changed in v5.14. I've just sent a patch to\n> update the update-kernel-headers.sh script accordingly, and have CC'ed\n> you.\n> \n> > I'm guessing I shouldn't try and commit them all, so should I commit\n> > just the one file that I care about (v4l2-controls.h)? But I can't\n> > commit the whole v4l2-controls.h either, not least because it doesn't\n> > compile (V4L2_CID_USER_BCM2835_ISP_BASE has disappeared), and it has\n> > lots of other changes too. So maybe I just pick the single line that I\n> > want? (only now it doesn't seem any different to what I did). So I've\n> > rather managed to confuse myself!\n> \n> Committing everything will indeed not work, as we carry local\n> modifications for a few uAPI extensions that are not upstream yet. This\n> includes\n> \n> - In include/linux/drm_fourcc.h, the MJPEG and Bayer formats, the\n>   DRM_FORMAT_MOD_VENDOR_MIPI modifier vendor prefix, the\n>   IPU3_FORMAT_MOD_PACKED modifier and the MIPI_FORMAT_MOD_CSI2_PACKED\n>   modifier.\n> \n> - In include/linux/v4l2-controls.h, V4L2_CID_USER_BCM2835_ISP_BASE.\n> \n> - In include/linux/videodev2.h, V4L2_META_FMT_SENSOR_DATA and\n>   V4L2_META_FMT_BCM2835_ISP_STATS.\n> \n> Those should be kept. All other modifications should be committed.\n> \n> By the way, we could simplify the kernel headers update process by\n> moving the definitions of V4L2_CID_USER_BCM2835_ISP_BASE,\n> V4L2_META_FMT_SENSOR_DATA and V4L2_META_FMT_BCM2835_ISP_STATS to the\n> Raspberry Pi pipeline handler and/or IPA as appropriate, until those get\n> merged upstream.\n> \n> > Thanks for your help!\n> > \n> > On Fri, 24 Dec 2021 at 03:18, Laurent Pinchart wrote:\n> > >\n> > > Hi David,\n> > >\n> > > Thank you for the patch.\n> > >\n> > > On Thu, Dec 23, 2021 at 08:01:08AM +0000, David Plowman wrote:\n> > > > Add this control which is already present upstream.\n> > >\n> > > We have a process to update the kernel headers. If possible, please use\n> > > utils/update-kernel-headers.sh. You will need to then pick changes\n> > > manually to avoid dropping the currently not upstream features. The git\n> > > log for the include/linux/ directory can show you examples.\n> > >\n> > > > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > > > ---\n> > > >  include/linux/v4l2-controls.h | 1 +\n> > > >  1 file changed, 1 insertion(+)\n> > > >\n> > > > diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> > > > index 59a57418..9db06cb2 100644\n> > > > --- a/include/linux/v4l2-controls.h\n> > > > +++ b/include/linux/v4l2-controls.h\n> > > > @@ -1109,6 +1109,7 @@ enum v4l2_jpeg_chroma_subsampling {\n> > > >  #define V4L2_CID_TEST_PATTERN_BLUE           (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)\n> > > >  #define V4L2_CID_TEST_PATTERN_GREENB         (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)\n> > > >  #define V4L2_CID_UNIT_CELL_SIZE                      (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8)\n> > > > +#define V4L2_CID_NOTIFY_GAINS                        (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 9)\n> > > >\n> > > >\n> > > >  /* Image processing controls */","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 24659BF415\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Dec 2021 19:09:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3D876608EB;\n\tThu, 30 Dec 2021 20:09:42 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9543360115\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Dec 2021 20:09:40 +0100 (CET)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 101902A5;\n\tThu, 30 Dec 2021 20:09:39 +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=\"keTlAAo+\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1640891380;\n\tbh=uQbak24rsnie89tVumZiQxr2GiXP/aIL9zZEbp/q/ik=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=keTlAAo+vzXDf7ZWCpVRL0t+8jeCJakV+OV9oTpzFnvshjV/0lv3V8FwXYdxsLckf\n\trecytexgzOFY5kCRk+7tsJqEkw2Vm2ZBhCjVOkC2zOfFNlcEQLyMxrFDwY3+4ypQFc\n\tewcDE0PoEbgp9YxrdoFMHt+qzjwK2oiRJL1P2xyw=","Date":"Thu, 30 Dec 2021 21:09:38 +0200","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"David Plowman <david.plowman@raspberrypi.com>","Message-ID":"<Yc4D8q8DVxLv4aaN@pendragon.ideasonboard.com>","References":"<20211223080110.9766-1-david.plowman@raspberrypi.com>\n\t<20211223080110.9766-2-david.plowman@raspberrypi.com>\n\t<YcU8Cda4PzFdtOUm@pendragon.ideasonboard.com>\n\t<CAHW6GYKODRK2VjK-pt_OGQ14hNod9UJn3OiczDVkGwpdXnOc=g@mail.gmail.com>\n\t<Yc3alk7oh9fH041I@pendragon.ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<Yc3alk7oh9fH041I@pendragon.ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 1/3] include: linux: Add\n\tV4L2_CID_NOTIFY_GAINS control","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":21917,"web_url":"https://patchwork.libcamera.org/comment/21917/","msgid":"<CAHW6GY+zJUomgLyzAbJq4KVivSPVhSHV32Gnc6Cbu+A2yU8kmg@mail.gmail.com>","date":"2021-12-30T19:51:21","subject":"Re: [libcamera-devel] [PATCH 1/3] include: linux: Add\n\tV4L2_CID_NOTIFY_GAINS control","submitter":{"id":42,"url":"https://patchwork.libcamera.org/api/people/42/","name":"David Plowman","email":"david.plowman@raspberrypi.com"},"content":"Hi Laurent\n\nThanks for the answers. I think that's clear enough, I'll include all\nthis as the first patch in my next revision of that set. It will\nprobably be January now!\n\nBest regards\nDavid\n\nOn Thu, 30 Dec 2021 at 19:09, Laurent Pinchart\n<laurent.pinchart@ideasonboard.com> wrote:\n>\n> Hi David,\n>\n> On Thu, Dec 30, 2021 at 06:13:11PM +0200, Laurent Pinchart wrote:\n> > On Thu, Dec 30, 2021 at 10:52:54AM +0000, David Plowman wrote:\n> > > Hi Laurent\n> > >\n> > > Sure, I can do that. Could you perhaps give me a few more hints, I\n> > > didn't really understand how looking at commits in include/linux was\n> > > helping me. Anyway, here's what I've done:\n> > >\n> > > 1. I've cloned the whole of linuxtv-master onto my Pi.\n>\n> By the way, we prefer updating to known tags from Linus' tree when\n> possible. As the V4L2_CID_NOTIFY_GAINS control has been merged in\n> v5.16-rc1, could you update to v5.16-rc7 instead of linuxtv/master ?\n>\n> > > 2. I've run \"utils/update-kernel-headers.sh <path-to-my-linuxtv-master>\n> > > 3. There were some warnings about intel-ipu3.h being missing, I assume\n> > > I can ignore that.\n> > > 4. Now I have about 7 files in include/linux that show up as\n> > > \"modified\", and one (intel-ipu3.h) is \"deleted\".\n> >\n> > The path to intel-ipu3.h has changed in v5.14. I've just sent a patch to\n> > update the update-kernel-headers.sh script accordingly, and have CC'ed\n> > you.\n> >\n> > > I'm guessing I shouldn't try and commit them all, so should I commit\n> > > just the one file that I care about (v4l2-controls.h)? But I can't\n> > > commit the whole v4l2-controls.h either, not least because it doesn't\n> > > compile (V4L2_CID_USER_BCM2835_ISP_BASE has disappeared), and it has\n> > > lots of other changes too. So maybe I just pick the single line that I\n> > > want? (only now it doesn't seem any different to what I did). So I've\n> > > rather managed to confuse myself!\n> >\n> > Committing everything will indeed not work, as we carry local\n> > modifications for a few uAPI extensions that are not upstream yet. This\n> > includes\n> >\n> > - In include/linux/drm_fourcc.h, the MJPEG and Bayer formats, the\n> >   DRM_FORMAT_MOD_VENDOR_MIPI modifier vendor prefix, the\n> >   IPU3_FORMAT_MOD_PACKED modifier and the MIPI_FORMAT_MOD_CSI2_PACKED\n> >   modifier.\n> >\n> > - In include/linux/v4l2-controls.h, V4L2_CID_USER_BCM2835_ISP_BASE.\n> >\n> > - In include/linux/videodev2.h, V4L2_META_FMT_SENSOR_DATA and\n> >   V4L2_META_FMT_BCM2835_ISP_STATS.\n> >\n> > Those should be kept. All other modifications should be committed.\n> >\n> > By the way, we could simplify the kernel headers update process by\n> > moving the definitions of V4L2_CID_USER_BCM2835_ISP_BASE,\n> > V4L2_META_FMT_SENSOR_DATA and V4L2_META_FMT_BCM2835_ISP_STATS to the\n> > Raspberry Pi pipeline handler and/or IPA as appropriate, until those get\n> > merged upstream.\n> >\n> > > Thanks for your help!\n> > >\n> > > On Fri, 24 Dec 2021 at 03:18, Laurent Pinchart wrote:\n> > > >\n> > > > Hi David,\n> > > >\n> > > > Thank you for the patch.\n> > > >\n> > > > On Thu, Dec 23, 2021 at 08:01:08AM +0000, David Plowman wrote:\n> > > > > Add this control which is already present upstream.\n> > > >\n> > > > We have a process to update the kernel headers. If possible, please use\n> > > > utils/update-kernel-headers.sh. You will need to then pick changes\n> > > > manually to avoid dropping the currently not upstream features. The git\n> > > > log for the include/linux/ directory can show you examples.\n> > > >\n> > > > > Signed-off-by: David Plowman <david.plowman@raspberrypi.com>\n> > > > > ---\n> > > > >  include/linux/v4l2-controls.h | 1 +\n> > > > >  1 file changed, 1 insertion(+)\n> > > > >\n> > > > > diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h\n> > > > > index 59a57418..9db06cb2 100644\n> > > > > --- a/include/linux/v4l2-controls.h\n> > > > > +++ b/include/linux/v4l2-controls.h\n> > > > > @@ -1109,6 +1109,7 @@ enum v4l2_jpeg_chroma_subsampling {\n> > > > >  #define V4L2_CID_TEST_PATTERN_BLUE           (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6)\n> > > > >  #define V4L2_CID_TEST_PATTERN_GREENB         (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7)\n> > > > >  #define V4L2_CID_UNIT_CELL_SIZE                      (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8)\n> > > > > +#define V4L2_CID_NOTIFY_GAINS                        (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 9)\n> > > > >\n> > > > >\n> > > > >  /* Image processing controls */\n>\n> --\n> Regards,\n>\n> Laurent Pinchart","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 017FABE080\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 30 Dec 2021 19:51:35 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 28CED608EB;\n\tThu, 30 Dec 2021 20:51:35 +0100 (CET)","from mail-wm1-x335.google.com (mail-wm1-x335.google.com\n\t[IPv6:2a00:1450:4864:20::335])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 65A2860115\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Dec 2021 20:51:33 +0100 (CET)","by mail-wm1-x335.google.com with SMTP id\n\tj140-20020a1c2392000000b003399ae48f58so16555821wmj.5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 30 Dec 2021 11:51:33 -0800 (PST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (2048-bit key;\n\tunprotected) header.d=raspberrypi.com header.i=@raspberrypi.com\n\theader.b=\"kan5Q7zF\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=raspberrypi.com; s=google;\n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=ylVhQsMqdC8ldEfIE2sc2G8DGfFm3imbQ8S6xRYyE+4=;\n\tb=kan5Q7zFxSUrIttM1zB8Qtd2grbD9ftvXxFIC5je30NqHCQQ3ERQWVHyoFoHVHdbwA\n\tXZTbZ+injX1ADEHw2QZqlqdTanJmzukiAWRnZHbb/GfbKJfOiV1odMrTN9JbLBxLcOZO\n\tK8rK1EGkZf999nwV+TETDSzURPOb1idTAmvtUNNmOufL8VD02sy/FLx3FLpteERS5BWP\n\t9RGmuSbDbVWJ2lT78s6huq1ZzarSHm1vM+k0nCBL2mhyx88ZBtwDMaNEYsPLRabb+DTJ\n\tsOZxBThZn3APBchKB2MPtVeq80P9m6/0O+XG05qsOxbXKHQuE4inx3LREFUydsMKa5p8\n\t8SYQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20210112;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=ylVhQsMqdC8ldEfIE2sc2G8DGfFm3imbQ8S6xRYyE+4=;\n\tb=WBS/zT08AjN0BoneRtjkCGV6OAopcwg0mWpfiHKqn8WFGP8q8uy7/PoNOhJDvC0FFf\n\tDHd9dxTp1Ip5tLLMkTn3uOHh03rxOGvmlv8RWj2FoEvEHtkZe/3v9FObIe17YcijmPL1\n\tRqntTFm+Wai7CzJ1/okUtezYe0Q7Ed5uopJVEBIOqzY1os7J76CzoUn6s41BWp0xWDVd\n\tlAHZwdGs7guuSWhI9oK4TVUcOlY79jyKZVkug2y37OrSartrF+rUzcaialnmUSiIebgz\n\tEwttc12JDnA1s5QvfbUR7l1Q+R9nexF+YeJO4smi2bXul++eGKHA3UpgxSirz7bcCr7l\n\tLhcQ==","X-Gm-Message-State":"AOAM533BTLQC1TV1PpOwzxnV5JHyot1Zg9BWdT5y+o4/+2u5F98MuXDs\n\tTQe4vJgW8BgRfET37lO1wPVHsjCXedRBnz25iBKT5HaEMxU=","X-Google-Smtp-Source":"ABdhPJwo0LorpOzSqAed7MlrjdnxbI1Qet/Ij2rx7FhwrAEPImBu7gSmATYSQF9yY7jRWuYXGiVEiL9gYvWe10YqV7A=","X-Received":"by 2002:a05:600c:1e87:: with SMTP id\n\tbe7mr26891614wmb.171.1640893892968; \n\tThu, 30 Dec 2021 11:51:32 -0800 (PST)","MIME-Version":"1.0","References":"<20211223080110.9766-1-david.plowman@raspberrypi.com>\n\t<20211223080110.9766-2-david.plowman@raspberrypi.com>\n\t<YcU8Cda4PzFdtOUm@pendragon.ideasonboard.com>\n\t<CAHW6GYKODRK2VjK-pt_OGQ14hNod9UJn3OiczDVkGwpdXnOc=g@mail.gmail.com>\n\t<Yc3alk7oh9fH041I@pendragon.ideasonboard.com>\n\t<Yc4D8q8DVxLv4aaN@pendragon.ideasonboard.com>","In-Reply-To":"<Yc4D8q8DVxLv4aaN@pendragon.ideasonboard.com>","From":"David Plowman <david.plowman@raspberrypi.com>","Date":"Thu, 30 Dec 2021 19:51:21 +0000","Message-ID":"<CAHW6GY+zJUomgLyzAbJq4KVivSPVhSHV32Gnc6Cbu+A2yU8kmg@mail.gmail.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 1/3] include: linux: Add\n\tV4L2_CID_NOTIFY_GAINS control","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 <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]