* Re: [PATCH v27 01/11] dt-bindings: arm: mediatek: mmsys: add vdosys1 compatible for MT8195
[not found] ` <20221103032512.9144-2-nancy.lin@mediatek.com>
@ 2022-11-03 19:39 ` Nícolas F. R. A. Prado
2022-11-04 9:19 ` Nancy Lin (林欣螢)
0 siblings, 1 reply; 7+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-11-03 19:39 UTC (permalink / raw)
To: Nancy.Lin
Cc: Rob Herring, Matthias Brugger, Chun-Kuang Hu, Philipp Zabel, wim,
AngeloGioacchino Del Regno, linux, David Airlie, Daniel Vetter,
Nathan Chancellor, Nick Desaulniers, jason-jh . lin,
Yongqiang Niu, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, dri-devel, llvm, singo.chang,
Project_Global_Chrome_Upstream_Group
On Thu, Nov 03, 2022 at 11:25:02AM +0800, Nancy.Lin wrote:
> Add vdosys1 mmsys compatible for MT8195 platform.
>
> For MT8195, VDOSYS0 and VDOSYS1 are 2 display HW pipelines binding to
> 2 different power domains, different clock drivers and different
> mediatek-drm drivers.
>
> Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com>
> Change-Id: I8065205ce44baa417f58176adaae9e1eefa6eadb
No Change-Id tag, please. There are some other commits with it as well.
Otherwise,
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Thanks,
Nícolas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v27 06/11] soc: mediatek: add mtk-mmsys config API for mt8195 vdosys1
[not found] ` <20221103032512.9144-7-nancy.lin@mediatek.com>
@ 2022-11-03 19:56 ` Nícolas F. R. A. Prado
2022-11-04 9:31 ` Nancy Lin (林欣螢)
0 siblings, 1 reply; 7+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-11-03 19:56 UTC (permalink / raw)
To: Nancy.Lin
Cc: Rob Herring, Matthias Brugger, Chun-Kuang Hu, Philipp Zabel, wim,
AngeloGioacchino Del Regno, linux, David Airlie, Daniel Vetter,
Nathan Chancellor, Nick Desaulniers, jason-jh . lin,
Yongqiang Niu, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, dri-devel, llvm, singo.chang,
Project_Global_Chrome_Upstream_Group
On Thu, Nov 03, 2022 at 11:25:07AM +0800, Nancy.Lin wrote:
> Add four mmsys config APIs. The config APIs are used for config
> mmsys reg. Some mmsys regs need to be set according to the
> HW engine binding to the mmsys simultaneously.
>
> 1. mtk_mmsys_merge_async_config: config merge async width/height.
> async is used for cross-clock domain synchronization.
> 2. mtk_mmsys_hdr_confing: config hdr backend async width/height.
[..]
> --- a/drivers/soc/mediatek/mtk-mmsys.c
> +++ b/drivers/soc/mediatek/mtk-mmsys.c
[..]
> +void mtk_mmsys_hdr_confing(struct device *dev, int be_width, int be_height)
confing -> config
Need to update the following commit as well.
Thanks,
Nícolas
> +{
> + mtk_mmsys_update_bits(dev_get_drvdata(dev), MT8195_VDO1_HDRBE_ASYNC_CFG_WD, ~0,
> + be_height << 16 | be_width);
> +}
> +EXPORT_SYMBOL_GPL(mtk_mmsys_hdr_confing);
[..]
> +void mtk_mmsys_hdr_confing(struct device *dev, int be_width, int be_height);
[..]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v27 05/11] soc: mediatek: refine code to use mtk_mmsys_update_bits API
[not found] ` <20221103032512.9144-6-nancy.lin@mediatek.com>
@ 2022-11-03 20:32 ` Nícolas F. R. A. Prado
2022-11-04 9:29 ` Nancy Lin (林欣螢)
0 siblings, 1 reply; 7+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-11-03 20:32 UTC (permalink / raw)
To: Nancy.Lin
Cc: Rob Herring, Matthias Brugger, Chun-Kuang Hu, Philipp Zabel, wim,
AngeloGioacchino Del Regno, linux, David Airlie, Daniel Vetter,
Nathan Chancellor, Nick Desaulniers, jason-jh . lin,
Yongqiang Niu, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, dri-devel, llvm, singo.chang,
Project_Global_Chrome_Upstream_Group
On Thu, Nov 03, 2022 at 11:25:06AM +0800, Nancy.Lin wrote:
[..]
> --- a/drivers/soc/mediatek/mtk-mmsys.c
> +++ b/drivers/soc/mediatek/mtk-mmsys.c
[..]
> +static void mtk_mmsys_update_bits(struct mtk_mmsys *mmsys, u32 offset, u32 mask, u32 val)
> +{
> + u32 tmp;
> +
> + tmp = readl_relaxed(mmsys->regs + offset);
> + tmp = (tmp & ~mask) | val;
You should mask the value before writing to prevent bad values from overwriting
bits outside the mask.
tmp = (tmp & ~mask) | (val & mask);
With that,
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Thanks,
Nícolas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v27 08/11] soc: mediatek: mmsys: add mmsys for support 64 reset bits
[not found] ` <20221103032512.9144-9-nancy.lin@mediatek.com>
@ 2022-11-03 20:45 ` Nícolas F. R. A. Prado
0 siblings, 0 replies; 7+ messages in thread
From: Nícolas F. R. A. Prado @ 2022-11-03 20:45 UTC (permalink / raw)
To: Nancy.Lin
Cc: Rob Herring, Matthias Brugger, Chun-Kuang Hu, Philipp Zabel, wim,
AngeloGioacchino Del Regno, linux, David Airlie, Daniel Vetter,
Nathan Chancellor, Nick Desaulniers, jason-jh . lin,
Yongqiang Niu, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, dri-devel, llvm, singo.chang,
Project_Global_Chrome_Upstream_Group
On Thu, Nov 03, 2022 at 11:25:09AM +0800, Nancy.Lin wrote:
> Add mmsys for support 64 reset bits. It is a preparation for MT8195
> vdosys1 HW reset. MT8195 vdosys1 has more than 32 reset bits.
>
> 1. Add the number of reset bits in mmsys private data
> 2. move the whole "reset register code section" behind the
> "get mmsys->data" code section for getting the num_resets in mmsys->data.
>
> Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Reviewed-by: CK Hu <ck.hu@mediatek.com>
> Tested-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
> Change-Id: Ic7c30ad6c4f74a6b2ebf75fc0e3f9f207b0416d1
Again, no Change-Id please.
Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
Thanks,
Nícolas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v27 01/11] dt-bindings: arm: mediatek: mmsys: add vdosys1 compatible for MT8195
2022-11-03 19:39 ` [PATCH v27 01/11] dt-bindings: arm: mediatek: mmsys: add vdosys1 compatible for MT8195 Nícolas F. R. A. Prado
@ 2022-11-04 9:19 ` Nancy Lin (林欣螢)
0 siblings, 0 replies; 7+ messages in thread
From: Nancy Lin (林欣螢) @ 2022-11-04 9:19 UTC (permalink / raw)
To: nfraprado@collabora.com
Cc: llvm@lists.linux.dev, Yongqiang Niu (牛永强),
robh+dt@kernel.org, Singo Chang (張興國),
nathan@kernel.org, linux-mediatek@lists.infradead.org,
chunkuang.hu@kernel.org, Jason-JH Lin (林睿祥),
linux@roeck-us.net, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, daniel@ffwll.ch,
p.zabel@pengutronix.de, dri-devel@lists.freedesktop.org,
Project_Global_Chrome_Upstream_Group,
linux-arm-kernel@lists.infradead.org, wim@linux-watchdog.org,
matthias.bgg@gmail.com, airlied@linux.ie,
angelogioacchino.delregno@collabora.com, ndesaulniers@google.com
Dear Nicolas,
Thanks for the review.
On Thu, 2022-11-03 at 15:39 -0400, Nícolas F. R. A. Prado wrote:
> On Thu, Nov 03, 2022 at 11:25:02AM +0800, Nancy.Lin wrote:
> > Add vdosys1 mmsys compatible for MT8195 platform.
> >
> > For MT8195, VDOSYS0 and VDOSYS1 are 2 display HW pipelines binding
> > to
> > 2 different power domains, different clock drivers and different
> > mediatek-drm drivers.
> >
> > Signed-off-by: Nancy.Lin <nancy.lin@mediatek.com>
> > Change-Id: I8065205ce44baa417f58176adaae9e1eefa6eadb
>
> No Change-Id tag, please. There are some other commits with it as
> well.
>
> Otherwise,
>
> Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>
> Thanks,
> Nícolas
Sorry I forgot to remove Change-Id. I will check all the commits in the
series.
Thanks,
Nancy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v27 05/11] soc: mediatek: refine code to use mtk_mmsys_update_bits API
2022-11-03 20:32 ` [PATCH v27 05/11] soc: mediatek: refine code to use mtk_mmsys_update_bits API Nícolas F. R. A. Prado
@ 2022-11-04 9:29 ` Nancy Lin (林欣螢)
0 siblings, 0 replies; 7+ messages in thread
From: Nancy Lin (林欣螢) @ 2022-11-04 9:29 UTC (permalink / raw)
To: nfraprado@collabora.com
Cc: llvm@lists.linux.dev, Yongqiang Niu (牛永强),
robh+dt@kernel.org, Singo Chang (張興國),
nathan@kernel.org, linux-mediatek@lists.infradead.org,
chunkuang.hu@kernel.org, Jason-JH Lin (林睿祥),
linux@roeck-us.net, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, daniel@ffwll.ch,
p.zabel@pengutronix.de, dri-devel@lists.freedesktop.org,
Project_Global_Chrome_Upstream_Group,
linux-arm-kernel@lists.infradead.org, wim@linux-watchdog.org,
matthias.bgg@gmail.com, airlied@linux.ie,
angelogioacchino.delregno@collabora.com, ndesaulniers@google.com
Dear Nicolas,
Thanks for the review.
On Thu, 2022-11-03 at 16:32 -0400, Nícolas F. R. A. Prado wrote:
> On Thu, Nov 03, 2022 at 11:25:06AM +0800, Nancy.Lin wrote:
> [..]
> > --- a/drivers/soc/mediatek/mtk-mmsys.c
> > +++ b/drivers/soc/mediatek/mtk-mmsys.c
>
> [..]
> > +static void mtk_mmsys_update_bits(struct mtk_mmsys *mmsys, u32
> > offset, u32 mask, u32 val)
> > +{
> > + u32 tmp;
> > +
> > + tmp = readl_relaxed(mmsys->regs + offset);
> > + tmp = (tmp & ~mask) | val;
>
> You should mask the value before writing to prevent bad values from
> overwriting
> bits outside the mask.
>
> tmp = (tmp & ~mask) | (val & mask);
>
> With that,
>
> Reviewed-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>
> Thanks,
> Nícolas
OK, I will fix it in the next revision.
Thanks,
Nancy
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v27 06/11] soc: mediatek: add mtk-mmsys config API for mt8195 vdosys1
2022-11-03 19:56 ` [PATCH v27 06/11] soc: mediatek: add mtk-mmsys config API for mt8195 vdosys1 Nícolas F. R. A. Prado
@ 2022-11-04 9:31 ` Nancy Lin (林欣螢)
0 siblings, 0 replies; 7+ messages in thread
From: Nancy Lin (林欣螢) @ 2022-11-04 9:31 UTC (permalink / raw)
To: nfraprado@collabora.com
Cc: llvm@lists.linux.dev, Yongqiang Niu (牛永强),
robh+dt@kernel.org, Singo Chang (張興國),
nathan@kernel.org, linux-mediatek@lists.infradead.org,
chunkuang.hu@kernel.org, Jason-JH Lin (林睿祥),
linux@roeck-us.net, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org, daniel@ffwll.ch,
p.zabel@pengutronix.de, dri-devel@lists.freedesktop.org,
Project_Global_Chrome_Upstream_Group,
linux-arm-kernel@lists.infradead.org, wim@linux-watchdog.org,
matthias.bgg@gmail.com, airlied@linux.ie,
angelogioacchino.delregno@collabora.com, ndesaulniers@google.com
Dear Nicolas,
Thanks for the review.
On Thu, 2022-11-03 at 15:56 -0400, Nícolas F. R. A. Prado wrote:
> On Thu, Nov 03, 2022 at 11:25:07AM +0800, Nancy.Lin wrote:
> > Add four mmsys config APIs. The config APIs are used for config
> > mmsys reg. Some mmsys regs need to be set according to the
> > HW engine binding to the mmsys simultaneously.
> >
> > 1. mtk_mmsys_merge_async_config: config merge async width/height.
> > async is used for cross-clock domain synchronization.
> > 2. mtk_mmsys_hdr_confing: config hdr backend async width/height.
>
> [..]
> > --- a/drivers/soc/mediatek/mtk-mmsys.c
> > +++ b/drivers/soc/mediatek/mtk-mmsys.c
>
> [..]
> > +void mtk_mmsys_hdr_confing(struct device *dev, int be_width, int
> > be_height)
>
> confing -> config
>
> Need to update the following commit as well.
>
> Thanks,
> Nícolas
>
Sorry for the typo. I will fix it in the next revision.
Thanks,
Nancy
> > +{
> > + mtk_mmsys_update_bits(dev_get_drvdata(dev),
> > MT8195_VDO1_HDRBE_ASYNC_CFG_WD, ~0,
> > + be_height << 16 | be_width);
> > +}
> > +EXPORT_SYMBOL_GPL(mtk_mmsys_hdr_confing);
>
> [..]
> > +void mtk_mmsys_hdr_confing(struct device *dev, int be_width, int
> > be_height);
>
> [..]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-11-04 9:32 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20221103032512.9144-1-nancy.lin@mediatek.com>
[not found] ` <20221103032512.9144-2-nancy.lin@mediatek.com>
2022-11-03 19:39 ` [PATCH v27 01/11] dt-bindings: arm: mediatek: mmsys: add vdosys1 compatible for MT8195 Nícolas F. R. A. Prado
2022-11-04 9:19 ` Nancy Lin (林欣螢)
[not found] ` <20221103032512.9144-7-nancy.lin@mediatek.com>
2022-11-03 19:56 ` [PATCH v27 06/11] soc: mediatek: add mtk-mmsys config API for mt8195 vdosys1 Nícolas F. R. A. Prado
2022-11-04 9:31 ` Nancy Lin (林欣螢)
[not found] ` <20221103032512.9144-6-nancy.lin@mediatek.com>
2022-11-03 20:32 ` [PATCH v27 05/11] soc: mediatek: refine code to use mtk_mmsys_update_bits API Nícolas F. R. A. Prado
2022-11-04 9:29 ` Nancy Lin (林欣螢)
[not found] ` <20221103032512.9144-9-nancy.lin@mediatek.com>
2022-11-03 20:45 ` [PATCH v27 08/11] soc: mediatek: mmsys: add mmsys for support 64 reset bits Nícolas F. R. A. Prado
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).