diff mbox series

[v2] soc: mediatek: Add deprecated compatible to mmsys

Message ID 20221111082912.14557-1-matthias.bgg@kernel.org (mailing list archive)
State New, archived
Headers show
Series [v2] soc: mediatek: Add deprecated compatible to mmsys | expand

Commit Message

Matthias Brugger Nov. 11, 2022, 8:29 a.m. UTC
From: Matthias Brugger <matthias.bgg@gmail.com>

For backward compatibility we add the deprecated compatible.

Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
---
Changes since v1:
- fix drive data pointer

 drivers/soc/mediatek/mtk-mmsys.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

AngeloGioacchino Del Regno Nov. 14, 2022, 11:58 a.m. UTC | #1
Il 11/11/22 09:29, matthias.bgg@kernel.org ha scritto:
> From: Matthias Brugger <matthias.bgg@gmail.com>
> 
> For backward compatibility we add the deprecated compatible.
> 
> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

...And tested on MT8195 Cherry Chromebook.

Cheers,
Angelo
Matthias Brugger Nov. 14, 2022, 12:07 p.m. UTC | #2
On 14/11/2022 12:58, AngeloGioacchino Del Regno wrote:
> Il 11/11/22 09:29, matthias.bgg@kernel.org ha scritto:
>> From: Matthias Brugger <matthias.bgg@gmail.com>
>>
>> For backward compatibility we add the deprecated compatible.
>>
>> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> 
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> 
> ...And tested on MT8195 Cherry Chromebook.
> 

Applied, thanks for testing!
Chen-Yu Tsai Dec. 1, 2022, 11:20 a.m. UTC | #3
On Mon, Nov 14, 2022 at 7:59 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> Il 11/11/22 09:29, matthias.bgg@kernel.org ha scritto:
> > From: Matthias Brugger <matthias.bgg@gmail.com>
> >
> > For backward compatibility we add the deprecated compatible.
> >
> > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
>
> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>
> ...And tested on MT8195 Cherry Chromebook.

This now seems like a bad idea. In the dtsi we have two nodes (vdosys0 and
vdosys1) that both currently use the -mmsys compatible, which in the driver
maps to vdosys0. So not only do we have vdosys1 incorrectly probing as
vdosys0, we also have duplicate clks being registered and duplicate DRM
pipelines. On my device vdosys1 ends up winning the duplicate clock race.

I suggest just reverting this. The display stuff won't be useful unless
the drivers are able to distinguish themselves from one another.

Regards
ChenYu
Chen-Yu Tsai Dec. 1, 2022, 11:25 a.m. UTC | #4
On Thu, Dec 1, 2022 at 7:20 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> On Mon, Nov 14, 2022 at 7:59 PM AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
> >
> > Il 11/11/22 09:29, matthias.bgg@kernel.org ha scritto:
> > > From: Matthias Brugger <matthias.bgg@gmail.com>
> > >
> > > For backward compatibility we add the deprecated compatible.
> > >
> > > Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> >
> > Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> >
> > ...And tested on MT8195 Cherry Chromebook.
>
> This now seems like a bad idea. In the dtsi we have two nodes (vdosys0 and
> vdosys1) that both currently use the -mmsys compatible, which in the driver
> maps to vdosys0. So not only do we have vdosys1 incorrectly probing as
> vdosys0, we also have duplicate clks being registered and duplicate DRM
> pipelines. On my device vdosys1 ends up winning the duplicate clock race.
>
> I suggest just reverting this. The display stuff won't be useful unless
> the drivers are able to distinguish themselves from one another.

That and try to fix the vdosys0 node ASAP.

> Regards
> ChenYu
Matthias Brugger Dec. 16, 2022, 1:33 p.m. UTC | #5
On 01/12/2022 12:20, Chen-Yu Tsai wrote:
> On Mon, Nov 14, 2022 at 7:59 PM AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
>>
>> Il 11/11/22 09:29, matthias.bgg@kernel.org ha scritto:
>>> From: Matthias Brugger <matthias.bgg@gmail.com>
>>>
>>> For backward compatibility we add the deprecated compatible.
>>>
>>> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
>>
>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>
>> ...And tested on MT8195 Cherry Chromebook.
> 
> This now seems like a bad idea. In the dtsi we have two nodes (vdosys0 and
> vdosys1) that both currently use the -mmsys compatible, which in the driver
> maps to vdosys0. So not only do we have vdosys1 incorrectly probing as
> vdosys0, we also have duplicate clks being registered and duplicate DRM
> pipelines. On my device vdosys1 ends up winning the duplicate clock race.
> 

That's true, we should fix the DTS deleting vdosys1 node as it's not 
implemented. While at it we should also fix the compatible for vdosys0 as 
"mediatek,mt8195-mmsys" is now deprecated.

Would you mind to send a patch?

Regards,
Matthias

