All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jerry-ch Chen <Jerry-ch.Chen@mediatek.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: "matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"lkml@metux.net" <lkml@metux.net>,
	"CK Hu (胡俊光)" <ck.hu@mediatek.com>,
	"yuzhao@chromium.org" <yuzhao@chromium.org>,
	"zwisler@chromium.org" <zwisler@chromium.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Sean Cheng (鄭昇弘)" <Sean.Cheng@mediatek.com>,
	"Sj Huang (黃信璋)" <sj.huang@mediatek.com>,
	"Christie Yu (游雅惠)" <christie.yu@mediatek.com>,
	"Frederic Chen (陳俊元)" <Frederic.Chen@mediatek.com>,
	"Jungo Lin (林明俊)" <jungo.lin@mediatek.com>,
	"Po-Yang Huang (黃柏陽)" <po-yang.huang@mediatek.com>,
	"Rynn Wu (吳育恩)" <Rynn.Wu@mediatek.com>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	srv_heupstream <srv_heupstream@mediatek.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"laurent.pinchart+renesas@ideasonboard.com"
	<laurent.pinchart+renesas@ideasonboard.com>,
	"hans.verkuil@cisco.com" <hans.verkuil@cisco.com>
Subject: Re: [RFC PATCH V3 3/3] platform: mtk-isp: Add Mediatek FD driver
Date: Tue, 3 Dec 2019 15:36:12 +0800	[thread overview]
Message-ID: <1575358572.22859.16.camel@mtksdccf07> (raw)
In-Reply-To: <CAAFQd5D-F1C4RyVeTzX=z72h6x0P5Gyb2X0EsH0YRQVAP6hGmQ@mail.gmail.com>

Hi Tomasz,

