2022-08-05 10:17:27

by Xinlei Lee (李昕磊)

[permalink] [raw]
Subject: [PATCH v2,1/2] soc: mediatek: Add mmsys func to adapt to dpi output for MT8186

From: Xinlei Lee <[email protected]>

Add mmsys func to manipulate dpi output format config for MT8186.

Signed-off-by: Jitao Shi <[email protected]>
Signed-off-by: Xinlei Lee <[email protected]>

---
drivers/soc/mediatek/mt8186-mmsys.h | 1 +
drivers/soc/mediatek/mtk-mmsys.c | 8 ++++++++
include/linux/soc/mediatek/mtk-mmsys.h | 3 +++
3 files changed, 12 insertions(+)

diff --git a/drivers/soc/mediatek/mt8186-mmsys.h b/drivers/soc/mediatek/mt8186-mmsys.h
index eb1ad9c37a9c..620c062e4893 100644
--- a/drivers/soc/mediatek/mt8186-mmsys.h
+++ b/drivers/soc/mediatek/mt8186-mmsys.h
@@ -3,6 +3,7 @@
#ifndef __SOC_MEDIATEK_MT8186_MMSYS_H
#define __SOC_MEDIATEK_MT8186_MMSYS_H

+#define MT8186_DPI_OUTPUT_FORMAT 0X400
#define MT8186_MMSYS_OVL_CON 0xF04
#define MT8186_MMSYS_OVL0_CON_MASK 0x3
#define MT8186_MMSYS_OVL0_2L_CON_MASK 0xC
diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c
index 9bbf0103b225..0e71a3296046 100644
--- a/drivers/soc/mediatek/mtk-mmsys.c
+++ b/drivers/soc/mediatek/mtk-mmsys.c
@@ -252,6 +252,14 @@ void mtk_mmsys_ddp_disconnect(struct device *dev,
}
EXPORT_SYMBOL_GPL(mtk_mmsys_ddp_disconnect);

+void mtk_mmsys_ddp_dpi_confing(struct device *dev, u32 mask, u32 val,
+ struct cmdq_pkt *cmdq_pkt)
+{
+ mtk_mmsys_update_bits(dev_get_drvdata(dev), MT8186_DPI_OUTPUT_FORMAT, mask,
+ val, cmdq_pkt);
+}
+EXPORT_SYMBOL_GPL(mtk_mmsys_ddp_dpi_confing);
+
void mtk_mmsys_merge_async_config(struct device *dev, int idx, int width, int height,
struct cmdq_pkt *cmdq_pkt)
{
diff --git a/include/linux/soc/mediatek/mtk-mmsys.h b/include/linux/soc/mediatek/mtk-mmsys.h
index 7a73305390ba..8218a906bb87 100644
--- a/include/linux/soc/mediatek/mtk-mmsys.h
+++ b/include/linux/soc/mediatek/mtk-mmsys.h
@@ -89,4 +89,7 @@ void mtk_mmsys_mixer_in_config(struct device *dev, int idx, bool alpha_sel, u16
void mtk_mmsys_mixer_in_channel_swap(struct device *dev, int idx, bool channel_swap,
struct cmdq_pkt *cmdq_pkt);

+void mtk_mmsys_ddp_dpi_confing(struct device *dev, u32 mask, u32 val,
+ struct cmdq_pkt *cmdq_pkt);
+
#endif /* __MTK_MMSYS_H */
--
2.18.0



2022-08-19 19:03:17

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: Re: [PATCH v2,1/2] soc: mediatek: Add mmsys func to adapt to dpi output for MT8186

Hi Xinlei,

On Fri, Aug 05, 2022 at 05:57:40PM +0800, [email protected] wrote:
> From: Xinlei Lee <[email protected]>
>
> Add mmsys func to manipulate dpi output format config for MT8186.

func -> function
config -> configuration

>
> Signed-off-by: Jitao Shi <[email protected]>

Same thing about the co-developed-by.

> Signed-off-by: Xinlei Lee <[email protected]>
>
> ---
> drivers/soc/mediatek/mt8186-mmsys.h | 1 +
> drivers/soc/mediatek/mtk-mmsys.c | 8 ++++++++
> include/linux/soc/mediatek/mtk-mmsys.h | 3 +++
> 3 files changed, 12 insertions(+)
>
> diff --git a/drivers/soc/mediatek/mt8186-mmsys.h b/drivers/soc/mediatek/mt8186-mmsys.h
> index eb1ad9c37a9c..620c062e4893 100644
> --- a/drivers/soc/mediatek/mt8186-mmsys.h
> +++ b/drivers/soc/mediatek/mt8186-mmsys.h
> @@ -3,6 +3,7 @@
> #ifndef __SOC_MEDIATEK_MT8186_MMSYS_H
> #define __SOC_MEDIATEK_MT8186_MMSYS_H
>
> +#define MT8186_DPI_OUTPUT_FORMAT 0X400

0x400

(lowercase "x")

> #define MT8186_MMSYS_OVL_CON 0xF04
> #define MT8186_MMSYS_OVL0_CON_MASK 0x3
> #define MT8186_MMSYS_OVL0_2L_CON_MASK 0xC
> diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c
> index 9bbf0103b225..0e71a3296046 100644
> --- a/drivers/soc/mediatek/mtk-mmsys.c
> +++ b/drivers/soc/mediatek/mtk-mmsys.c
> @@ -252,6 +252,14 @@ void mtk_mmsys_ddp_disconnect(struct device *dev,
> }
> EXPORT_SYMBOL_GPL(mtk_mmsys_ddp_disconnect);
>
> +void mtk_mmsys_ddp_dpi_confing(struct device *dev, u32 mask, u32 val,

confing -> config

But I'd add something to the name to indicate it handles specifically the
format:

mtk_mmsys_ddp_dpi_fmt_config

Thanks,
N?colas

2022-08-22 13:45:47

by Nícolas F. R. A. Prado

[permalink] [raw]
Subject: Re: [PATCH v2,1/2] soc: mediatek: Add mmsys func to adapt to dpi output for MT8186

On Mon, Aug 22, 2022 at 08:50:45PM +0800, xinlei.lee wrote:
[..]
> Hi N?colas:
>
> Thanks for your careful review.
> I will correct it in the next version:
> 1. Modify key nouns in the description;
> 2. Modify the label of jitao to Co-developed-by;

To be clear, you shouldn't change jitao's signed-off-by to a co-developed-by,
but add a co-developed-by. If you check the link I sent earlier [1], it should
be clear that you should have something like

Co-developed-by: Jitao Shi <[email protected]>
Signed-off-by: Jitao Shi <[email protected]>
Signed-off-by: Xinlei Lee <[email protected]>

[1] https://www.kernel.org/doc/html/latest/process/submitting-patches.html#when-to-use-acked-by-cc-and-co-developed-by

Thanks,
N?colas

> 3. Macro definition address lowercase problem and function naming.
>
> If there are no other questions, I will send out the second edition in
> the near future.
>
> Best Regards!
> xinlei
>