[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7ddd22081cfa7dabb512dde66519c3ea8908c37b.camel@mediatek.com>
Date: Fri, 6 Oct 2023 08:54:23 +0000
From: CK Hu (胡俊光) <ck.hu@...iatek.com>
To: Shawn Sung (宋孝謙)
<Shawn.Sung@...iatek.com>,
"matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"angelogioacchino.delregno@...labora.com"
<angelogioacchino.delregno@...labora.com>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"krzysztof.kozlowski+dt@...aro.org"
<krzysztof.kozlowski+dt@...aro.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-mediatek@...ts.infradead.org"
<linux-mediatek@...ts.infradead.org>,
Singo Chang (張興國)
<Singo.Chang@...iatek.com>,
"chunkuang.hu@...nel.org" <chunkuang.hu@...nel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
Jason-JH Lin (林睿祥)
<Jason-JH.Lin@...iatek.com>,
"mchehab@...nel.org" <mchehab@...nel.org>,
Nancy Lin (林欣螢) <Nancy.Lin@...iatek.com>,
"daniel@...ll.ch" <daniel@...ll.ch>,
"p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
"conor+dt@...nel.org" <conor+dt@...nel.org>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
"airlied@...il.com" <airlied@...il.com>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v7 18/23] drm/mediatek: Add Padding to OVL adaptor
Hi, Hsiao-chien:
On Fri, 2023-10-06 at 15:38 +0800, Hsiao Chien Sung wrote:
> Add MT8188 Padding to OVL adaptor to probe the driver.
>
> Reviewed-by: CK Hu <ck.hu@...iatek.com>
Remove my reviewed-by tag.
> Signed-off-by: Hsiao Chien Sung <shawn.sung@...iatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_disp_drv.h | 5 +++-
> .../gpu/drm/mediatek/mtk_disp_ovl_adaptor.c | 26
> +++++++++++++++++++
> 2 files changed, 30 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_drv.h
> b/drivers/gpu/drm/mediatek/mtk_disp_drv.h
> index f9fdb1268aa5..45b30a2fe11a 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_drv.h
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_drv.h
> @@ -159,5 +159,8 @@ size_t mtk_mdp_rdma_get_num_formats(struct device
> *dev);
>
> int mtk_padding_clk_enable(struct device *dev);
> void mtk_padding_clk_disable(struct device *dev);
> -void mtk_padding_config(struct device *dev, struct cmdq_pkt
> *cmdq_pkt);
> +void mtk_padding_start(struct device *dev);
> +void mtk_padding_stop(struct device *dev);
Move this to patch [17/23]
Regards,
CK
> +void mtk_padding_config(struct device *dev, struct cmdq_pkt
> *cmdq_pkt,
> + u32 width, u32 height, u32 right, u32 bottom,
> u32 color);
> #endif
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
> b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
> index 812a1df9732f..c326a658dc63 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl_adaptor.c
> @@ -30,6 +30,7 @@ enum mtk_ovl_adaptor_comp_type {
> OVL_ADAPTOR_TYPE_ETHDR,
> OVL_ADAPTOR_TYPE_MDP_RDMA,
> OVL_ADAPTOR_TYPE_MERGE,
> + OVL_ADAPTOR_TYPE_PADDING,
> OVL_ADAPTOR_TYPE_NUM,
> };
>
> @@ -47,6 +48,14 @@ enum mtk_ovl_adaptor_comp_id {
> OVL_ADAPTOR_MERGE1,
> OVL_ADAPTOR_MERGE2,
> OVL_ADAPTOR_MERGE3,
> + OVL_ADAPTOR_PADDING0,
> + OVL_ADAPTOR_PADDING1,
> + OVL_ADAPTOR_PADDING2,
> + OVL_ADAPTOR_PADDING3,
> + OVL_ADAPTOR_PADDING4,
> + OVL_ADAPTOR_PADDING5,
> + OVL_ADAPTOR_PADDING6,
> + OVL_ADAPTOR_PADDING7,
> OVL_ADAPTOR_ID_MAX
> };
>
> @@ -67,6 +76,7 @@ static const char * const
> private_comp_stem[OVL_ADAPTOR_TYPE_NUM] = {
> [OVL_ADAPTOR_TYPE_ETHDR] = "ethdr",
> [OVL_ADAPTOR_TYPE_MDP_RDMA] = "vdo1-rdma",
> [OVL_ADAPTOR_TYPE_MERGE] = "merge",
> + [OVL_ADAPTOR_TYPE_PADDING] = "padding",
> };
>
> static const struct mtk_ddp_comp_funcs _ethdr = {
> @@ -81,6 +91,13 @@ static const struct mtk_ddp_comp_funcs _merge = {
> .clk_disable = mtk_merge_clk_disable,
> };
>
> +static const struct mtk_ddp_comp_funcs _padding = {
> + .clk_enable = mtk_padding_clk_enable,
> + .clk_disable = mtk_padding_clk_disable,
> + .start = mtk_padding_start,
> + .stop = mtk_padding_stop,
> +};
> +
> static const struct mtk_ddp_comp_funcs _rdma = {
> .clk_enable = mtk_mdp_rdma_clk_enable,
> .clk_disable = mtk_mdp_rdma_clk_disable,
> @@ -100,6 +117,14 @@ static const struct ovl_adaptor_comp_match
> comp_matches[OVL_ADAPTOR_ID_MAX] = {
> [OVL_ADAPTOR_MERGE1] = { OVL_ADAPTOR_TYPE_MERGE,
> DDP_COMPONENT_MERGE2, 2, &_merge },
> [OVL_ADAPTOR_MERGE2] = { OVL_ADAPTOR_TYPE_MERGE,
> DDP_COMPONENT_MERGE3, 3, &_merge },
> [OVL_ADAPTOR_MERGE3] = { OVL_ADAPTOR_TYPE_MERGE,
> DDP_COMPONENT_MERGE4, 4, &_merge },
> + [OVL_ADAPTOR_PADDING0] = { OVL_ADAPTOR_TYPE_PADDING,
> DDP_COMPONENT_PADDING0, 0, &_padding },
> + [OVL_ADAPTOR_PADDING1] = { OVL_ADAPTOR_TYPE_PADDING,
> DDP_COMPONENT_PADDING1, 1, &_padding },
> + [OVL_ADAPTOR_PADDING2] = { OVL_ADAPTOR_TYPE_PADDING,
> DDP_COMPONENT_PADDING2, 2, &_padding },
> + [OVL_ADAPTOR_PADDING3] = { OVL_ADAPTOR_TYPE_PADDING,
> DDP_COMPONENT_PADDING3, 3, &_padding },
> + [OVL_ADAPTOR_PADDING4] = { OVL_ADAPTOR_TYPE_PADDING,
> DDP_COMPONENT_PADDING4, 4, &_padding },
> + [OVL_ADAPTOR_PADDING5] = { OVL_ADAPTOR_TYPE_PADDING,
> DDP_COMPONENT_PADDING5, 5, &_padding },
> + [OVL_ADAPTOR_PADDING6] = { OVL_ADAPTOR_TYPE_PADDING,
> DDP_COMPONENT_PADDING6, 6, &_padding },
> + [OVL_ADAPTOR_PADDING7] = { OVL_ADAPTOR_TYPE_PADDING,
> DDP_COMPONENT_PADDING7, 7, &_padding },
> };
>
> void mtk_ovl_adaptor_layer_config(struct device *dev, unsigned int
> idx,
> @@ -370,6 +395,7 @@ static int ovl_adaptor_comp_get_id(struct device
> *dev, struct device_node *node,
> }
>
> static const struct of_device_id mtk_ovl_adaptor_comp_dt_ids[] = {
> + { .compatible = "mediatek,mt8188-padding", .data = (void
> *)OVL_ADAPTOR_TYPE_PADDING },
> { .compatible = "mediatek,mt8195-disp-ethdr", .data = (void
> *)OVL_ADAPTOR_TYPE_ETHDR },
> { .compatible = "mediatek,mt8195-disp-merge", .data = (void
> *)OVL_ADAPTOR_TYPE_MERGE },
> { .compatible = "mediatek,mt8195-vdo1-rdma", .data = (void
> *)OVL_ADAPTOR_TYPE_MDP_RDMA },
Powered by blists - more mailing lists