On Mon, 2019-12-02 at 18:48 +0900, Tomasz Figa wrote:
> On Sat, Nov 30, 2019 at 1:55 AM Jerry-ch Chen
> <Jerry-ch.Chen@mediatek.com> wrote:
> >
> > Hi Tomasz,
> >
> > On Wed, 2019-11-20 at 18:28 +0900, Tomasz Figa wrote:
> > > On Wed, Nov 20, 2019 at 5:11 PM Jerry-ch Chen
> > > <Jerry-ch.Chen@mediatek.com> wrote:
> > > >
> > > > Hi Tomasz,
> > > >
> > > > On Fri, 2019-10-25 at 11:52 +0800, Tomasz Figa wrote:
> > > > > On Tue, Oct 15, 2019 at 11:16:15AM +0800, Jerry-ch Chen wrote:
> > > > > > Hi Tomasz,
> > > > > >
> > > > > > On Fri, 2019-09-06 at 18:11 +0800, Jerry-ch Chen wrote:
> > > > > > > From: Jerry-ch Chen <jerry-ch.chen@mediatek.com>
> > > > > > >
> > > > > > > This patch adds the driver of Face Detection (FD) unit in
> > > > > > > Mediatek camera system, providing face detection function.
> > > > > > >
> > > > > > > The mtk-isp directory will contain drivers for multiple IP
> > > > > > > blocks found in Mediatek ISP system. It will include ISP Pass 1
> > > > > > > driver (CAM), sensor interface driver, DIP driver and face
> > > > > > > detection driver.
> > > > > > >
> > > > > > > Signed-off-by: Jerry-ch Chen <jerry-ch.chen@mediatek.com>
> > > > > > > ---
> > > > > > >  drivers/media/platform/Kconfig                |    2 +
> > > > > > >  drivers/media/platform/Makefile               |    2 +
> > > > > > >  drivers/media/platform/mtk-isp/fd/Kconfig     |   19 +
> > > > > > >  drivers/media/platform/mtk-isp/fd/Makefile    |    5 +
> > > > > > >  drivers/media/platform/mtk-isp/fd/mtk_fd.h    |  148 ++
> > > > > > >  drivers/media/platform/mtk-isp/fd/mtk_fd_40.c | 1219 +++++++++++++++++
> > > > > > >  include/uapi/linux/mtk-fd-v4l2-controls.h     |   69 +
> > > > > > >  include/uapi/linux/v4l2-controls.h            |    4 +
> > > > > > >  8 files changed, 1468 insertions(+)
> > > > > > >  create mode 100644 drivers/media/platform/mtk-isp/fd/Kconfig
> > > > > > >  create mode 100644 drivers/media/platform/mtk-isp/fd/Makefile
> > > > > > >  create mode 100644 drivers/media/platform/mtk-isp/fd/mtk_fd.h
> > > > > > >  create mode 100644 drivers/media/platform/mtk-isp/fd/mtk_fd_40.c
> > > > > > >  create mode 100644 include/uapi/linux/mtk-fd-v4l2-controls.h
> > > > > > >
> > > > >
> > > > > [snip]
[snip]
> > > > > [snip]
> > > > >
> > > > > > > +/* Set the face angle and directions to be detected */
> > > > > > > +#define V4L2_CID_MTK_FD_DETECT_POSE              (V4L2_CID_USER_MTK_FD_BASE + 1)
> > > > > > > +
> > > > > > > +/* Set image widths for an input image to be scaled down for face detection */
> > > > > > > +#define V4L2_CID_MTK_FD_SCALE_DOWN_IMG_WIDTH     (V4L2_CID_USER_MTK_FD_BASE + 2)
> > > > > > > +
> > > > > > > +/* Set image heights for an input image to be scaled down for face detection */
> > > > > > > +#define V4L2_CID_MTK_FD_SCALE_DOWN_IMG_HEIGHT    (V4L2_CID_USER_MTK_FD_BASE + 3)
> > > > > > > +
> > > > > > > +/* Set the length of scale down size array */
> > > > > > > +#define V4L2_CID_MTK_FD_SCALE_IMG_NUM            (V4L2_CID_USER_MTK_FD_BASE + 4)
> > > > > > > +
> > > > > > > +/* Set the detection speed, usually reducing accuracy. */
> > > > > > > +#define V4L2_CID_MTK_FD_DETECT_SPEED             (V4L2_CID_USER_MTK_FD_BASE + 5)
> > > > > > > +
> > > > > > > +/* Select the detection model or algorithm to be used. */
> > > > > > > +#define V4L2_CID_MTK_FD_DETECTION_MODEL          (V4L2_CID_USER_MTK_FD_BASE + 6)
> > > > > > > +
> > > > > > > +/* We reserve 16 controls for this driver. */
> > > > > > > +#define V4L2_CID_MTK_FD_MAX                      16
> > > > > > > +
> > > > > >
> > > > > > For these control IDs, I think the following should be remained as chip
> > > > > > specific controls.
> > > > > > V4L2_CID_MTK_FD_SCALE_DOWN_IMG_WIDTH,
> > > > > > V4L2_CID_MTK_FD_SCALE_DOWN_IMG_HEIGHT and V4L2_CID_MTK_FD_SCALE_IMG_NUM
> > > > > >
> > > > > > Hope there would be standardizing face detection api that cover the rest
> > > > > > controls: V4L2_CID_MTK_FD_DETECT_POSE, V4L2_CID_MTK_FD_DETECT_SPEED and
> > > > > > V4L2_CID_MTK_FD_DETECTION_MODEL
> > > > > >
> > > > > > Would you have any suggestions on how to propose the standard face
> > > > > > detection apis?
> > > > > >
> > > > >
> > > > > Given no follow up feedback from the community, I think we can keep them
> > > > > as driver-specific, but should make sure that they have some reasonable
> > > > > default values in case an application doesn't recognize them.
> > > > >
> > > > > Best regards,
> > > > > Tomasz
> > > > >
> > > > Should I keep the file "mtk-fd-v4l2-controls.h" which defines the
> > > > control ids under the folder "/include/uapi/linux"?
> > >
> > > We should define the CID base for the FD driver in v4l2-controls.h,
> > > but the controls themselves should be only defined inside the driver.
> > >
> > > For example:
> > > https://elixir.bootlin.com/linux/v5.4-rc8/source/include/uapi/linux/v4l2-controls.h#L178
> > > https://elixir.bootlin.com/linux/v5.4-rc8/source/drivers/media/i2c/adv7180.c#L181
> > >
> > > Best regards,
> > > Tomasz
> >
> > Appreciate for providing the example,
> > Would it be fine for me to put the private CID in the mtk_fd.h(which is
> > similar to before...) or follow the example to define inside
> > mtk_fd_40.c??
> >
> > The next version is almost ready, maybe I can send it when I ready in a
> > few days?
> 
> Since mtk_fd_40.c is the only place the definitions from mtk_fd.h are
> used, I'd suggest just moving all the contents to the .c file.
> 
> Best regards,
> Tomasz
Done,

