diff mbox series

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

Message ID 1659693461-27057-2-git-send-email-xinlei.lee@mediatek.com (mailing list archive)
State New, archived
Headers show
Series Add dpi output format control for MT8186 | expand

Commit Message

Xinlei Lee (李昕磊) Aug. 5, 2022, 9:57 a.m. UTC
From: Xinlei Lee <xinlei.lee@mediatek.com>

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

Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>

---
 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(+)

Comments

Nícolas F. R. A. Prado Aug. 19, 2022, 6:54 p.m. UTC | #1
Hi Xinlei,

On Fri, Aug 05, 2022 at 05:57:40PM +0800, xinlei.lee@mediatek.com wrote:
> From: Xinlei Lee <xinlei.lee@mediatek.com>
> 
> Add mmsys func to manipulate dpi output format config for MT8186.

func -> function
config -> configuration

> 
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>

Same thing about the co-developed-by.

> Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
> 
> ---
>  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
Xinlei Lee (李昕磊) Aug. 22, 2022, 12:50 p.m. UTC | #2
On Fri, 2022-08-19 at 14:54 -0400, Nícolas F. R. A. Prado wrote:
> Hi Xinlei,
> 
> On Fri, Aug 05, 2022 at 05:57:40PM +0800, xinlei.lee@mediatek.com
> wrote:
> > From: Xinlei Lee <xinlei.lee@mediatek.com>
> > 
> > Add mmsys func to manipulate dpi output format config for MT8186.
> 
> func -> function
> config -> configuration
> 
> > 
> > Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> 
> Same thing about the co-developed-by.
> 
> > Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
> > 
> > ---
> >  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

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;
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
Nícolas F. R. A. Prado Aug. 22, 2022, 1:23 p.m. UTC | #3
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 <jitao.shi@mediatek.com>
Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>

[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
>
Xinlei Lee (李昕磊) Aug. 23, 2022, 1:53 a.m. UTC | #4
On Mon, 2022-08-22 at 09:23 -0400, Nícolas F. R. A. Prado wrote:
> 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 <jitao.shi@mediatek.com>
> Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
> Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com>
> 
> [1] 
> https://urldefense.com/v3/__https://www.kernel.org/doc/html/latest/process/submitting-patches.html*when-to-use-acked-by-cc-and-co-developed-by__;Iw!!CTRNKA9wMg0ARbw!1bj8UrTx32ihWiD-1dbKF8XsXg4tod3zHr90aemam8bnL_4jgcA9oa44UiF9ILFN9A$
>  
> 
> 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
> > 

Hi Nícolas:

Yes, maybe my statement is not very accurate, thank you for your
explanation.

Best Regards!
Xinlei
diff mbox series

Patch

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 */