[{"id":17293,"web_url":"https://patchwork.libcamera.org/comment/17293/","msgid":"<20210526210922.765bsizi7mmf324m@uno.localdomain>","date":"2021-05-26T21:09:22","subject":"Re: [libcamera-devel] [PATCH v5 3/6] libcamera:\n\tCameraSensorProperties: Add table of v4l2 index and test pattern","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Hiro,\n\nOn Wed, May 19, 2021 at 04:59:38PM +0900, Hirokazu Honda wrote:\n> The V4L2 specification defines the sensor test pattern modes\n> through a menu control, where a numerical index is associated to\n> a string that describes the test pattern. The index-to-pattern\n> mapping is driver specific and requires a corresponding representation\n> in the library.\n>\n> Add to the static list of CameraSensorProperties a map of indexes to\n> libcamera::controls::TestPatternModes values to be able to map the\n> indexes returned by the driver to the corresponding test pattern mode.\n>\n> Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> ---\n>  .../internal/camera_sensor_properties.h       |  2 ++\n>  src/libcamera/camera_sensor_properties.cpp    | 22 +++++++++++++++++++\n>  2 files changed, 24 insertions(+)\n>\n> diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h\n> index f5e242cb..88ec7261 100644\n> --- a/include/libcamera/internal/camera_sensor_properties.h\n> +++ b/include/libcamera/internal/camera_sensor_properties.h\n> @@ -7,6 +7,7 @@\n>  #ifndef __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__\n>  #define __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__\n>\n> +#include <map>\n>  #include <string>\n>\n>  #include <libcamera/geometry.h>\n> @@ -17,6 +18,7 @@ struct CameraSensorProperties {\n>  \tstatic const CameraSensorProperties *get(const std::string &sensor);\n>\n>  \tSize unitCellSize;\n> +\tstd::map<uint8_t, uint8_t> testPatternModeMap;\n>  };\n>\n>  } /* namespace libcamera */\n> diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp\n> index 6ded31dc..3bf8e500 100644\n> --- a/src/libcamera/camera_sensor_properties.cpp\n> +++ b/src/libcamera/camera_sensor_properties.cpp\n> @@ -9,6 +9,8 @@\n>\n>  #include <map>\n>\n> +#include <libcamera/control_ids.h>\n> +\n>  #include \"libcamera/internal/log.h\"\n>\n>  /**\n> @@ -34,6 +36,10 @@ LOG_DEFINE_CATEGORY(CameraSensorProperties)\n>   *\n>   * \\var CameraSensorProperties::unitCellSize\n>   * \\brief The physical size of a pixel, including pixel edges, in nanometers.\n> + *\n> + * \\var CameraSensorProperties::testPatternModeMap\n> + * \\brief The table from a v4l2 menu index for V4L2_CID_TEST_PATTERN to the\n> + * control value of libcamera test pattern mode.\n\nHow about:\n\nMap that associates the indexes of the sensor test pattern modes as\nreturned by V4L2_CID_TEST_PATTERN with the corresponding TestPattern\ncontrol value.\n\n>   */\n>\n>  /**\n> @@ -47,12 +53,28 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>  \tstatic const std::map<std::string, const CameraSensorProperties> sensorProps = {\n>  \t\t{ \"imx219\", {\n>  \t\t\t.unitCellSize = { 1120, 1120 },\n> +\t\t\t.testPatternModeMap = {\n> +\t\t\t\t{ 0, controls::draft::TestPatternModeOff },\n> +\t\t\t\t{ 1, controls::draft::TestPatternModeColorBars },\n> +\t\t\t\t{ 2, controls::draft::TestPatternModeSolidColor },\n> +\t\t\t\t{ 3, controls::draft::TestPatternModeColorBarsFadeToGray },\n> +\t\t\t\t{ 4, controls::draft::TestPatternModePn9 },\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov5670\", {\n>  \t\t\t.unitCellSize = { 1120, 1120 },\n> +\t\t\t.testPatternModeMap = {\n> +\t\t\t\t{ 0, controls::draft::TestPatternModeOff },\n> +\t\t\t\t{ 1, controls::draft::TestPatternModeColorBars },\n> +\t\t\t},\n>  \t\t} },\n>  \t\t{ \"ov13858\", {\n>  \t\t\t.unitCellSize = { 1120, 1120 },\n> +\t\t\t.testPatternModeMap =  {\n> +\t\t\t\t{ 0, controls::draft::TestPatternModeOff },\n> +\t\t\t\t{ 1, controls::draft::TestPatternModeColorBars },\n> +\t\t\t\t{ 2, controls::draft::TestPatternModeColorBarsFadeToGray },\n> +\t\t\t},\n>  \t\t} },\n\nThis patch breaks compilation as it requires the .testPatternModeMap\nfield to be defined for the ov5693 sensor too. I've now realized at\nthe time that sensor was not in the database :)\n\n>  \t};\n>\n> --\n> 2.31.1.751.gd2f1c929bd-goog\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 238CDBDB80\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 26 May 2021 21:08:40 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 850BC68925;\n\tWed, 26 May 2021 23:08:39 +0200 (CEST)","from relay12.mail.gandi.net (relay12.mail.gandi.net\n\t[217.70.178.232])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 7AF51602B1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 23:08:38 +0200 (CEST)","(Authenticated sender: jacopo@jmondi.org)\n\tby relay12.mail.gandi.net (Postfix) with ESMTPSA id 1A62A200007;\n\tWed, 26 May 2021 21:08:36 +0000 (UTC)"],"Date":"Wed, 26 May 2021 23:09:22 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Hirokazu Honda <hiroh@chromium.org>","Message-ID":"<20210526210922.765bsizi7mmf324m@uno.localdomain>","References":"<20210519075941.1337388-1-hiroh@chromium.org>\n\t<20210519075941.1337388-3-hiroh@chromium.org>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210519075941.1337388-3-hiroh@chromium.org>","Subject":"Re: [libcamera-devel] [PATCH v5 3/6] libcamera:\n\tCameraSensorProperties: Add table of v4l2 index and test pattern","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":17307,"web_url":"https://patchwork.libcamera.org/comment/17307/","msgid":"<CAO5uPHNwcCydzycNGFo2--=z9UgFp7ZZC-VQkxrz65AHpYGqaw@mail.gmail.com>","date":"2021-05-27T06:27:38","subject":"Re: [libcamera-devel] [PATCH v5 3/6] libcamera:\n\tCameraSensorProperties: Add table of v4l2 index and test pattern","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Jacopo,\n\nOn Thu, May 27, 2021 at 6:08 AM Jacopo Mondi <jacopo@jmondi.org> wrote:\n\n> Hi Hiro,\n>\n> On Wed, May 19, 2021 at 04:59:38PM +0900, Hirokazu Honda wrote:\n> > The V4L2 specification defines the sensor test pattern modes\n> > through a menu control, where a numerical index is associated to\n> > a string that describes the test pattern. The index-to-pattern\n> > mapping is driver specific and requires a corresponding representation\n> > in the library.\n> >\n> > Add to the static list of CameraSensorProperties a map of indexes to\n> > libcamera::controls::TestPatternModes values to be able to map the\n> > indexes returned by the driver to the corresponding test pattern mode.\n> >\n> > Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n> > ---\n> >  .../internal/camera_sensor_properties.h       |  2 ++\n> >  src/libcamera/camera_sensor_properties.cpp    | 22 +++++++++++++++++++\n> >  2 files changed, 24 insertions(+)\n> >\n> > diff --git a/include/libcamera/internal/camera_sensor_properties.h\n> b/include/libcamera/internal/camera_sensor_properties.h\n> > index f5e242cb..88ec7261 100644\n> > --- a/include/libcamera/internal/camera_sensor_properties.h\n> > +++ b/include/libcamera/internal/camera_sensor_properties.h\n> > @@ -7,6 +7,7 @@\n> >  #ifndef __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__\n> >  #define __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__\n> >\n> > +#include <map>\n> >  #include <string>\n> >\n> >  #include <libcamera/geometry.h>\n> > @@ -17,6 +18,7 @@ struct CameraSensorProperties {\n> >       static const CameraSensorProperties *get(const std::string\n> &sensor);\n> >\n> >       Size unitCellSize;\n> > +     std::map<uint8_t, uint8_t> testPatternModeMap;\n> >  };\n> >\n> >  } /* namespace libcamera */\n> > diff --git a/src/libcamera/camera_sensor_properties.cpp\n> b/src/libcamera/camera_sensor_properties.cpp\n> > index 6ded31dc..3bf8e500 100644\n> > --- a/src/libcamera/camera_sensor_properties.cpp\n> > +++ b/src/libcamera/camera_sensor_properties.cpp\n> > @@ -9,6 +9,8 @@\n> >\n> >  #include <map>\n> >\n> > +#include <libcamera/control_ids.h>\n> > +\n> >  #include \"libcamera/internal/log.h\"\n> >\n> >  /**\n> > @@ -34,6 +36,10 @@ LOG_DEFINE_CATEGORY(CameraSensorProperties)\n> >   *\n> >   * \\var CameraSensorProperties::unitCellSize\n> >   * \\brief The physical size of a pixel, including pixel edges, in\n> nanometers.\n> > + *\n> > + * \\var CameraSensorProperties::testPatternModeMap\n> > + * \\brief The table from a v4l2 menu index for V4L2_CID_TEST_PATTERN to\n> the\n> > + * control value of libcamera test pattern mode.\n>\n> How about:\n>\n> Map that associates the indexes of the sensor test pattern modes as\n> returned by V4L2_CID_TEST_PATTERN with the corresponding TestPattern\n> control value.\n>\n> >   */\n> >\n> >  /**\n> > @@ -47,12 +53,28 @@ const CameraSensorProperties\n> *CameraSensorProperties::get(const std::string &sen\n> >       static const std::map<std::string, const CameraSensorProperties>\n> sensorProps = {\n> >               { \"imx219\", {\n> >                       .unitCellSize = { 1120, 1120 },\n> > +                     .testPatternModeMap = {\n> > +                             { 0, controls::draft::TestPatternModeOff },\n> > +                             { 1,\n> controls::draft::TestPatternModeColorBars },\n> > +                             { 2,\n> controls::draft::TestPatternModeSolidColor },\n> > +                             { 3,\n> controls::draft::TestPatternModeColorBarsFadeToGray },\n> > +                             { 4, controls::draft::TestPatternModePn9 },\n> > +                     },\n> >               } },\n> >               { \"ov5670\", {\n> >                       .unitCellSize = { 1120, 1120 },\n> > +                     .testPatternModeMap = {\n> > +                             { 0, controls::draft::TestPatternModeOff },\n> > +                             { 1,\n> controls::draft::TestPatternModeColorBars },\n> > +                     },\n> >               } },\n> >               { \"ov13858\", {\n> >                       .unitCellSize = { 1120, 1120 },\n> > +                     .testPatternModeMap =  {\n> > +                             { 0, controls::draft::TestPatternModeOff },\n> > +                             { 1,\n> controls::draft::TestPatternModeColorBars },\n> > +                             { 2,\n> controls::draft::TestPatternModeColorBarsFadeToGray },\n> > +                     },\n> >               } },\n>\n> This patch breaks compilation as it requires the .testPatternModeMap\n> field to be defined for the ov5693 sensor too. I've now realized at\n> the time that sensor was not in the database :)\n>\n>\nov5693 is mainly used in MS surface tablets according to the commit message\nof the patch adding this.\nProbably because of that, the sensor driver for it is not upstream to linux\nkernel and it is impossible to construct this table for ov5693.\nI couldn't even test pattern modes supported by it.\n\nJean, do you know anything about this?\n\n-Hiro\n\n> >       };\n> >\n> > --\n> > 2.31.1.751.gd2f1c929bd-goog\n> >\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 DB6DCBDB80\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 May 2021 06:27:51 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 21AAF68924;\n\tThu, 27 May 2021 08:27:51 +0200 (CEST)","from mail-ej1-x634.google.com (mail-ej1-x634.google.com\n\t[IPv6:2a00:1450:4864:20::634])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 099A06891F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 May 2021 08:27:50 +0200 (CEST)","by mail-ej1-x634.google.com with SMTP id l1so6214509ejb.6\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 26 May 2021 23:27:49 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"jRMuyItz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=Cy4m6l135A7vwEEea5aeElCdcPwly1sRcANV+A+7RGY=;\n\tb=jRMuyItzkr20/ywlTvjhZKkpBrBOcihOlqFHMcKQTfckFB5P211QpVkvTEwZzy7ywq\n\tvFs7AZhbmBzoy27GG3fP16oo2Q2BjCNpuzIY5Dsxw3/sjsZrXEJQYFQVg1t6TbOH34ZM\n\tFzTsATLRnmhdtWFtP/IKqSditZj/mPbrjIURo=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=Cy4m6l135A7vwEEea5aeElCdcPwly1sRcANV+A+7RGY=;\n\tb=AsPNcrKoivKyz/8NTUvg7C3o1dpdqBkTgx2hKsjCxEB7QB4oNK43CdhRoywz6Exfn8\n\tCsbGuITMr5TusoGWinGXYWWqAbNCjxyZs+zpf4aBYsH1qE8bC+9c9a+gKh0oouQgbfBy\n\tpcThxLenLwz2GsuYryVusx7NkaKfezshsZGXg9sYk735DYMlnKF0YSgzdQfldipCp0d3\n\tUJ12vqyE0esPyeoVHChnaTuBp9hszgSkxQFeZzeg5wAk+p6kCB3Z0kgKNK37lF50jwLI\n\t/0UaMR8HOpKHcw95HvuwuRZMf1/lSElPdYv/9BuotUUHfL2O3XSPRqrwh2pmt0RzfPXq\n\trjdg==","X-Gm-Message-State":"AOAM532tyzY3FL0fSqTMJwjqXqjpt8Fz4Q+UNiXd0lAqLH7PFQNGZxVg\n\tC3BV//3DbRgMgBePty6mSdH4ZQF8yUEdkifrBQwuEg==","X-Google-Smtp-Source":"ABdhPJwL7WZJpgIqU4GLoSD6h5ivm3Ol7jNI+an4gXKCwgsSU7mbl9Kl6uMrwVFxwbfgbMhR5VyMGwHYs1+//mwGmuo=","X-Received":"by 2002:a17:906:8249:: with SMTP id\n\tf9mr1470421ejx.243.1622096869528; \n\tWed, 26 May 2021 23:27:49 -0700 (PDT)","MIME-Version":"1.0","References":"<20210519075941.1337388-1-hiroh@chromium.org>\n\t<20210519075941.1337388-3-hiroh@chromium.org>\n\t<20210526210922.765bsizi7mmf324m@uno.localdomain>","In-Reply-To":"<20210526210922.765bsizi7mmf324m@uno.localdomain>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Thu, 27 May 2021 15:27:38 +0900","Message-ID":"<CAO5uPHNwcCydzycNGFo2--=z9UgFp7ZZC-VQkxrz65AHpYGqaw@mail.gmail.com>","To":"Jacopo Mondi <jacopo@jmondi.org>","Content-Type":"multipart/alternative; boundary=\"000000000000b32e7805c349dbf9\"","Subject":"Re: [libcamera-devel] [PATCH v5 3/6] libcamera:\n\tCameraSensorProperties: Add table of v4l2 index and test pattern","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":17311,"web_url":"https://patchwork.libcamera.org/comment/17311/","msgid":"<CAAFQd5C7+_gJ+uf+-uBktB14J7VayKEh4d2LUGPObY9FVyrD+w@mail.gmail.com>","date":"2021-05-27T07:03:26","subject":"Re: [libcamera-devel] [PATCH v5 3/6] libcamera:\n\tCameraSensorProperties: Add table of v4l2 index and test pattern","submitter":{"id":9,"url":"https://patchwork.libcamera.org/api/people/9/","name":"Tomasz Figa","email":"tfiga@chromium.org"},"content":"On Thu, May 27, 2021 at 3:27 PM Hirokazu Honda <hiroh@chromium.org> wrote:\n>\n> Hi Jacopo,\n>\n> On Thu, May 27, 2021 at 6:08 AM Jacopo Mondi <jacopo@jmondi.org> wrote:\n>>\n>> Hi Hiro,\n>>\n>> On Wed, May 19, 2021 at 04:59:38PM +0900, Hirokazu Honda wrote:\n>> > The V4L2 specification defines the sensor test pattern modes\n>> > through a menu control, where a numerical index is associated to\n>> > a string that describes the test pattern. The index-to-pattern\n>> > mapping is driver specific and requires a corresponding representation\n>> > in the library.\n>> >\n>> > Add to the static list of CameraSensorProperties a map of indexes to\n>> > libcamera::controls::TestPatternModes values to be able to map the\n>> > indexes returned by the driver to the corresponding test pattern mode.\n>> >\n>> > Signed-off-by: Hirokazu Honda <hiroh@chromium.org>\n>> > ---\n>> >  .../internal/camera_sensor_properties.h       |  2 ++\n>> >  src/libcamera/camera_sensor_properties.cpp    | 22 +++++++++++++++++++\n>> >  2 files changed, 24 insertions(+)\n>> >\n>> > diff --git a/include/libcamera/internal/camera_sensor_properties.h b/include/libcamera/internal/camera_sensor_properties.h\n>> > index f5e242cb..88ec7261 100644\n>> > --- a/include/libcamera/internal/camera_sensor_properties.h\n>> > +++ b/include/libcamera/internal/camera_sensor_properties.h\n>> > @@ -7,6 +7,7 @@\n>> >  #ifndef __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__\n>> >  #define __LIBCAMERA_SENSOR_CAMERA_SENSOR_PROPERTIES_H__\n>> >\n>> > +#include <map>\n>> >  #include <string>\n>> >\n>> >  #include <libcamera/geometry.h>\n>> > @@ -17,6 +18,7 @@ struct CameraSensorProperties {\n>> >       static const CameraSensorProperties *get(const std::string &sensor);\n>> >\n>> >       Size unitCellSize;\n>> > +     std::map<uint8_t, uint8_t> testPatternModeMap;\n>> >  };\n>> >\n>> >  } /* namespace libcamera */\n>> > diff --git a/src/libcamera/camera_sensor_properties.cpp b/src/libcamera/camera_sensor_properties.cpp\n>> > index 6ded31dc..3bf8e500 100644\n>> > --- a/src/libcamera/camera_sensor_properties.cpp\n>> > +++ b/src/libcamera/camera_sensor_properties.cpp\n>> > @@ -9,6 +9,8 @@\n>> >\n>> >  #include <map>\n>> >\n>> > +#include <libcamera/control_ids.h>\n>> > +\n>> >  #include \"libcamera/internal/log.h\"\n>> >\n>> >  /**\n>> > @@ -34,6 +36,10 @@ LOG_DEFINE_CATEGORY(CameraSensorProperties)\n>> >   *\n>> >   * \\var CameraSensorProperties::unitCellSize\n>> >   * \\brief The physical size of a pixel, including pixel edges, in nanometers.\n>> > + *\n>> > + * \\var CameraSensorProperties::testPatternModeMap\n>> > + * \\brief The table from a v4l2 menu index for V4L2_CID_TEST_PATTERN to the\n>> > + * control value of libcamera test pattern mode.\n>>\n>> How about:\n>>\n>> Map that associates the indexes of the sensor test pattern modes as\n>> returned by V4L2_CID_TEST_PATTERN with the corresponding TestPattern\n>> control value.\n>>\n>> >   */\n>> >\n>> >  /**\n>> > @@ -47,12 +53,28 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen\n>> >       static const std::map<std::string, const CameraSensorProperties> sensorProps = {\n>> >               { \"imx219\", {\n>> >                       .unitCellSize = { 1120, 1120 },\n>> > +                     .testPatternModeMap = {\n>> > +                             { 0, controls::draft::TestPatternModeOff },\n>> > +                             { 1, controls::draft::TestPatternModeColorBars },\n>> > +                             { 2, controls::draft::TestPatternModeSolidColor },\n>> > +                             { 3, controls::draft::TestPatternModeColorBarsFadeToGray },\n>> > +                             { 4, controls::draft::TestPatternModePn9 },\n>> > +                     },\n>> >               } },\n>> >               { \"ov5670\", {\n>> >                       .unitCellSize = { 1120, 1120 },\n>> > +                     .testPatternModeMap = {\n>> > +                             { 0, controls::draft::TestPatternModeOff },\n>> > +                             { 1, controls::draft::TestPatternModeColorBars },\n>> > +                     },\n>> >               } },\n>> >               { \"ov13858\", {\n>> >                       .unitCellSize = { 1120, 1120 },\n>> > +                     .testPatternModeMap =  {\n>> > +                             { 0, controls::draft::TestPatternModeOff },\n>> > +                             { 1, controls::draft::TestPatternModeColorBars },\n>> > +                             { 2, controls::draft::TestPatternModeColorBarsFadeToGray },\n>> > +                     },\n>> >               } },\n>>\n>> This patch breaks compilation as it requires the .testPatternModeMap\n>> field to be defined for the ov5693 sensor too. I've now realized at\n>> the time that sensor was not in the database :)\n>>\n>\n> ov5693 is mainly used in MS surface tablets according to the commit message of the patch adding this.\n> Probably because of that, the sensor driver for it is not upstream to linux kernel and it is impossible to construct this table for ov5693.\n> I couldn't even test pattern modes supported by it.\n\nHmm, was the patch applied accidentally? I indeed don't see the driver upstream.\n\n>\n> Jean, do you know anything about this?\n>\n> -Hiro\n>>\n>> >       };\n>> >\n>> > --\n>> > 2.31.1.751.gd2f1c929bd-goog\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 2171CBDB80\n\tfor <parsemail@patchwork.libcamera.org>;\n\tThu, 27 May 2021 07:03:43 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D5B4368926;\n\tThu, 27 May 2021 09:03:42 +0200 (CEST)","from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com\n\t[IPv6:2a00:1450:4864:20::52b])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 1B57068920\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 May 2021 09:03:42 +0200 (CEST)","by mail-ed1-x52b.google.com with SMTP id r11so4442406edt.13\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 May 2021 00:03:42 -0700 (PDT)","from mail-wr1-f48.google.com (mail-wr1-f48.google.com.\n\t[209.85.221.48]) by smtp.gmail.com with ESMTPSA id\n\tgz8sm515790ejb.38.2021.05.27.00.03.40\n\tfor <libcamera-devel@lists.libcamera.org>\n\t(version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);\n\tThu, 27 May 2021 00:03:40 -0700 (PDT)","by mail-wr1-f48.google.com with SMTP id p7so3539332wru.10\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 27 May 2021 00:03:40 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"ROc/2PVq\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=zrSCtOcCFbyCMzJ+EqbsUTzvSCNsYazmd9VTspGW7go=;\n\tb=ROc/2PVqYpC4zZoVDtFbQHEryIewM/lN/p6I5irzpJYqDywKiInMisyhudE63i9T4n\n\tM3YqzPv4DPQfITp6FGiRsulUZjjluGNF4Ksxv7tHJsxhegbRrEHfRcykz49zI8zfdCmo\n\tcco2KvD08QkYz+qOIk4fw0MFuW11HxiLevTIk=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=zrSCtOcCFbyCMzJ+EqbsUTzvSCNsYazmd9VTspGW7go=;\n\tb=cl4XNgkUdXuX1ZEAXw82bkt/WwV8rodw0NeTukDMCWJGMta910bpNCClNK5ee9XOoX\n\toVguxVlwuFn8X/r1cxdEFK9FpXrM2xKwIUuRIMpqTqT7oCzzkSdOOoIzBLdpkuMAdUjZ\n\tUePVSeeUF1eHodJFfmuVNyy5Mo3FssbTglWXzV3Cw6+sCyQKWIntZ9UTml3tRE4hU0lT\n\tvkVefj7ZHhT1WJuRIr+pYIVGge5EYMKcG29CQTOmVgNfwGrgL2CylF1+UwSUt7c5pYD/\n\t1QeZLT8i4OaTTMNK5Jl0aEhmFe6UDvtQhHYBDGJ9PzDL8LP4WFTSZVib7d6S08QB22QL\n\tK+rQ==","X-Gm-Message-State":"AOAM533InyqyquJzXSmpqlQwOdwzOfJlQNmslT8PsGfzULkzR2m6Dwic\n\tQMfk5RDQYGjPT423aiDUWv2v8ImlmsnO5A==","X-Google-Smtp-Source":"ABdhPJyfdOnWDzPTH1EV6mi0kR9Py6hQzTtnIj1L9oGlA+kTGwL3Vj8sA67iX7qqFCo773PElp5juA==","X-Received":["by 2002:a50:cc0c:: with SMTP id\n\tm12mr2515385edi.141.1622099021395; \n\tThu, 27 May 2021 00:03:41 -0700 (PDT)","by 2002:a5d:4385:: with SMTP id i5mr1712435wrq.192.1622099019582;\n\tThu, 27 May 2021 00:03:39 -0700 (PDT)"],"MIME-Version":"1.0","References":"<20210519075941.1337388-1-hiroh@chromium.org>\n\t<20210519075941.1337388-3-hiroh@chromium.org>\n\t<20210526210922.765bsizi7mmf324m@uno.localdomain>\n\t<CAO5uPHNwcCydzycNGFo2--=z9UgFp7ZZC-VQkxrz65AHpYGqaw@mail.gmail.com>","In-Reply-To":"<CAO5uPHNwcCydzycNGFo2--=z9UgFp7ZZC-VQkxrz65AHpYGqaw@mail.gmail.com>","From":"Tomasz Figa <tfiga@chromium.org>","Date":"Thu, 27 May 2021 16:03:26 +0900","X-Gmail-Original-Message-ID":"<CAAFQd5C7+_gJ+uf+-uBktB14J7VayKEh4d2LUGPObY9FVyrD+w@mail.gmail.com>","Message-ID":"<CAAFQd5C7+_gJ+uf+-uBktB14J7VayKEh4d2LUGPObY9FVyrD+w@mail.gmail.com>","To":"Hirokazu Honda <hiroh@chromium.org>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH v5 3/6] libcamera:\n\tCameraSensorProperties: Add table of v4l2 index and test pattern","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>"}}]