Thanks and best regards,
Jerry



WARNING: multiple messages have this Message-ID (diff)
From: Jerry-ch Chen <Jerry-ch.Chen@mediatek.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Sean Cheng (鄭昇弘)" <Sean.Cheng@mediatek.com>,
	"Frederic Chen (陳俊元)" <Frederic.Chen@mediatek.com>,
	"Rynn Wu (吳育恩)" <Rynn.Wu@mediatek.com>,
	"Christie Yu (游雅惠)" <christie.yu@mediatek.com>,
	srv_heupstream <srv_heupstream@mediatek.com>,
	"Jungo Lin (林明俊)" <jungo.lin@mediatek.com>,
	"Po-Yang Huang (黃柏陽)" <po-yang.huang@mediatek.com>,
	"CK Hu (胡俊光)" <ck.hu@mediatek.com>,
	"Sj Huang (黃信璋)" <sj.huang@mediatek.com>,
	"yuzhao@chromium.org" <yuzhao@chromium.org>,
	"lkml@metux.net" <lkml@metux.net>,
	"zwisler@chromium.org" <zwisler@chromium.org>,
	"hans.verkuil@cisco.com" <hans.verkuil@cisco.com>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"laurent.pinchart+renesas@ideasonboard.com"
	<laurent.pinchart+renesas@ideasonboard.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [RFC PATCH V3 3/3] platform: mtk-isp: Add Mediatek FD driver
Date: Tue, 3 Dec 2019 15:36:12 +0800	[thread overview]
Message-ID: <1575358572.22859.16.camel@mtksdccf07> (raw)
In-Reply-To: <CAAFQd5D-F1C4RyVeTzX=z72h6x0P5Gyb2X0EsH0YRQVAP6hGmQ@mail.gmail.com>

Hi Tomasz,

