2022-08-23 07:32:28

by Xinlei Lee (李昕磊)

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

From: Xinlei Lee <[email protected]>

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

Co-developed-by: Jitao Shi <[email protected]>
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..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 */
--
2.18.0


2022-08-23 21:02:30

by Nícolas F. R. A. Prado

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

On Tue, Aug 23, 2022 at 02:38:22PM +0800, [email protected] wrote:
> From: Xinlei Lee <[email protected]>
>
> Add mmsys function to manipulate dpi output format configuration for MT8186.
>
> Co-developed-by: Jitao Shi <[email protected]>
> Signed-off-by: Jitao Shi <[email protected]>
> Signed-off-by: Xinlei Lee <[email protected]>

Reviewed-by: N?colas F. R. A. Prado <[email protected]>

Thanks,
N?colas

2022-08-25 15:08:38

by Matthias Brugger

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



On 23/08/2022 22:17, Nícolas F. R. A. Prado wrote:
> On Tue, Aug 23, 2022 at 02:38:22PM +0800, [email protected] wrote:
>> From: Xinlei Lee <[email protected]>
>>
>> Add mmsys function to manipulate dpi output format configuration for MT8186.
>>
>> Co-developed-by: Jitao Shi <[email protected]>
>> Signed-off-by: Jitao Shi <[email protected]>
>> Signed-off-by: Xinlei Lee <[email protected]>
>
> Reviewed-by: Nícolas F. R. A. Prado <[email protected]>
>

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

2022-08-26 13:39:32

by Nícolas F. R. A. Prado

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

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, [email protected]
> > > wrote:
> > > > From: Xinlei Lee <[email protected]>
> > > >
> > > > Add mmsys function to manipulate dpi output format configuration
> > > > for MT8186.
> > > >
> > > > Co-developed-by: Jitao Shi <[email protected]>
> > > > Signed-off-by: Jitao Shi <[email protected]>
> > > > Signed-off-by: Xinlei Lee <[email protected]>
> > >
> > > Reviewed-by: N?colas F. R. A. Prado <[email protected]>
> > >
> >
> > 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/[email protected]/
[2] https://lore.kernel.org/linux-mediatek/[email protected]/

Thanks,
N?colas