From: "Enrico Weigelt, metux IT consult" <lkml@metux.net>
To: Jerry-ch Chen <Jerry-Ch.chen@mediatek.com>,
hans.verkuil@cisco.com,
laurent.pinchart+renesas@ideasonboard.com, tfiga@chromium.org,
matthias.bgg@gmail.com, mchehab@kernel.org
Cc: devicetree@vger.kernel.org, Sean.Cheng@mediatek.com,
Rynn.Wu@mediatek.com, srv_heupstream@mediatek.com,
po-yang.huang@mediatek.com, suleiman@chromium.org,
sj.huang@mediatek.com, jungo.lin@mediatek.com, shik@chromium.org,
yuzhao@chromium.org, linux-mediatek@lists.infradead.org,
zwisler@chromium.org, christie.yu@mediatek.com,
frederic.chen@mediatek.com, linux-arm-kernel@lists.infradead.org,
linux-media@vger.kernel.org
Subject: Re: [RFC PATCH V2 4/4] platform: mtk-isp: Add Mediatek FD driver
Date: Tue, 9 Jul 2019 12:56:08 +0200 [thread overview]
Message-ID: <eb3bb92d-5d44-0d45-2e90-abcdb96f595d@metux.net> (raw)
In-Reply-To: <1562661672-22439-5-git-send-email-Jerry-Ch.chen@mediatek.com>
On 09.07.19 10:41, Jerry-ch Chen wrote:
Hi,
> diff --git a/drivers/media/platform/mtk-isp/fd/mtk_fd.h b/drivers/media/platform/mtk-isp/fd/mtk_fd.h
> new file mode 100644
> index 0000000..289999b
> --- /dev/null
> +++ b/drivers/media/platform/mtk-isp/fd/mtk_fd.h
> @@ -0,0 +1,157 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +//
> +// Copyright (c) 2018 MediaTek Inc.
> +
> +#ifndef __MTK_FD_HW_H__
> +#define __MTK_FD_HW_H__
> +
> +#include <linux/io.h>
> +#include <linux/types.h>
> +#include <linux/platform_device.h>
> +#include <media/v4l2-ctrls.h>
> +#include <media/v4l2-device.h>
> +#include <media/videobuf2-v4l2.h>
> +
> +#define MTK_FD_OUTPUT_MIN_WIDTH 26U
> +#define MTK_FD_OUTPUT_MIN_HEIGHT 26U
> +#define MTK_FD_OUTPUT_MAX_WIDTH 640U
> +#define MTK_FD_OUTPUT_MAX_HEIGHT 480U
> +
> +/* Control the user defined image widths and heights
> + * to be scaled and performed face detection in FD HW.
> + * MTK FD support up to 14 user defined image sizes to perform face detection.
> + */
> +#define V4L2_CID_MTK_FD_SCALE_IMG_WIDTH (V4L2_CID_USER_MTK_FD_BASE + 1)
> +#define V4L2_CID_MTK_FD_SCALE_IMG_HEIGHT (V4L2_CID_USER_MTK_FD_BASE + 2)
I've got a *really* bad feeling about introducing chip specific
uapi stuff. (by the way: uapi stuff belongs into include/uapi/...)
Maybe you could tell us what that's *really* about, so we can find some
standard / chip-independent api for these things. That's one of the
major point of the kernel: hardware abstraction.
> +#define ENABLE_FD 0x111
> +#define FD_HW_ENABLE 0x4
> +#define FD_INT_EN 0x15c
> +#define FD_INT 0x168
> +#define FD_RESULT 0x178
> +#define FD_IRQ_MASK 0x001
> +
> +#define RS_MAX_BUF_SIZE 2288788
> +#define FD_MAX_SPEEDUP 7
> +#define FD_MAX_POSE_VAL 0xfffffffffffffff
> +#define FD_DEF_POSE_VAL 0x3ff
> +#define MAX_FD_SEL_NUM 1026
If that file is supposed to be included by anything beyond the driver
itself, we need proper prefixing. (same for anything else in here)
> diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
> index 3dcfc61..eae876e 100644
> --- a/include/uapi/linux/v4l2-controls.h
> +++ b/include/uapi/linux/v4l2-controls.h
> @@ -192,6 +192,10 @@ enum v4l2_colorfx {
> * We reserve 16 controls for this driver. */
> #define V4L2_CID_USER_IMX_BASE (V4L2_CID_USER_BASE + 0x10b0)
>
> +/* The base for the mediatek FD driver controls */
> +/* We reserve 16 controls for this driver. */
> +#define V4L2_CID_USER_MTK_FD_BASE (V4L2_CID_USER_BASE + 0x10d0)
Why only the base, but not the actual IDs in uapi ?
--mtx
--
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@metux.net -- +49-151-27565287
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2019-07-09 10:56 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-09 8:41 [RFC PATCH V2 0/4] media: platform: Add support for Face Detection (FD) on mt8183 SoC Jerry-ch Chen
2019-07-09 8:41 ` [RFC PATCH V2 1/4] dt-bindings: mt8183: Added FD dt-bindings Jerry-ch Chen
2019-07-12 7:16 ` CK Hu
2019-07-09 8:41 ` [RFC PATCH V2 2/4] dts: arm64: mt8183: Add FD nodes Jerry-ch Chen
2019-07-09 8:41 ` [RFC PATCH V2 3/4] media: platform: Add Mediatek FD driver KConfig Jerry-ch Chen
2019-09-05 12:30 ` Laurent Pinchart
2019-09-05 14:14 ` Jerry-ch Chen
2019-07-09 8:41 ` [RFC PATCH V2 4/4] platform: mtk-isp: Add Mediatek FD driver Jerry-ch Chen
2019-07-09 10:56 ` Enrico Weigelt, metux IT consult [this message]
2019-07-29 6:01 ` Jerry-ch Chen
2019-07-29 9:57 ` Tomasz Figa
2019-07-29 11:58 ` Jerry-ch Chen
2019-08-09 8:07 ` Tomasz Figa
2019-09-05 12:35 ` Laurent Pinchart
2019-08-02 8:28 ` Tomasz Figa
2019-08-25 9:18 ` Jerry-ch Chen
2019-08-26 6:36 ` Tomasz Figa
2019-08-28 2:00 ` Jerry-ch Chen
2019-08-30 8:33 ` Tomasz Figa
2019-09-02 11:47 ` Jerry-ch Chen
2019-09-03 5:19 ` Tomasz Figa
2019-09-03 6:44 ` Jerry-ch Chen
2019-09-03 7:04 ` Tomasz Figa
2019-09-03 11:46 ` Jerry-ch Chen
2019-09-03 12:05 ` Tomasz Figa
2019-09-04 3:38 ` Jerry-ch Chen
2019-09-04 4:15 ` Tomasz Figa
2019-09-04 6:09 ` Jerry-ch Chen
2019-09-04 6:34 ` Tomasz Figa
2019-09-04 8:09 ` Jerry-ch Chen
2019-09-04 8:25 ` Tomasz Figa
2019-09-04 9:01 ` Jerry-ch Chen
2019-09-04 9:03 ` Tomasz Figa
2019-09-04 9:26 ` Jerry-ch Chen
2019-09-04 13:12 ` Tomasz Figa
2019-09-04 13:19 ` Jerry-ch Chen
2019-09-05 7:02 ` Jerry-ch Chen
2019-09-05 7:13 ` Tomasz Figa
2019-09-05 8:16 ` Jerry-ch Chen
2019-09-05 8:52 ` Tomasz Figa
2019-09-05 13: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=eb3bb92d-5d44-0d45-2e90-abcdb96f595d@metux.net \
--to=lkml@metux.net \
--cc=Jerry-Ch.chen@mediatek.com \
--cc=Rynn.Wu@mediatek.com \
--cc=Sean.Cheng@mediatek.com \
--cc=christie.yu@mediatek.com \
--cc=devicetree@vger.kernel.org \
--cc=frederic.chen@mediatek.com \
--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=matthias.bgg@gmail.com \
--cc=mchehab@kernel.org \
--cc=po-yang.huang@mediatek.com \
--cc=shik@chromium.org \
--cc=sj.huang@mediatek.com \
--cc=srv_heupstream@mediatek.com \
--cc=suleiman@chromium.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).