On Mon, 2019-12-02 at 18:48 +0900, Tomasz Figa wrote:
> On Sat, Nov 30, 2019 at 1:55 AM Jerry-ch Chen
> <Jerry-ch.Chen@mediatek.com> wrote:
> >
> > Hi Tomasz,
> >
> > On Wed, 2019-11-20 at 18:28 +0900, Tomasz Figa wrote:
> > > On Wed, Nov 20, 2019 at 5:11 PM Jerry-ch Chen
> > > <Jerry-ch.Chen@mediatek.com> wrote:
> > > >
> > > > Hi Tomasz,
> > > >
> > > > On Fri, 2019-10-25 at 11:52 +0800, Tomasz Figa wrote:
> > > > > On Tue, Oct 15, 2019 at 11:16:15AM +0800, Jerry-ch Chen wrote:
> > > > > > Hi Tomasz,
> > > > > >
> > > > > > On Fri, 2019-09-06 at 18:11 +0800, Jerry-ch Chen wrote:
> > > > > > > From: Jerry-ch Chen <jerry-ch.chen@mediatek.com>
> > > > > > >
> > > > > > > This patch adds the driver of Face Detection (FD) unit in
> > > > > > > Mediatek camera system, providing face detection function.
> > > > > > >
> > > > > > > The mtk-isp directory will contain drivers for multiple IP
> > > > > > > blocks found in Mediatek ISP system. It will include ISP Pass 1
> > > > > > > driver (CAM), sensor interface driver, DIP driver and face
> > > > > > > detection driver.
> > > > > > >
> > > > > > > Signed-off-by: Jerry-ch Chen <jerry-ch.chen@mediatek.com>
> > > > > > > ---
> > > > > > >  drivers/media/platform/Kconfig                |    2 +
> > > > > > >  drivers/media/platform/Makefile               |    2 +
> > > > > > >  drivers/media/platform/mtk-isp/fd/Kconfig     |   19 +
> > > > > > >  drivers/media/platform/mtk-isp/fd/Makefile    |    5 +
> > > > > > >  drivers/media/platform/mtk-isp/fd/mtk_fd.h    |  148 ++
> > > > > > >  drivers/media/platform/mtk-isp/fd/mtk_fd_40.c | 1219 +++++++++++++++++
> > > > > > >  include/uapi/linux/mtk-fd-v4l2-controls.h     |   69 +
> > > > > > >  include/uapi/linux/v4l2-controls.h            |    4 +
> > > > > > >  8 files changed, 1468 insertions(+)
> > > > > > >  create mode 100644 drivers/media/platform/mtk-isp/fd/Kconfig
> > > > > > >  create mode 100644 drivers/media/platform/mtk-isp/fd/Makefile
> > > > > > >  create mode 100644 drivers/media/platform/mtk-isp/fd/mtk_fd.h
> > > > > > >  create mode 100644 drivers/media/platform/mtk-isp/fd/mtk_fd_40.c
> > > > > > >  create mode 100644 include/uapi/linux/mtk-fd-v4l2-controls.h
> > > > > > >
> > > > >
> > > > > [snip]
[snip]
> > > > > [snip]
> > > > >
> > > > > > > +/* Set the face angle and directions to be detected */
> > > > > > > +#define V4L2_CID_MTK_FD_DETECT_POSE              (V4L2_CID_USER_MTK_FD_BASE + 1)
> > > > > > > +
> > > > > > > +/* Set image widths for an input image to be scaled down for face detection */
> > > > > > > +#define V4L2_CID_MTK_FD_SCALE_DOWN_IMG_WIDTH     (V4L2_CID_USER_MTK_FD_BASE + 2)
> > > > > > > +
> > > > > > > +/* Set image heights for an input image to be scaled down for face detection */
> > > > > > > +#define V4L2_CID_MTK_FD_SCALE_DOWN_IMG_HEIGHT    (V4L2_CID_USER_MTK_FD_BASE + 3)
> > > > > > > +
> > > > > > > +/* Set the length of scale down size array */
> > > > > > > +#define V4L2_CID_MTK_FD_SCALE_IMG_NUM            (V4L2_CID_USER_MTK_FD_BASE + 4)
> > > > > > > +
> > > > > > > +/* Set the detection speed, usually reducing accuracy. */
> > > > > > > +#define V4L2_CID_MTK_FD_DETECT_SPEED             (V4L2_CID_USER_MTK_FD_BASE + 5)
> > > > > > > +
> > > > > > > +/* Select the detection model or algorithm to be used. */
> > > > > > > +#define V4L2_CID_MTK_FD_DETECTION_MODEL          (V4L2_CID_USER_MTK_FD_BASE + 6)
> > > > > > > +
> > > > > > > +/* We reserve 16 controls for this driver. */
> > > > > > > +#define V4L2_CID_MTK_FD_MAX                      16
> > > > > > > +
> > > > > >
> > > > > > For these control IDs, I think the following should be remained as chip
> > > > > > specific controls.
> > > > > > V4L2_CID_MTK_FD_SCALE_DOWN_IMG_WIDTH,
> > > > > > V4L2_CID_MTK_FD_SCALE_DOWN_IMG_HEIGHT and V4L2_CID_MTK_FD_SCALE_IMG_NUM
> > > > > >
> > > > > > Hope there would be standardizing face detection api that cover the rest
> > > > > > controls: V4L2_CID_MTK_FD_DETECT_POSE, V4L2_CID_MTK_FD_DETECT_SPEED and
> > > > > > V4L2_CID_MTK_FD_DETECTION_MODEL
> > > > > >
> > > > > > Would you have any suggestions on how to propose the standard face
> > > > > > detection apis?
> > > > > >
> > > > >
> > > > > Given no follow up feedback from the community, I think we can keep them
> > > > > as driver-specific, but should make sure that they have some reasonable
> > > > > default values in case an application doesn't recognize them.
> > > > >
> > > > > Best regards,
> > > > > Tomasz
> > > > >
> > > > Should I keep the file "mtk-fd-v4l2-controls.h" which defines the
> > > > control ids under the folder "/include/uapi/linux"?
> > >
> > > We should define the CID base for the FD driver in v4l2-controls.h,
> > > but the controls themselves should be only defined inside the driver.
> > >
> > > For example:
> > > https://elixir.bootlin.com/linux/v5.4-rc8/source/include/uapi/linux/v4l2-controls.h#L178
> > > https://elixir.bootlin.com/linux/v5.4-rc8/source/drivers/media/i2c/adv7180.c#L181
> > >
> > > Best regards,
> > > Tomasz
> >
> > Appreciate for providing the example,
> > Would it be fine for me to put the private CID in the mtk_fd.h(which is
> > similar to before...) or follow the example to define inside
> > mtk_fd_40.c??
> >
> > The next version is almost ready, maybe I can send it when I ready in a
> > few days?
> 
> Since mtk_fd_40.c is the only place the definitions from mtk_fd.h are
> used, I'd suggest just moving all the contents to the .c file.
> 
> Best regards,
> Tomasz
Done,

