Linux-mediatek Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: "robh@kernel.org" <robh@kernel.org>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"Olivia Wen (温倩苓)" <Olivia.Wen@mediatek.com>
Cc: "linux-media@vger.kernel.org" <linux-media@vger.kernel.org>,
	Project_Global_Chrome_Upstream_Group
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"krzk+dt@kernel.org" <krzk+dt@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"Teddy Chen (陳乾元)" <Teddy.Chen@mediatek.com>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"yunkec@chromium.org" <yunkec@chromium.org>
Subject: Re: [PATCH v1 04/10] media: mediatek: isp: Add V4L2 flow support for ImgSys driver
Date: Mon, 26 May 2025 07:16:45 +0000	[thread overview]
Message-ID: <07ce826311b73276bc30d29c141b24223319c932.camel@mediatek.com> (raw)
In-Reply-To: <20250524115144.3832748-5-olivia.wen@mediatek.com>

On Sat, 2025-05-24 at 19:49 +0800, Olivia Wen wrote:
> The ImgSys driver is implemented as a series of patches, with this patch
> focusing on the V4L2 flow. The MediaTek's Image System (ImgSys), also
> known as ISP Pass2. ImgSys is a memory-to-memory hardware device
> designed for advanced image processing tasks. It is composed of multiple
> hardware components, including TRAW, DIP, PQDIP, ME, and WPE.
> 
> TRAW (Tile RAW):
> - Provides multiple downscaled resizers to support multi-scale noise
>   reduction.
> - Supports RAW/RGB format conversion.
> 
> DIP (Digital Image Processing) and PQDIP (Picture Quality DIP):
> - Supports such as temporal and spatial noise reduction (TNR/SNR),
>   edge enhancement (EE), and sharpness (SHP).
> - PQDIP also supports image scaling and rotation.
> 
> ME (Motion Estimation):
> - Supports motion estimation between two consecutive frames.
> 
> WPE (Warping Engine):
> - Handles image warping and de-warping processes.
> 
> The ImgSys driver, primarily utilized for Google Chromebook products,
> uses Multi-Frame Combined Noise Reduction technology to enhance image
> quality.
> 
> Below is a simplified architecture of the ImgSys driver:
> User -> V4L2 Framework -> ImgSys Driver
>      -> SCP (It packages the hardware settings into commands)
>      -> ImgSys Driver
>      -> CMDQ (The packaged commands are sent to the hardware via GCE)
>      -> Hardware

You break this driver into multiple patches by these function block,
but this would make reviewer (include me) hard to review.
The better way is

1. Add imgsys driver with basic function (include v4l2 framework, scp, cmdq. The basic function may be downscale and format convert only)
2. Add DIP function
3. Add ME function
4. Add WPE function

Let the first patch as simple as possible but it should work.

