diff mbox series

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

Message ID 1661236702-30682-1-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. 23, 2022, 6:38 a.m. UTC
From: Xinlei Lee <xinlei.lee@mediatek.com>

Add mmsys function to manipulate dpi output format configuration for MT8186.

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>

---
 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. 23, 2022, 8:17 p.m. UTC | #1
On Tue, Aug 23, 2022 at 02:38:22PM +0800, xinlei.lee@mediatek.com wrote:
> From: Xinlei Lee <xinlei.lee@mediatek.com>
> 
> Add mmsys function to manipulate dpi output format configuration for MT8186.
> 
> 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>

Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Thanks,
Nícolas
Matthias Brugger Aug. 25, 2022, 3:04 p.m. UTC | #2
On 23/08/2022 22:17, Nícolas F. R. A. Prado wrote:
> On Tue, Aug 23, 2022 at 02:38:22PM +0800, xinlei.lee@mediatek.com wrote:
>> From: Xinlei Lee <xinlei.lee@mediatek.com>
>>
>> Add mmsys function to manipulate dpi output format configuration for MT8186.
>>
>> 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>
> 
> Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> 

Patch looks fine, I'll wait for v4 as there is still some discussion on the DRM 
part. Please try to fix the threading problem you had in sending this series.

Thanks,
Matthias
Xinlei Lee (李昕磊) Aug. 26, 2022, 6:12 a.m. UTC | #3
On Thu, 2022-08-25 at 17:04 +0200, Matthias Brugger wrote:
> 
> On 23/08/2022 22:17, Nícolas F. R. A. Prado wrote:
> > On Tue, Aug 23, 2022 at 02:38:22PM +0800, xinlei.lee@mediatek.com
> > wrote:
> > > From: Xinlei Lee <xinlei.lee@mediatek.com>
> > > 
> > > Add mmsys function to manipulate dpi output format configuration
> > > for MT8186.
> > > 
> > > 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>
> > 
> > Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> > 
> 
> Patch looks fine, I'll wait for v4 as there is still some discussion
> on the DRM 
> part. Please try to fix the threading problem you had in sending this
> series.
> 
> Thanks,
> Matthias

Hi Matthias:

Thanks for your review.

Before I send the next version, do you mean the treading problem you
are talking about is the problem I'm discussing in another patch in
this series, or something else?

Best Regards!
Xinlei
Nícolas F. R. A. Prado Aug. 26, 2022, 1:29 p.m. UTC | #4
On Fri, Aug 26, 2022 at 02:12:00PM +0800, xinlei.lee wrote:
> On Thu, 2022-08-25 at 17:04 +0200, Matthias Brugger wrote:
> > 
> > On 23/08/2022 22:17, Nícolas F. R. A. Prado wrote:
> > > On Tue, Aug 23, 2022 at 02:38:22PM +0800, xinlei.lee@mediatek.com
> > > wrote:
> > > > From: Xinlei Lee <xinlei.lee@mediatek.com>
> > > > 
> > > > Add mmsys function to manipulate dpi output format configuration
> > > > for MT8186.
> > > > 
> > > > 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>
> > > 
> > > Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> > > 
> > 
> > Patch looks fine, I'll wait for v4 as there is still some discussion
> > on the DRM 
> > part. Please try to fix the threading problem you had in sending this
> > series.
> > 
> > Thanks,
> > Matthias
> 
> Hi Matthias:
> 
> Thanks for your review.
> 
> Before I send the next version, do you mean the treading problem you
> are talking about is the problem I'm discussing in another patch in
> this series, or something else?

Hi Xinlei,

no, the threading problem Matthias is referring to is the fact that this version
of your series had two cover letters (patch 0) and a patch 2 [1], while patch 1
was sent in a different email thread [2]. The whole series (cover letter,
patches 1 and 2), should have been in the same email thread. Also, I noticed
that your cover letter lists the patches with incorrect prefixes "FROMLIST".

So something weird happened when you sent this version of the series. It was ok
in the previous version. So just make sure this is fixed when you send the next
version of the series (after we finish the discussion on patch 2).

[1] https://lore.kernel.org/linux-mediatek/1661235517-23699-1-git-send-email-xinlei.lee@mediatek.com/
[2] https://lore.kernel.org/linux-mediatek/1661236702-30682-1-git-send-email-xinlei.lee@mediatek.com/

Thanks,
Nícolas
Xinlei Lee (李昕磊) Aug. 29, 2022, 1:38 a.m. UTC | #5
On Fri, 2022-08-26 at 09:29 -0400, Nícolas F. R. A. Prado wrote:
> On Fri, Aug 26, 2022 at 02:12:00PM +0800, xinlei.lee wrote:
> > On Thu, 2022-08-25 at 17:04 +0200, Matthias Brugger wrote:
> > > 
> > > On 23/08/2022 22:17, Nícolas F. R. A. Prado wrote:
> > > > On Tue, Aug 23, 2022 at 02:38:22PM +0800, 
> > > > xinlei.lee@mediatek.com
> > > > wrote:
> > > > > From: Xinlei Lee <xinlei.lee@mediatek.com>
> > > > > 
> > > > > Add mmsys function to manipulate dpi output format
> > > > > configuration
> > > > > for MT8186.
> > > > > 
> > > > > 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>
> > > > 
> > > > Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> > > > 
> > > 
> > > Patch looks fine, I'll wait for v4 as there is still some
> > > discussion
> > > on the DRM 
> > > part. Please try to fix the threading problem you had in sending
> > > this
> > > series.
> > > 
> > > Thanks,
> > > Matthias
> > 
> > Hi Matthias:
> > 
> > Thanks for your review.
> > 
> > Before I send the next version, do you mean the treading problem
> > you
> > are talking about is the problem I'm discussing in another patch in
> > this series, or something else?
> 
> Hi Xinlei,
> 
> no, the threading problem Matthias is referring to is the fact that
> this version
> of your series had two cover letters (patch 0) and a patch 2 [1],
> while patch 1
> was sent in a different email thread [2]. The whole series (cover
> letter,
> patches 1 and 2), should have been in the same email thread. Also, I
> noticed
> that your cover letter lists the patches with incorrect prefixes
> "FROMLIST".
> 
> So something weird happened when you sent this version of the series.
> It was ok
> in the previous version. So just make sure this is fixed when you
> send the next
> version of the series (after we finish the discussion on patch 2).
> 
> [1] 
> https://lore.kernel.org/linux-mediatek/1661235517-23699-1-git-send-email-xinlei.lee@mediatek.com/
> [2] 
> https://lore.kernel.org/linux-mediatek/1661236702-30682-1-git-send-email-xinlei.lee@mediatek.com/
> 
> Thanks,
> Nícolas

Hi Nícolas:

Thanks for the thoughtful explanation of this, I may know what caused
the two patches not to be in a series. 
I will fix this and revise the "FROMLIST" tag in the cover letter in
the next version.

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..6eca3445bea3 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 114defd48298..aeda6e2bf80b 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_fmt_config(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_fmt_config);
+
 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 343e093f0fc3..08caa2b8a374 100644
--- a/include/linux/soc/mediatek/mtk-mmsys.h
+++ b/include/linux/soc/mediatek/mtk-mmsys.h
@@ -90,4 +90,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_fmt_config(struct device *dev, u32 mask, u32 val,
+				   struct cmdq_pkt *cmdq_pkt);
+
 #endif /* __MTK_MMSYS_H */