Thanks and best regards,
Jerry


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

WARNING: multiple messages have this Message-ID (diff)
From: Jerry-ch Chen <Jerry-ch.Chen@mediatek.com>
To: Tomasz Figa <tfiga@chromium.org>
Cc: "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"Sean Cheng (鄭昇弘)" <Sean.Cheng@mediatek.com>,
	"Frederic Chen (陳俊元)" <Frederic.Chen@mediatek.com>,
	"Rynn Wu (吳育恩)" <Rynn.Wu@mediatek.com>,
	"Christie Yu (游雅惠)" <christie.yu@mediatek.com>,
	srv_heupstream <srv_heupstream@mediatek.com>,
	"Jungo Lin (林明俊)" <jungo.lin@mediatek.com>,
	"Po-Yang Huang (黃柏陽)" <po-yang.huang@mediatek.com>,
	"CK Hu (胡俊光)" <ck.hu@mediatek.com>,
	"Sj Huang (黃信璋)" <sj.huang@mediatek.com>,
	"yuzhao@chromium.org" <yuzhao@chromium.org>,
	"lkml@metux.net" <lkml@metux.net>,
	"zwisler@chromium.org" <zwisler@chromium.org>,
	"hans.verkuil@cisco.com" <hans.verkuil@cisco.com>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"laurent.pinchart+renesas@ideasonboard.com"
	<laurent.pinchart+renesas@ideasonboard.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: [RFC PATCH V3 3/3] platform: mtk-isp: Add Mediatek FD driver
Date: Tue, 3 Dec 2019 15:36:12 +0800	[thread overview]
Message-ID: <1575358572.22859.16.camel@mtksdccf07> (raw)
In-Reply-To: <CAAFQd5D-F1C4RyVeTzX=z72h6x0P5Gyb2X0EsH0YRQVAP6hGmQ@mail.gmail.com>

Hi Tomasz,

