Re: [PATCH v6 11/16] drm/mediatek: add display MDP RDMA support for MT8195

2021-10-24 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Wed, 2021-10-20 at 00:38 +0800, Chun-Kuang Hu wrote: > Hi, Nancy: > > Nancy.Lin 於 2021年10月4日 週一 下午2:21寫道: > > > > Add MDP_RDMA driver for MT8195. MDP_RDMA is the DMA engine of > > the ovl_adaptor component. > > > > Signed-off-by: Nancy.Lin > > --- > >

Re: [PATCH v6 12/16] drm/mediatek: add display merge api support for MT8195

2021-10-24 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Thu, 2021-10-21 at 23:02 +0800, Chun-Kuang Hu wrote: > > > Hi, Nancy: > > Nancy.Lin 於 2021年10月4日 週一 下午2:21寫道: > > > > Add merge new API. > > 1. Vdosys1 merge1~merge4 support HW mute function, so add unmute > > API. > > 2. Add merge new advance config

Re: [PATCH v6 13/16] drm/mediatek: add ETHDR support for MT8195

2021-10-24 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Thu, 2021-10-21 at 23:44 +0800, Chun-Kuang Hu wrote: > Hi, Nancy: > > Nancy.Lin 於 2021年10月4日 週一 下午2:22寫道: > > > > ETHDR is a part of ovl_adaptor. > > ETHDR is designed for HDR video and graphics conversion in the > > external > > display path. It handle

Re: [PATCH v6 14/16] drm/mediatek: add ovl_adaptor support for MT8195

2021-10-24 Thread Nancy . Lin
Hi Angelo, Thanks for the review. On Fri, 2021-10-15 at 09:49 +0200, AngeloGioacchino Del Regno wrote: > > Add ovl_adaptor driver for MT8195. > > Ovl_adaptor is an encapsulated module and designed for simplified > > DRM control flow. This module is composed of 8 RDMAs, 4 MERGEs and > > an ETHDR.

Re: [PATCH v6 14/16] drm/mediatek: add ovl_adaptor support for MT8195

2021-10-26 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Tue, 2021-10-26 at 07:11 +0800, Chun-Kuang Hu wrote: > Hi, Nancy: > > Nancy.Lin 於 2021年10月4日 週一 下午2:21寫道: > > > > Add ovl_adaptor driver for MT8195. > > Ovl_adaptor is an encapsulated module and designed for simplified > > DRM control flow. This modul

Re: [PATCH v5 13/16] drm/mediatek: add ETHDR support for MT8195