> 
> Signed-off-by: Olivia Wen <olivia.wen@mediatek.com>
> ---
>  drivers/media/platform/mediatek/Kconfig       |    1 +
>  drivers/media/platform/mediatek/Makefile      |    1 +
>  drivers/media/platform/mediatek/isp/Kconfig   |   23 +
>  .../platform/mediatek/isp/isp_7x/Makefile     |    6 +
>  .../mediatek/isp/isp_7x/imgsys/Makefile       |   11 +
>  .../imgsys/modules/mtk_dip_v4l2_vnode.h       |  594 ++++++
>  .../isp_7x/imgsys/modules/mtk_me_v4l2_vnode.h |  386 ++++
>  .../imgsys/modules/mtk_pqdip_v4l2_vnode.h     |  149 ++
>  .../imgsys/modules/mtk_traw_v4l2_vnode.h      |  371 ++++
>  .../imgsys/modules/mtk_wpe_v4l2_vnode.h       |  317 ++++
>  .../isp/isp_7x/imgsys/mtk_header_desc.h       |   28 +
>  .../isp/isp_7x/imgsys/mtk_imgsys-dev.c        |  238 +++
>  .../isp/isp_7x/imgsys/mtk_imgsys-dev.h        |  427 +++++
>  .../isp/isp_7x/imgsys/mtk_imgsys-formats.c    |  139 ++
>  .../isp/isp_7x/imgsys/mtk_imgsys-formats.h    |   72 +
>  .../isp/isp_7x/imgsys/mtk_imgsys-module_ops.h |   27 +
>  .../isp/isp_7x/imgsys/mtk_imgsys-of.c         |   39 +
>  .../isp/isp_7x/imgsys/mtk_imgsys-of.h         |   55 +
>  .../isp/isp_7x/imgsys/mtk_imgsys-sys.c        |   27 +
>  .../isp/isp_7x/imgsys/mtk_imgsys-sys.h        |   50 +
>  .../isp/isp_7x/imgsys/mtk_imgsys-v4l2.c       | 1684 +++++++++++++++++
>  .../isp/isp_7x/imgsys/mtk_imgsys-vnode_id.h   |  100 +
>  .../isp/isp_7x/imgsys/mtk_imgsys_v4l2_vnode.h |  135 ++
>  23 files changed, 4880 insertions(+)
>  create mode 100644 drivers/media/platform/mediatek/isp/Kconfig
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/Makefile
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/Makefile
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/modules/mtk_dip_v4l2_vnode.h
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/modules/mtk_me_v4l2_vnode.h
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/modules/mtk_pqdip_v4l2_vnode.h
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/modules/mtk_traw_v4l2_vnode.h
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/modules/mtk_wpe_v4l2_vnode.h
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_header_desc.h
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_imgsys-dev.c
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_imgsys-dev.h
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_imgsys-formats.c
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_imgsys-formats.h
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_imgsys-module_ops.h
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_imgsys-of.c
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_imgsys-of.h
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_imgsys-sys.c
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_imgsys-sys.h
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_imgsys-v4l2.c
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_imgsys-vnode_id.h
>  create mode 100644 drivers/media/platform/mediatek/isp/isp_7x/imgsys/mtk_imgsys_v4l2_vnode.h

Place these files in drivers/media/platform/mediatek/imgsys.
This is the first SoC which support imgsys driver so it's not necessary to use so deep folder structure.

Regards,
CK



  reply	other threads:[~2025-05-26  7:17 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-24 11:49 [PATCH v1 00/10] Add MediaTek ISP7 Image Syatem driver Olivia Wen
2025-05-24 11:49 ` [PATCH v1 01/10] dt-bindings: media: Add MediaTek mt8188 ImgSys components Olivia Wen
2025-05-24 13:37   ` Rob Herring (Arm)
2025-05-24 11:49 ` [PATCH v1 02/10] dt-bindings: media: Add MT8188 ImgSys's LARB Olivia Wen
2025-05-24 13:37   ` Rob Herring (Arm)
2025-05-25  4:55   ` Krzysztof Kozlowski
2025-05-24 11:49 ` [PATCH v1 03/10] uapi: linux: Add MediaTek Imgsys user API Olivia Wen
2025-05-26  2:13   ` CK Hu (胡俊光)
2025-05-24 11:49 ` [PATCH v1 04/10] media: mediatek: isp: Add V4L2 flow support for ImgSys driver Olivia Wen
2025-05-26  7:16   ` CK Hu (胡俊光) [this message]
2025-05-24 11:49 ` [PATCH v1 05/10] media: mediatek: isp: Add the Imgsys LARBs device Olivia Wen
2025-05-24 11:49 ` [PATCH v1 06/10] media: mediatek: isp: Add module operations structure for ImgSys Olivia Wen
2025-05-24 11:49 ` [PATCH v1 07/10] media: mediatek: isp: Add CMDQ support for ImgSys driver Olivia Wen
2025-05-24 11:50 ` [PATCH v1 08/10] media: mediatek: isp: Add SCP " Olivia Wen
2025-05-24 11:50 ` [PATCH v1 09/10] media: mediatek: isp: Add image processing flow Olivia Wen
2025-05-24 11:50 ` [PATCH v1 10/10] media: mediatek: isp: Add normal data dump flow Olivia Wen

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=07ce826311b73276bc30d29c141b24223319c932.camel@mediatek.com \
    --to=ck.hu@mediatek.com \
    --cc=Olivia.Wen@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=Teddy.Chen@mediatek.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mchehab@kernel.org \
    --cc=robh@kernel.org \
    --cc=yunkec@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