On Mon, 2019-12-02 at 18:48 +0900, Tomasz Figa wrote:
> On Sat, Nov 30, 2019 at 1:55 AM Jerry-ch Chen
> <Jerry-ch.Chen@mediatek.com> wrote:
> >
> > Hi Tomasz,
> >
> > On Wed, 2019-11-20 at 18:28 +0900, Tomasz Figa wrote:
> > > On Wed, Nov 20, 2019 at 5:11 PM Jerry-ch Chen
> > > <Jerry-ch.Chen@mediatek.com> wrote:
> > > >
> > > > Hi Tomasz,
> > > >
> > > > On Fri, 2019-10-25 at 11:52 +0800, Tomasz Figa wrote:
> > > > > On Tue, Oct 15, 2019 at 11:16:15AM +0800, Jerry-ch Chen wrote:
> > > > > > Hi Tomasz,
> > > > > >
> > > > > > On Fri, 2019-09-06 at 18:11 +0800, Jerry-ch Chen wrote:
> > > > > > > From: Jerry-ch Chen <jerry-ch.chen@mediatek.com>
> > > > > > >
> > > > > > > This patch adds the driver of Face Detection (FD) unit in
> > > > > > > Mediatek camera system, providing face detection function.
> > > > > > >
> > > > > > > The mtk-isp directory will contain drivers for multiple IP
> > > > > > > blocks found in Mediatek ISP system. It will include ISP Pass 1
> > > > > > > driver (CAM), sensor interface driver, DIP driver and face
> > > > > > > detection driver.
> > > > > > >
> > > > > > > Signed-off-by: Jerry-ch Chen <jerry-ch.chen@mediatek.com>
> > > > > > > ---
> > > > > > >  drivers/media/platform/Kconfig                |    2 +
> > > > > > >  drivers/media/platform/Makefile               |    2 +
> > > > > > >  drivers/media/platform/mtk-isp/fd/Kconfig     |   19 +
> > > > > > >  drivers/media/platform/mtk-isp/fd/Makefile    |    5 +
> > > > > > >  drivers/media/platform/mtk-isp/fd/mtk_fd.h    |  148 ++
> > > > > > >  drivers/media/platform/mtk-isp/fd/mtk_fd_40.c | 1219 +++++++++++++++++
> > > > > > >  include/uapi/linux/mtk-fd-v4l2-controls.h     |   69 +
> > > > > > >  include/uapi/linux/v4l2-controls.h            |    4 +
> > > > > > >  8 files changed, 1468 insertions(+)
> > > > > > >  create mode 100644 drivers/media/platform/mtk-isp/fd/Kconfig
> > > > > > >  create mode 100644 drivers/media/platform/mtk-isp/fd/Makefile
> > > > > > >  create mode 100644 drivers/media/platform/mtk-isp/fd/mtk_fd.h
> > > > > > >  create mode 100644 drivers/media/platform/mtk-isp/fd/mtk_fd_40.c
> > > > > > >  create mode 100644 include/uapi/linux/mtk-fd-v4l2-controls.h
> > > > > > >
> > > > >
> > > > > [snip]
[snip]
> > > > > [snip]
> > > > >
> > > > > > > +/* Set the face angle and directions to be detected */
> > > > > > > +#define V4L2_CID_MTK_FD_DETECT_POSE              (V4L2_CID_USER_MTK_FD_BASE + 1)
> > > > > > > +
> > > > > > > +/* Set image widths for an input image to be scaled down for face detection */
> > > > > > > +#define V4L2_CID_MTK_FD_SCALE_DOWN_IMG_WIDTH     (V4L2_CID_USER_MTK_FD_BASE + 2)
> > > > > > > +
> > > > > > > +/* Set image heights for an input image to be scaled down for face detection */
> > > > > > > +#define V4L2_CID_MTK_FD_SCALE_DOWN_IMG_HEIGHT    (V4L2_CID_USER_MTK_FD_BASE + 3)
> > > > > > > +
> > > > > > > +/* Set the length of scale down size array */
> > > > > > > +#define V4L2_CID_MTK_FD_SCALE_IMG_NUM            (V4L2_CID_USER_MTK_FD_BASE + 4)
> > > > > > > +
> > > > > > > +/* Set the detection speed, usually reducing accuracy. */
> > > > > > > +#define V4L2_CID_MTK_FD_DETECT_SPEED             (V4L2_CID_USER_MTK_FD_BASE + 5)
> > > > > > > +
> > > > > > > +/* Select the detection model or algorithm to be used. */
> > > > > > > +#define V4L2_CID_MTK_FD_DETECTION_MODEL          (V4L2_CID_USER_MTK_FD_BASE + 6)
> > > > > > > +
> > > > > > > +/* We reserve 16 controls for this driver. */
> > > > > > > +#define V4L2_CID_MTK_FD_MAX                      16
> > > > > > > +
> > > > > >
> > > > > > For these control IDs, I think the following should be remained as chip
> > > > > > specific controls.
> > > > > > V4L2_CID_MTK_FD_SCALE_DOWN_IMG_WIDTH,
> > > > > > V4L2_CID_MTK_FD_SCALE_DOWN_IMG_HEIGHT and V4L2_CID_MTK_FD_SCALE_IMG_NUM
> > > > > >
> > > > > > Hope there would be standardizing face detection api that cover the rest
> > > > > > controls: V4L2_CID_MTK_FD_DETECT_POSE, V4L2_CID_MTK_FD_DETECT_SPEED and
> > > > > > V4L2_CID_MTK_FD_DETECTION_MODEL
> > > > > >
> > > > > > Would you have any suggestions on how to propose the standard face
> > > > > > detection apis?
> > > > > >
> > > > >
> > > > > Given no follow up feedback from the community, I think we can keep them
> > > > > as driver-specific, but should make sure that they have some reasonable
> > > > > default values in case an application doesn't recognize them.
> > > > >
> > > > > Best regards,
> > > > > Tomasz
> > > > >
> > > > Should I keep the file "mtk-fd-v4l2-controls.h" which defines the
> > > > control ids under the folder "/include/uapi/linux"?
> > >
> > > We should define the CID base for the FD driver in v4l2-controls.h,
> > > but the controls themselves should be only defined inside the driver.
> > >
> > > For example:
> > > https://elixir.bootlin.com/linux/v5.4-rc8/source/include/uapi/linux/v4l2-controls.h#L178
> > > https://elixir.bootlin.com/linux/v5.4-rc8/source/drivers/media/i2c/adv7180.c#L181
> > >
> > > Best regards,
> > > Tomasz
> >
> > Appreciate for providing the example,
> > Would it be fine for me to put the private CID in the mtk_fd.h(which is
> > similar to before...) or follow the example to define inside
> > mtk_fd_40.c??
> >
> > The next version is almost ready, maybe I can send it when I ready in a
> > few days?
> 
> Since mtk_fd_40.c is the only place the definitions from mtk_fd.h are
> used, I'd suggest just moving all the contents to the .c file.
> 
> Best regards,
> Tomasz
Done,