> I suggest just reverting this. The display stuff won't be useful unless
> the drivers are able to distinguish themselves from one another.
>
Matthias Brugger Dec. 16, 2022, 1:35 p.m. UTC | #6
On 01/12/2022 12:25, Chen-Yu Tsai wrote:
> On Thu, Dec 1, 2022 at 7:20 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
>>
>> On Mon, Nov 14, 2022 at 7:59 PM AngeloGioacchino Del Regno
>> <angelogioacchino.delregno@collabora.com> wrote:
>>>
>>> Il 11/11/22 09:29, matthias.bgg@kernel.org ha scritto:
>>>> From: Matthias Brugger <matthias.bgg@gmail.com>
>>>>
>>>> For backward compatibility we add the deprecated compatible.
>>>>
>>>> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
>>>
>>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
>>>
>>> ...And tested on MT8195 Cherry Chromebook.
>>
>> This now seems like a bad idea. In the dtsi we have two nodes (vdosys0 and
>> vdosys1) that both currently use the -mmsys compatible, which in the driver
>> maps to vdosys0. So not only do we have vdosys1 incorrectly probing as
>> vdosys0, we also have duplicate clks being registered and duplicate DRM
>> pipelines. On my device vdosys1 ends up winning the duplicate clock race.
>>
>> I suggest just reverting this. The display stuff won't be useful unless
>> the drivers are able to distinguish themselves from one another.
> 
> That and try to fix the vdosys0 node ASAP.

I'm not sure what you mean? If there are any patches that are in my queue that 
needs attention, please let me know.

Regards,
Matthias
Chen-Yu Tsai Dec. 16, 2022, 1:50 p.m. UTC | #7
On Fri, Dec 16, 2022 at 9:35 PM Matthias Brugger <matthias.bgg@gmail.com> wrote:
>
>
>
> On 01/12/2022 12:25, Chen-Yu Tsai wrote:
> > On Thu, Dec 1, 2022 at 7:20 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
> >>
> >> On Mon, Nov 14, 2022 at 7:59 PM AngeloGioacchino Del Regno
> >> <angelogioacchino.delregno@collabora.com> wrote:
> >>>
> >>> Il 11/11/22 09:29, matthias.bgg@kernel.org ha scritto:
> >>>> From: Matthias Brugger <matthias.bgg@gmail.com>
> >>>>
> >>>> For backward compatibility we add the deprecated compatible.
> >>>>
> >>>> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> >>>
> >>> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> >>>
> >>> ...And tested on MT8195 Cherry Chromebook.
> >>
> >> This now seems like a bad idea. In the dtsi we have two nodes (vdosys0 and
> >> vdosys1) that both currently use the -mmsys compatible, which in the driver
> >> maps to vdosys0. So not only do we have vdosys1 incorrectly probing as
> >> vdosys0, we also have duplicate clks being registered and duplicate DRM
> >> pipelines. On my device vdosys1 ends up winning the duplicate clock race.
> >>
> >> I suggest just reverting this. The display stuff won't be useful unless
> >> the drivers are able to distinguish themselves from one another.
> >
> > That and try to fix the vdosys0 node ASAP.
>
> I'm not sure what you mean? If there are any patches that are in my queue that
> needs attention, please let me know.

It was more of a P.S. note.
Chen-Yu Tsai Dec. 16, 2022, 1:53 p.m. UTC | #8
On Fri, Dec 16, 2022 at 9:33 PM Matthias Brugger <matthias.bgg@gmail.com> wrote:
>
>
>
> On 01/12/2022 12:20, Chen-Yu Tsai wrote:
> > On Mon, Nov 14, 2022 at 7:59 PM AngeloGioacchino Del Regno
> > <angelogioacchino.delregno@collabora.com> wrote:
> >>
> >> Il 11/11/22 09:29, matthias.bgg@kernel.org ha scritto:
> >>> From: Matthias Brugger <matthias.bgg@gmail.com>
> >>>
> >>> For backward compatibility we add the deprecated compatible.
> >>>
> >>> Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
> >>
> >> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> >>
> >> ...And tested on MT8195 Cherry Chromebook.
> >
> > This now seems like a bad idea. In the dtsi we have two nodes (vdosys0 and
> > vdosys1) that both currently use the -mmsys compatible, which in the driver
> > maps to vdosys0. So not only do we have vdosys1 incorrectly probing as
> > vdosys0, we also have duplicate clks being registered and duplicate DRM
> > pipelines. On my device vdosys1 ends up winning the duplicate clock race.
> >
>
> That's true, we should fix the DTS deleting vdosys1 node as it's not
> implemented. While at it we should also fix the compatible for vdosys0 as
> "mediatek,mt8195-mmsys" is now deprecated.
>
> Would you mind to send a patch?

I'll be going on vacation shortly, and will be back after Christmas.

Reading the above, I assume you want two patches? One to drop the deprecated
compatible, and another to delete the vdosys1 node? And both should be
tag with fixes and backported?

I can take care of it after I get back. If someone wants to beat me to it,
feel free to do it.


ChenYu
diff mbox series

Patch

diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c
index ba2e79b26993b..f3431448e8431 100644
--- a/drivers/soc/mediatek/mtk-mmsys.c
+++ b/drivers/soc/mediatek/mtk-mmsys.c
@@ -303,6 +303,10 @@  static const struct of_device_id of_match_mtk_mmsys[] = {
 		.compatible = "mediatek,mt8192-mmsys",
 		.data = &mt8192_mmsys_driver_data,
 	},
+	{	/* deprecated compatible */
+		.compatible = "mediatek,mt8195-mmsys",
+		.data = &mt8195_vdosys0_driver_data,
+	},
 	{
 		.compatible = "mediatek,mt8195-vdosys0",
 		.data = &mt8195_vdosys0_driver_data,