2021-09-23 Thread Nancy . Lin
uct device *dev) > > +{ > > + struct mtk_ethdr *priv = dev_get_drvdata(dev); > > + struct mtk_ethdr_comp *mixer = &priv- > > >ethdr_comp[ETHDR_MIXER]; > > + > > + writel(0, mixer->regs + MIX_EN); > > + writel(1, mixer->regs +

Re: [PATCH v5 15/16] drm/mediatek: modify mediatek-drm for mt8195 multi mmsys support

2021-10-03 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Wed, 2021-09-29 at 08:03 +0800, Chun-Kuang Hu wrote: > > Hi, Nancy: > > Nancy.Lin 於 2021年9月6日 週一 下午3:15寫道: > > > > MT8195 have two mmsys. Modify drm for MT8195 multi-mmsys support. > > The two mmsys (vdosys0 and vdosys1) will bring up two drm drivers,

[PATCH v6 05/16] arm64: dts: mt8195: add display node for vdosys1

2021-10-03 Thread Nancy . Lin
Add display node for vdosys1. Signed-off-by: Nancy.Lin --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 222 +++ 1 file changed, 222 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index e136761345db..9c44829b2727

[PATCH v6 02/16] dt-bindings: mediatek: add vdosys1 MERGE property for mt8195

2021-10-03 Thread Nancy . Lin
MT8195 vdosys1 merge1 to merge4 have HW mute function. Add MERGE additional mute property description. Signed-off-by: Nancy.Lin --- .../devicetree/bindings/display/mediatek/mediatek,merge.yaml | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/devicetree/bindings/display/med

[PATCH v6 04/16] dt-bindings: reset: mt8195: add vdosys1 reset control bit

2021-10-03 Thread Nancy . Lin
Add vdosys1 reset control bit for MT8195 platform. Signed-off-by: Nancy.Lin --- include/dt-bindings/reset/mt8195-resets.h | 12 1 file changed, 12 insertions(+) diff --git a/include/dt-bindings/reset/mt8195-resets.h b/include/dt-bindings/reset/mt8195-resets.h index a26bccc8b957..a

[PATCH v6 00/16] Add MediaTek SoC DRM (vdosys1) support for mt8195

2021-10-03 Thread Nancy . Lin
The hardware path of vdosys1 with DPTx output need to go through by several modules, such as, OVL_ADAPTOR and MERGE. Add DRM and these modules support by the patches below: Changes in v6: - rebase on kernel-5.15-rc1. - change mbox label to gce0 for dts node of vdosys1. - modify mmsys reset num f

[PATCH v6 06/16] soc: mediatek: add mtk-mmsys support for mt8195 vdosys1

2021-10-03 Thread Nancy . Lin
Add mt8195 vdosys1 clock driver name and routing table to the driver data of mtk-mmsys. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h| 136 + drivers/soc/mediatek/mtk-mmsys.c | 10 ++ include/linux/soc/mediatek/mtk-mmsys.h | 2 + 3 files ch

[PATCH v6 16/16] drm/mediatek: add mediatek-drm of vdosys1 support for MT8195

2021-10-03 Thread Nancy . Lin
Add driver data of mt8195 vdosys1 to mediatek-drm and the sub driver. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 4 ++ drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 13 ++--- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 30 +-- drivers/gpu/drm/mediatek/m

[PATCH v6 10/16] soc: mediatek: add mtk-mutex support for mt8195 vdosys1

2021-10-03 Thread Nancy . Lin
Add mtk-mutex support for mt8195 vdosys1. The vdosys1 path component contains ovl_adaptor, merge5, and dp_intf1. Ovl_adaptor is composed of several sub-elements, so change it to support multi-bit control. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mtk-mutex.c | 296 ++-

[PATCH v6 03/16] dt-bindings: mediatek: add ethdr definition for mt8195

2021-10-03 Thread Nancy . Lin
Add vdosys1 ETHDR definition. Signed-off-by: Nancy.Lin --- .../display/mediatek/mediatek,ethdr.yaml | 145 ++ 1 file changed, 145 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,ethdr.yaml diff --git a/Documentation/devicetree

[PATCH v6 09/16] soc: mediatek: mmsys: modify reset controller for MT8195 vdosys1

2021-10-03 Thread Nancy . Lin
MT8195 vdosys1 has more than 32 reset bits and a different reset base than other chips. Modify mmsys for support 64 bit and different reset base. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h | 1 + drivers/soc/mediatek/mtk-mmsys.c| 21 - drivers/soc/m

[PATCH v6 12/16] drm/mediatek: add display merge api support for MT8195

2021-10-03 Thread Nancy . Lin
Add merge new API. 1. Vdosys1 merge1~merge4 support HW mute function, so add unmute API. 2. Add merge new advance config API. The original merge API is mtk_ddp_comp_funcs function prototype. The API interface parameters cannot be modified, so add a new config API for extension. 3. Add merge e

[PATCH v6 01/16] dt-bindings: mediatek: add vdosys1 RDMA definition for mt8195

2021-10-03 Thread Nancy . Lin
Add vdosys1 RDMA definition. Signed-off-by: Nancy.Lin --- .../arm/mediatek/mediatek,mdp-rdma.yaml | 77 +++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mdp-rdma.yaml diff --git a/Documentation/devicetree/bi

[PATCH v6 14/16] drm/mediatek: add ovl_adaptor support for MT8195

2021-10-03 Thread Nancy . Lin
Add ovl_adaptor driver for MT8195. Ovl_adaptor is an encapsulated module and designed for simplified DRM control flow. This module is composed of 8 RDMAs, 4 MERGEs and an ETHDR. Two RDMAs merge into one layer, so this module support 4 layers. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek

[PATCH v6 13/16] drm/mediatek: add ETHDR support for MT8195

2021-10-03 Thread Nancy . Lin
ETHDR is a part of ovl_adaptor. ETHDR is designed for HDR video and graphics conversion in the external display path. It handles multiple HDR input types and performs tone mapping, color space/color format conversion, and then combine different layers, output the required HDR or SDR signal to the s

[PATCH v6 07/16] soc: mediatek: add mtk-mmsys config API for mt8195 vdosys1

2021-10-03 Thread Nancy . Lin
Add mmsys config API. The config API is used for config mmsys reg. Some mmsys regs need to be setting according to the HW engine binding to the mmsys simultaneously. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h| 62 ++ drivers/soc/mediatek/mtk-mmsy

[PATCH v6 08/16] soc: mediatek: add cmdq support of mtk-mmsys config API for mt8195 vdosys1

2021-10-03 Thread Nancy . Lin
Add cmdq support for mtk-mmsys config API. The mmsys config register settings need to take effect with the other HW settings(like OVL_ADAPTOR...) at the same vblanking time. If we use CPU to write the mmsys reg, we can't guarantee all the settings can be written in the same vblanking time. Cmdq is

[PATCH v6 15/16] drm/mediatek: modify mediatek-drm for mt8195 multi mmsys support

2021-10-03 Thread Nancy . Lin
MT8195 have two mmsys. Modify drm for MT8195 multi-mmsys support. The two mmsys (vdosys0 and vdosys1) will bring up two drm drivers, only one drm driver register as the drm device. Each drm driver binds its own component. The last bind drm driver allocates and registers the drm device to drm core.

[PATCH v6 11/16] drm/mediatek: add display MDP RDMA support for MT8195

2021-10-03 Thread Nancy . Lin
Add MDP_RDMA driver for MT8195. MDP_RDMA is the DMA engine of the ovl_adaptor component. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/Makefile | 3 +- drivers/gpu/drm/mediatek/mtk_disp_drv.h | 7 + drivers/gpu/drm/mediatek/mtk_mdp_rdma.c | 305 drivers

[PATCH v7 02/20] dt-bindings: mediatek: add vdosys1 MERGE property for mt8195

2021-10-29 Thread Nancy . Lin
MT8195 vdosys1 merge1 to merge4 have HW mute function. Add MERGE additional mute property description. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu Acked-By: AngeloGioacchino Del Regno --- .../devicetree/bindings/display/mediatek/mediatek,merge.yaml | 4 1 file changed, 4 insertio

[PATCH v7 19/20] drm/mediatek: modify mediatek-drm for mt8195 multi mmsys support

2021-10-29 Thread Nancy . Lin
MT8195 have two mmsys. Modify drm for MT8195 multi-mmsys support. The two mmsys (vdosys0 and vdosys1) will bring up two drm drivers, only one drm driver register as the drm device. Each drm driver binds its own component. The last bind drm driver allocates and registers the drm device to drm core.

[PATCH v7 04/20] dt-bindings: reset: mt8195: add vdosys1 reset control bit

2021-10-29 Thread Nancy . Lin
Add vdosys1 reset control bit for MT8195 platform. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- include/dt-bindings/reset/mt8195-resets.h | 12 1 file changed, 12 insertions(+) diff --git a/include/dt-bindings/reset/mt8195-resets.h b/include/dt-bindings/reset/mt8195-re

[PATCH v7 16/20] drm/mediatek: add ETHDR support for MT8195

2021-10-29 Thread Nancy . Lin
ETHDR is a part of ovl_adaptor. ETHDR is designed for HDR video and graphics conversion in the external display path. It handles multiple HDR input types and performs tone mapping, color space/color format conversion, and then combine different layers, output the required HDR or SDR signal to the s

[PATCH v7 11/20] soc: mediatek: add mtk-mutex support for mt8195 vdosys1

2021-10-29 Thread Nancy . Lin
Add mtk-mutex support for mt8195 vdosys1. The vdosys1 path component contains ovl_adaptor, merge5, and dp_intf1. Ovl_adaptor is composed of several sub-elements. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mtk-mutex.c | 54 1 file changed, 54 insertions(+)

[PATCH v7 03/20] dt-bindings: mediatek: add ethdr definition for mt8195

2021-10-29 Thread Nancy . Lin
Add vdosys1 ETHDR definition. Signed-off-by: Nancy.Lin --- .../display/mediatek/mediatek,ethdr.yaml | 147 ++ 1 file changed, 147 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,ethdr.yaml diff --git a/Documentation/devicetree

[PATCH v7 18/20] drm/mediatek: add ovl_adaptor support for MT8195

2021-10-29 Thread Nancy . Lin
Add ovl_adaptor driver for MT8195. Ovl_adaptor is an encapsulated module and designed for simplified DRM control flow. This module is composed of 8 RDMAs, 4 MERGEs and an ETHDR. Two RDMAs merge into one layer, so this module support 4 layers. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek

[PATCH v7 10/20] soc: mediatek: change the mutex defines and the mutex_mod type

2021-10-29 Thread Nancy . Lin
This is a preparation for adding support for mt8195 vdosys1 mutex. The vdosys1 path component contains ovl_adaptor, merge5, and dp_intf1. Ovl_adaptor is composed of several sub-elements, so change it to support multi-bit control. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mtk-mutex.c | 24

[PATCH v7 17/20] drm/mediatek: add mediatek-drm plane color encoding info

2021-10-29 Thread Nancy . Lin
Add plane color encoding information for color space conversion. It's a preparation for adding support for mt8195 ovl_adaptor mdp_rdma csc control. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 + drivers/gpu/drm/mediatek/mtk_drm_plane.h | 1 + 2 files changed, 2 inse

[PATCH v7 12/20] drm/mediatek: add display MDP RDMA support for MT8195

2021-10-29 Thread Nancy . Lin
Add MDP_RDMA driver for MT8195. MDP_RDMA is the DMA engine of the ovl_adaptor component. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/Makefile | 3 +- drivers/gpu/drm/mediatek/mtk_disp_drv.h | 7 + drivers/gpu/drm/mediatek/mtk_mdp_rdma.c | 316 drivers

[PATCH v7 13/20] drm/mediatek: add display merge advance config API for MT8195

2021-10-29 Thread Nancy . Lin
Add merge new advance config API. The original merge API is mtk_ddp_comp_funcs function prototype. The API interface parameters cannot be modified, so add a new config API for extension. This is the preparation for ovl_adaptor merge control. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/

[PATCH v7 07/20] soc: mediatek: add mtk-mmsys config API for mt8195 vdosys1

2021-10-29 Thread Nancy . Lin
Add mmsys config API. The config API is used for config mmsys reg. Some mmsys regs need to be setting according to the HW engine binding to the mmsys simultaneously. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h| 62 ++ drivers/soc/mediatek/mtk-mmsy

[PATCH v7 15/20] drm/mediatek: add display merge mute/unmute support for MT8195

2021-10-29 Thread Nancy . Lin
Add merge mute/unmute setting for MT8195. MT8195 Vdosys1 merge1~merge4 support HW mute function. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_disp_m

[PATCH v7 05/20] arm64: dts: mt8195: add display node for vdosys1

2021-10-29 Thread Nancy . Lin
Add display node for vdosys1. Signed-off-by: Nancy.Lin --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 222 +++ 1 file changed, 222 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index e136761345db..a69a7b57e070

[PATCH v7 14/20] drm/mediatek: add display merge start/stop API for cmdq support

2021-10-29 Thread Nancy . Lin
Add merge start/stop API for cmdq support. The ovl_adaptor merges are configured with each drm plane update. Need to enable/disable merge with cmdq making sure all the settings taken effect in the same vblank. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_disp_drv.h | 2 ++ driver

[PATCH v7 00/20] Add MediaTek SoC DRM (vdosys1) support for mt8195

2021-10-29 Thread Nancy . Lin
The hardware path of vdosys1 with DPTx output need to go through by several modules, such as, OVL_ADAPTOR and MERGE. Add DRM and these modules support by the patches below: Changes in v7: - rebase on vdosys0 series v12 (ref[5]) - add dma description in ethdr binding document. - refine vdosys1 bi

[PATCH v7 20/20] drm/mediatek: add mediatek-drm of vdosys1 support for MT8195

2021-10-29 Thread Nancy . Lin
Add driver data of mt8195 vdosys1 to mediatek-drm and the sub driver. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 4 ++ drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 13 ++--- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 30 +-- drivers/gpu/drm/mediatek/m

[PATCH v7 01/20] dt-bindings: mediatek: add vdosys1 RDMA definition for mt8195

2021-10-29 Thread Nancy . Lin
Add vdosys1 RDMA definition. Signed-off-by: Nancy.Lin --- .../arm/mediatek/mediatek,mdp-rdma.yaml | 77 +++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mdp-rdma.yaml diff --git a/Documentation/devicetree/bi

[PATCH v7 09/20] soc: mediatek: mmsys: modify reset controller for MT8195 vdosys1

2021-10-29 Thread Nancy . Lin
MT8195 vdosys1 has more than 32 reset bits and a different reset base than other chips. Modify mmsys for support 64 bit and different reset base. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h | 1 + drivers/soc/mediatek/mtk-mmsys.c| 21 - drivers/soc/m

[PATCH v7 06/20] soc: mediatek: add mtk-mmsys support for mt8195 vdosys1

2021-10-29 Thread Nancy . Lin
Add mt8195 vdosys1 clock driver name and routing table to the driver data of mtk-mmsys. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h| 136 + drivers/soc/mediatek/mtk-mmsys.c | 10 ++ include/linux/soc/mediatek/mtk-mmsys.h | 2 + 3 files ch

[PATCH v7 08/20] soc: mediatek: add cmdq support of mtk-mmsys config API for mt8195 vdosys1

2021-10-29 Thread Nancy . Lin
Add cmdq support for mtk-mmsys config API. The mmsys config register settings need to take effect with the other HW settings(like OVL_ADAPTOR...) at the same vblanking time. If we use CPU to write the mmsys reg, we can't guarantee all the settings can be written in the same vblanking time. Cmdq is

Re: [PATCH v7 16/20] drm/mediatek: add ETHDR support for MT8195

2021-11-16 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Fri, 2021-11-05 at 07:59 +0800, Chun-Kuang Hu wrote: > Hi, Nancy: > > Nancy.Lin 於 2021年10月29日 週五 下午3:52寫道: > > > > ETHDR is a part of ovl_adaptor. > > ETHDR is designed for HDR video and graphics conversion in the > > external > > display path. It hand

Re: [PATCH v7 18/20] drm/mediatek: add ovl_adaptor support for MT8195

2021-11-16 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Fri, 2021-11-05 at 08:29 +0800, Chun-Kuang Hu wrote: > Hi, Nancy: > > Nancy.Lin 於 2021年10月29日 週五 下午3:52寫道: > > > > Add ovl_adaptor driver for MT8195. > > Ovl_adaptor is an encapsulated module and designed for simplified > > DRM control flow. This module

Re: [PATCH v7 19/20] drm/mediatek: modify mediatek-drm for mt8195 multi mmsys support

2021-11-16 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Thu, 2021-11-11 at 07:44 +0800, Chun-Kuang Hu wrote: > Hi, Nancy: > > Nancy.Lin 於 2021年10月29日 週五 下午3:52寫道: > > > > MT8195 have two mmsys. Modify drm for MT8195 multi-mmsys support. > > The two mmsys (vdosys0 and vdosys1) will bring up two drm drivers, >

Re: [PATCH v7 20/20] drm/mediatek: add mediatek-drm of vdosys1 support for MT8195

2021-11-16 Thread Nancy . Lin
Hi Chun-Kuang, Thanks for the review. On Fri, 2021-11-12 at 07:30 +0800, Chun-Kuang Hu wrote: > Hi, Nancy: > > Nancy.Lin 於 2021年10月29日 週五 下午3:52寫道: > > > > Add driver data of mt8195 vdosys1 to mediatek-drm and the sub > > driver. > > > > Signed-off-by: Nancy.Lin > > --- > > drivers/gpu/drm/

[PATCH v8 04/22] dt-bindings: reset: mt8195: add vdosys1 reset control bit

2021-11-17 Thread Nancy . Lin
Add vdosys1 reset control bit for MT8195 platform. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- include/dt-bindings/reset/mt8195-resets.h | 12 1 file changed, 12 insertions(+) diff --git a/include/dt-bindings/reset/mt8195-resets.h b/include/dt-bindings/reset/mt8195-re

[PATCH v8 01/22] dt-bindings: mediatek: add vdosys1 RDMA definition for mt8195

2021-11-17 Thread Nancy . Lin
Add vdosys1 RDMA definition. Signed-off-by: Nancy.Lin --- .../arm/mediatek/mediatek,mdp-rdma.yaml | 77 +++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mdp-rdma.yaml diff --git a/Documentation/devicetree/bi

[PATCH v8 14/22] drm/mediatek: add display merge start/stop API for cmdq support

2021-11-17 Thread Nancy . Lin
Add merge start/stop API for cmdq support. The ovl_adaptor merges are configured with each drm plane update. Need to enable/disable merge with cmdq making sure all the settings taken effect in the same vblank. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_

[PATCH v8 09/22] soc: mediatek: mmsys: modify reset controller for MT8195 vdosys1

2021-11-17 Thread Nancy . Lin
MT8195 vdosys1 has more than 32 reset bits and a different reset base than other chips. Modify mmsys for support 64 bit and different reset base. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h | 1 + drivers/soc/mediatek/mtk-mmsys.c| 21 - drivers/soc/m

[PATCH v8 07/22] soc: mediatek: add mtk-mmsys config API for mt8195 vdosys1

2021-11-17 Thread Nancy . Lin
Add mmsys config API. The config API is used for config mmsys reg. Some mmsys regs need to be setting according to the HW engine binding to the mmsys simultaneously. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h| 62 ++ drivers/soc/mediatek/mtk-mmsy

[PATCH v8 18/22] drm/mediatek: add mediatek-drm plane color encoding info

2021-11-17 Thread Nancy . Lin
Add plane color encoding information for color space conversion. It's a preparation for adding support for mt8195 ovl_adaptor mdp_rdma csc control. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 + drivers/gpu/drm/mediatek/mtk_drm_plane.h |

[PATCH v8 05/22] arm64: dts: mt8195: add display node for vdosys1

2021-11-17 Thread Nancy . Lin
Add display node for vdosys1. Signed-off-by: Nancy.Lin --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 222 +++ 1 file changed, 222 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index e136761345db..a69a7b57e070

[PATCH v8 08/22] soc: mediatek: add cmdq support of mtk-mmsys config API for mt8195 vdosys1

2021-11-17 Thread Nancy . Lin
Add cmdq support for mtk-mmsys config API. The mmsys config register settings need to take effect with the other HW settings(like OVL_ADAPTOR...) at the same vblanking time. If we use CPU to write the mmsys reg, we can't guarantee all the settings can be written in the same vblanking time. Cmdq is

[PATCH v8 20/22] drm/mediatek: modify mediatek-drm for mt8195 multi mmsys support

2021-11-17 Thread Nancy . Lin
MT8195 have two mmsys. Modify drm for MT8195 multi-mmsys support. The two mmsys (vdosys0 and vdosys1) will bring up two drm drivers, only one drm driver register as the drm device. Each drm driver binds its own component. The last bind drm driver allocates and registers the drm device to drm core.

[PATCH v8 02/22] dt-bindings: mediatek: add vdosys1 MERGE property for mt8195

2021-11-17 Thread Nancy . Lin
MT8195 vdosys1 merge1 to merge4 have HW mute function. Add MERGE additional mute property description. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu Acked-By: AngeloGioacchino Del Regno --- .../devicetree/bindings/display/mediatek/mediatek,merge.yaml | 4 1 file changed, 4 insertio

[PATCH v8 00/22] Add MediaTek SoC DRM (vdosys1) support for mt8195

2021-11-17 Thread Nancy . Lin
The hardware path of vdosys1 with DPTx output need to go through by several modules, such as, OVL_ADAPTOR and MERGE. Add DRM and these modules support by the patches below: Changes in v8: - separate merge async reset to new patch. - separate drm ovl_adaptor sub driver to new patch. - fix reviewe

[PATCH v8 13/22] drm/mediatek: add display merge advance config API for MT8195

2021-11-17 Thread Nancy . Lin
Add merge new advance config API. The original merge API is mtk_ddp_comp_funcs function prototype. The API interface parameters cannot be modified, so add a new config API for extension. This is the preparation for ovl_adaptor merge control. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --

[PATCH v8 17/22] drm/mediatek: add ETHDR support for MT8195

2021-11-17 Thread Nancy . Lin
ETHDR is a part of ovl_adaptor. ETHDR is designed for HDR video and graphics conversion in the external display path. It handles multiple HDR input types and performs tone mapping, color space/color format conversion, and then combine different layers, output the required HDR or SDR signal to the s

[PATCH v8 03/22] dt-bindings: mediatek: add ethdr definition for mt8195

2021-11-17 Thread Nancy . Lin
Add vdosys1 ETHDR definition. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- .../display/mediatek/mediatek,ethdr.yaml | 147 ++ 1 file changed, 147 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,ethdr.yaml diff --git

[PATCH v8 21/22] drm/mediatek: add drm ovl_adaptor sub driver for MT8195

2021-11-17 Thread Nancy . Lin
Add drm ovl_adaptor sub driver. Bring up ovl_adaptor sub driver if the component exists in the path. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 16 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 30 --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp

[PATCH v8 19/22] drm/mediatek: add ovl_adaptor support for MT8195

2021-11-17 Thread Nancy . Lin
Add ovl_adaptor driver for MT8195. Ovl_adaptor is an encapsulated module and designed for simplified DRM control flow. This module is composed of 8 RDMAs, 4 MERGEs and an ETHDR. Two RDMAs merge into one layer, so this module support 4 layers. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu -

[PATCH v8 06/22] soc: mediatek: add mtk-mmsys support for mt8195 vdosys1

2021-11-17 Thread Nancy . Lin
Add mt8195 vdosys1 clock driver name and routing table to the driver data of mtk-mmsys. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h| 136 + drivers/soc/mediatek/mtk-mmsys.c | 10 ++ include/linux/soc/mediatek/mtk-mmsys.h | 2 + 3 files ch

[PATCH v8 11/22] soc: mediatek: add mtk-mutex support for mt8195 vdosys1

2021-11-17 Thread Nancy . Lin
Add mtk-mutex support for mt8195 vdosys1. The vdosys1 path component contains ovl_adaptor, merge5, and dp_intf1. Ovl_adaptor is composed of several sub-elements. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mtk-mutex.c | 54 1 file changed, 54 insertions(+)

[PATCH v8 22/22] drm/mediatek: add mediatek-drm of vdosys1 support for MT8195

2021-11-17 Thread Nancy . Lin
Add driver data of mt8195 vdosys1 to mediatek-drm. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 96f505b2e571..a333

[PATCH v8 16/22] drm/mediatek: add display merge async reset control

2021-11-17 Thread Nancy . Lin
Add merge async reset control in mtk_merge_stop. Async hw doesn't do self reset on each sof signal(start of frame), so need to reset the async to clear the hw status for the next merge start. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 4 1 file changed, 4 inser

[PATCH v8 10/22] soc: mediatek: change the mutex defines and the mutex_mod type

2021-11-17 Thread Nancy . Lin
This is a preparation for adding support for mt8195 vdosys1 mutex. The vdosys1 path component contains ovl_adaptor, merge5, and dp_intf1. Ovl_adaptor is composed of several sub-elements, so change it to support multi-bit control. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mtk-mutex.c | 24

[PATCH v8 15/22] drm/mediatek: add display merge mute/unmute support for MT8195

2021-11-17 Thread Nancy . Lin
Add merge mute/unmute setting for MT8195. MT8195 Vdosys1 merge1~merge4 support HW mute function. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 23 ++- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers

[PATCH v8 12/22] drm/mediatek: add display MDP RDMA support for MT8195

2021-11-17 Thread Nancy . Lin
Add MDP_RDMA driver for MT8195. MDP_RDMA is the DMA engine of the ovl_adaptor component. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/Makefile | 3 +- drivers/gpu/drm/mediatek/mtk_disp_drv.h | 7 + drivers/gpu/drm/mediatek/mtk_mdp_rdma.c | 316 +

[PATCH v9 07/22] soc: mediatek: add cmdq support of mtk-mmsys config API for mt8195 vdosys1

2021-11-29 Thread Nancy . Lin
Add cmdq support for mtk-mmsys config API. The mmsys config register settings need to take effect with the other HW settings(like OVL_ADAPTOR...) at the same vblanking time. If we use CPU to write the mmsys reg, we can't guarantee all the settings can be written in the same vblanking time. Cmdq is

[PATCH v9 02/22] dt-bindings: mediatek: add vdosys1 MERGE property for mt8195

2021-11-29 Thread Nancy . Lin
MT8195 vdosys1 merge1 to merge4 have HW mute function. Add MERGE additional mute property description. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu Acked-By: AngeloGioacchino Del Regno --- .../devicetree/bindings/display/mediatek/mediatek,merge.yaml | 4 1 file changed, 4 insertio

[PATCH v9 04/22] dt-bindings: reset: mt8195: add vdosys1 reset control bit

2021-11-29 Thread Nancy . Lin
Add vdosys1 reset control bit for MT8195 platform. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- include/dt-bindings/reset/mt8195-resets.h | 12 1 file changed, 12 insertions(+) diff --git a/include/dt-bindings/reset/mt8195-resets.h b/include/dt-bindings/reset/mt8195-re

[PATCH v9 10/22] soc: mediatek: add mtk-mutex support for mt8195 vdosys1

2021-11-29 Thread Nancy . Lin
Add mtk-mutex support for mt8195 vdosys1. The vdosys1 path component contains ovl_adaptor, merge5, and dp_intf1. Ovl_adaptor is composed of several sub-elements. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mtk-mutex.c | 54 1 file changed, 54 insertions(+)

[PATCH v9 08/22] soc: mediatek: mmsys: modify reset controller for MT8195 vdosys1

2021-11-29 Thread Nancy . Lin
MT8195 vdosys1 has more than 32 reset bits and a different reset base than other chips. Modify mmsys for support 64 bit and different reset base. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h | 1 + drivers/soc/mediatek/mtk-mmsys.c| 21 - drivers/soc/m

[PATCH v9 06/22] soc: mediatek: add mtk-mmsys config API for mt8195 vdosys1

2021-11-29 Thread Nancy . Lin
Add mmsys config API. The config API is used for config mmsys reg. Some mmsys regs need to be setting according to the HW engine binding to the mmsys simultaneously. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h| 62 ++ drivers/soc/mediatek/mtk-mmsy

[PATCH v9 16/22] drm/mediatek: add ETHDR support for MT8195

2021-11-29 Thread Nancy . Lin
ETHDR is a part of ovl_adaptor. ETHDR is designed for HDR video and graphics conversion in the external display path. It handles multiple HDR input types and performs tone mapping, color space/color format conversion, and then combine different layers, output the required HDR or SDR signal to the s

[PATCH v9 13/22] drm/mediatek: add display merge start/stop API for cmdq support

2021-11-29 Thread Nancy . Lin
Add merge start/stop API for cmdq support. The ovl_adaptor merges are configured with each drm plane update. Need to enable/disable merge with cmdq making sure all the settings taken effect in the same vblank. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_

[PATCH v9 11/22] drm/mediatek: add display MDP RDMA support for MT8195

2021-11-29 Thread Nancy . Lin
Add MDP_RDMA driver for MT8195. MDP_RDMA is the DMA engine of the ovl_adaptor component. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/Makefile | 3 +- drivers/gpu/drm/mediatek/mtk_disp_drv.h | 7 + drivers/gpu/drm/mediatek/mtk_drm_drv.c | 1 + dr

[PATCH v9 01/22] dt-bindings: mediatek: add vdosys1 RDMA definition for mt8195

2021-11-29 Thread Nancy . Lin
Add vdosys1 RDMA definition. Signed-off-by: Nancy.Lin --- .../arm/mediatek/mediatek,mdp-rdma.yaml | 77 +++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mdp-rdma.yaml diff --git a/Documentation/devicetree/bi

[PATCH v9 14/22] drm/mediatek: add display merge mute/unmute support for MT8195

2021-11-29 Thread Nancy . Lin
Add merge mute/unmute setting for MT8195. MT8195 Vdosys1 merge1~merge4 support HW mute function. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_disp

[PATCH v9 20/22] drm/mediatek: add drm ovl_adaptor sub driver for MT8195

2021-11-29 Thread Nancy . Lin
Add drm ovl_adaptor sub driver. Bring up ovl_adaptor sub driver if the component exists in the path. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_drm_crtc.c | 16 drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 30 --- drivers/gpu/drm/mediatek/mtk_drm_ddp_comp

[PATCH v9 21/22] drm/mediatek: add mediatek-drm of vdosys1 support for MT8195

2021-11-29 Thread Nancy . Lin
Add driver data of mt8195 vdosys1 to mediatek-drm. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 36430f956b4f..e851

[PATCH v9 03/22] dt-bindings: mediatek: add ethdr definition for mt8195

2021-11-29 Thread Nancy . Lin
Add vdosys1 ETHDR definition. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- .../display/mediatek/mediatek,ethdr.yaml | 147 ++ 1 file changed, 147 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,ethdr.yaml diff --git

[PATCH v9 22/22] arm64: dts: mt8195: add display node for vdosys1

2021-11-29 Thread Nancy . Lin
Add display node for vdosys1. Signed-off-by: Nancy.Lin --- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 222 +++ 1 file changed, 222 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt8195.dtsi b/arch/arm64/boot/dts/mediatek/mt8195.dtsi index e136761345db..a69a7b57e070

[PATCH v9 18/22] drm/mediatek: add ovl_adaptor support for MT8195

2021-11-29 Thread Nancy . Lin
Add ovl_adaptor driver for MT8195. Ovl_adaptor is an encapsulated module and designed for simplified DRM control flow. This module is composed of 8 RDMAs, 4 MERGEs and an ETHDR. Two RDMAs merge into one layer, so this module support 4 layers. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu -

[PATCH v9 00/22] Add MediaTek SoC DRM (vdosys1) support for mt8195

2021-11-29 Thread Nancy . Lin
The hardware path of vdosys1 with DPTx output need to go through by several modules, such as, OVL_ADAPTOR and MERGE. Add DRM and these modules support by the patches below: Changes in v9: - rebase on kernel-5.16-rc1 - rebase on vdosys0 series v13. (ref [5]) - fix ovl_adaptor sub driver is brough

[PATCH v9 12/22] drm/mediatek: add display merge advance config API for MT8195

2021-11-29 Thread Nancy . Lin
Add merge new advance config API. The original merge API is mtk_ddp_comp_funcs function prototype. The API interface parameters cannot be modified, so add a new config API for extension. This is the preparation for ovl_adaptor merge control. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --

[PATCH v9 05/22] soc: mediatek: add mtk-mmsys support for mt8195 vdosys1

2021-11-29 Thread Nancy . Lin
Add mt8195 vdosys1 clock driver name and routing table to the driver data of mtk-mmsys. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mt8195-mmsys.h| 136 + drivers/soc/mediatek/mtk-mmsys.c | 10 ++ include/linux/soc/mediatek/mtk-mmsys.h | 2 + 3 files ch

[PATCH v9 17/22] drm/mediatek: add mediatek-drm plane color encoding info

2021-11-29 Thread Nancy . Lin
Add plane color encoding information for color space conversion. It's a preparation for adding support for mt8195 ovl_adaptor mdp_rdma csc control. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_drm_plane.c | 1 + drivers/gpu/drm/mediatek/mtk_drm_plane.h |

[PATCH v9 15/22] drm/mediatek: add display merge async reset control

2021-11-29 Thread Nancy . Lin
Add merge async reset control in mtk_merge_stop. Async hw doesn't do self reset on each sof signal(start of frame), so need to reset the async to clear the hw status for the next merge start. Signed-off-by: Nancy.Lin --- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 4 1 file changed, 4 inser

[PATCH v9 09/22] soc: mediatek: change the mutex defines and the mutex_mod type

2021-11-29 Thread Nancy . Lin
This is a preparation for adding support for mt8195 vdosys1 mutex. The vdosys1 path component contains ovl_adaptor, merge5, and dp_intf1. Ovl_adaptor is composed of several sub-elements, so change it to support multi-bit control. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mtk-mutex.c | 24

[PATCH v9 19/22] drm/mediatek: modify mediatek-drm for mt8195 multi mmsys support

2021-11-29 Thread Nancy . Lin
MT8195 have two mmsys. Modify drm for MT8195 multi-mmsys support. The two mmsys (vdosys0 and vdosys1) will bring up two drm drivers, only one drm driver register as the drm device. Each drm driver binds its own component. The last bind drm driver allocates and registers the drm device to drm core.

Re: [PATCH v9 16/22] drm/mediatek: add ETHDR support for MT8195

2021-12-07 Thread Nancy . Lin
Hi Philipp, Thanks for the review. On Tue, 2021-11-30 at 10:46 +0100, Philipp Zabel wrote: > Hi Nancy, > > On Tue, 2021-11-30 at 11:35 +0800, Nancy.Lin wrote: > [...] > > +void mtk_ethdr_stop(struct device *dev) > > +{ > > + struct mtk_ethdr *priv = dev_get_drvdata(dev); > > + struct mtk_eth

[PATCH v10 00/22] Add MediaTek SoC DRM (vdosys1) support for mt8195

2021-12-07 Thread Nancy . Lin
The hardware path of vdosys1 with DPTx output need to go through by several modules, such as, OVL_ADAPTOR and MERGE. Add DRM and these modules support by the patches below: Changes in v10: - refine ethdr reset control using devm_reset_control_array_get_optional_exclusive - fix ovl_adaptor mtk_o

[PATCH v10 01/22] dt-bindings: mediatek: add vdosys1 RDMA definition for mt8195

2021-12-07 Thread Nancy . Lin
Add vdosys1 RDMA definition. Signed-off-by: Nancy.Lin --- .../arm/mediatek/mediatek,mdp-rdma.yaml | 77 +++ 1 file changed, 77 insertions(+) create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mdp-rdma.yaml diff --git a/Documentation/devicetree/bi

[PATCH v10 10/22] soc: mediatek: add mtk-mutex support for mt8195 vdosys1

2021-12-07 Thread Nancy . Lin
Add mtk-mutex support for mt8195 vdosys1. The vdosys1 path component contains ovl_adaptor, merge5, and dp_intf1. Ovl_adaptor is composed of several sub-elements. Signed-off-by: Nancy.Lin --- drivers/soc/mediatek/mtk-mutex.c | 54 1 file changed, 54 insertions(+)

[PATCH v10 14/22] drm/mediatek: add display merge mute/unmute support for MT8195

2021-12-07 Thread Nancy . Lin
Add merge mute/unmute setting for MT8195. MT8195 Vdosys1 merge1~merge4 support HW mute function. Signed-off-by: Nancy.Lin Reviewed-by: Chun-Kuang Hu --- drivers/gpu/drm/mediatek/mtk_disp_merge.c | 13 + 1 file changed, 13 insertions(+) diff --git a/drivers/gpu/drm/mediatek/mtk_disp

<    1   2   3   4   >