Thanks and best regards,
Jerry


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-12-03  7:36 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-06 10:11 [RFC PATCH V3 0/3] media: platform: Add support for Face Detection (FD) on mt8183 SoC Jerry-ch Chen
2019-09-06 10:11 ` Jerry-ch Chen
2019-09-06 10:11 ` Jerry-ch Chen
2019-09-06 10:11 ` [RFC PATCH V3 1/3] dt-bindings: mt8183: Added FD dt-bindings Jerry-ch Chen
2019-09-06 10:11   ` Jerry-ch Chen
2019-09-06 10:11   ` Jerry-ch Chen
     [not found]   ` <20190906101125.3784-2-Jerry-Ch.chen-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>
2019-09-17 19:00     ` Rob Herring
2019-09-17 19:00       ` Rob Herring
2019-09-17 19:00       ` Rob Herring
2019-09-06 10:11 ` [RFC PATCH V3 2/3] dts: arm64: mt8183: Add FD nodes Jerry-ch Chen
2019-09-06 10:11   ` Jerry-ch Chen
2019-09-06 10:11   ` Jerry-ch Chen
2019-09-06 10:11 ` [RFC PATCH V3 3/3] platform: mtk-isp: Add Mediatek FD driver Jerry-ch Chen
2019-09-06 10:11   ` Jerry-ch Chen
2019-09-06 10:11   ` Jerry-ch Chen
2019-10-15  3:16   ` Jerry-ch Chen
2019-10-15  3:16     ` Jerry-ch Chen
2019-10-15  3:16     ` Jerry-ch Chen
2019-10-25  3:52     ` Tomasz Figa
2019-10-25  3:52       ` Tomasz Figa
2019-10-25  3:52       ` Tomasz Figa
2019-11-20  8:10       ` Jerry-ch Chen
2019-11-20  8:10         ` Jerry-ch Chen
2019-11-20  8:10         ` Jerry-ch Chen
2019-11-20  9:28         ` Tomasz Figa
2019-11-20  9:28           ` Tomasz Figa
2019-11-20  9:28           ` Tomasz Figa
2019-11-29 16:55           ` Jerry-ch Chen
2019-11-29 16:55             ` Jerry-ch Chen
2019-11-29 16:55             ` Jerry-ch Chen
2019-12-02  9:48             ` Tomasz Figa
2019-12-02  9:48               ` Tomasz Figa
2019-12-02  9:48               ` Tomasz Figa
2019-12-03  7:36               ` Jerry-ch Chen [this message]
2019-12-03  7:36                 ` Jerry-ch Chen
2019-12-03  7:36                 ` Jerry-ch Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1575358572.22859.16.camel@mtksdccf07 \
    --to=jerry-ch.chen@mediatek.com \
    --cc=Frederic.Chen@mediatek.com \
    --cc=Rynn.Wu@mediatek.com \
    --cc=Sean.Cheng@mediatek.com \
    --cc=christie.yu@mediatek.com \
    --cc=ck.hu@mediatek.com \
    --cc=devicetree@vger.kernel.org \
    --cc=hans.verkuil@cisco.com \
    --cc=jungo.lin@mediatek.com \
    --cc=laurent.pinchart+renesas@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=lkml@metux.net \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=po-yang.huang@mediatek.com \
    --cc=sj.huang@mediatek.com \
    --cc=srv_heupstream@mediatek.com \
    --cc=tfiga@chromium.org \
    --cc=yuzhao@chromium.org \
    --cc=zwisler@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.