2022-11-11 08:40:49

by Matthias Brugger

[permalink] [raw]
Subject: [PATCH v2] soc: mediatek: Add deprecated compatible to mmsys

From: Matthias Brugger <[email protected]>

For backward compatibility we add the deprecated compatible.

Signed-off-by: Matthias Brugger <[email protected]>
---
Changes since v1:
- fix drive data pointer

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

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,
--
2.38.0



2022-11-14 13:21:49

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH v2] soc: mediatek: Add deprecated compatible to mmsys



On 14/11/2022 12:58, AngeloGioacchino Del Regno wrote:
> Il 11/11/22 09:29, [email protected] ha scritto:
>> From: Matthias Brugger <[email protected]>
>>
>> For backward compatibility we add the deprecated compatible.
>>
>> Signed-off-by: Matthias Brugger <[email protected]>
>
> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
>
> ...And tested on MT8195 Cherry Chromebook.
>

Applied, thanks for testing!

Subject: Re: [PATCH v2] soc: mediatek: Add deprecated compatible to mmsys

Il 11/11/22 09:29, [email protected] ha scritto:
> From: Matthias Brugger <[email protected]>
>
> For backward compatibility we add the deprecated compatible.
>
> Signed-off-by: Matthias Brugger <[email protected]>

Reviewed-by: AngeloGioacchino Del Regno <[email protected]>

...And tested on MT8195 Cherry Chromebook.

Cheers,
Angelo

2022-12-01 11:36:55

by Chen-Yu Tsai

[permalink] [raw]
Subject: Re: [PATCH v2] soc: mediatek: Add deprecated compatible to mmsys

On Mon, Nov 14, 2022 at 7:59 PM AngeloGioacchino Del Regno
<[email protected]> wrote:
>
> Il 11/11/22 09:29, [email protected] ha scritto:
> > From: Matthias Brugger <[email protected]>
> >
> > For backward compatibility we add the deprecated compatible.
> >
> > Signed-off-by: Matthias Brugger <[email protected]>
>
> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
>
> ...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

2022-12-01 11:51:25

by Chen-Yu Tsai

[permalink] [raw]
Subject: Re: [PATCH v2] soc: mediatek: Add deprecated compatible to mmsys

On Thu, Dec 1, 2022 at 7:20 PM Chen-Yu Tsai <[email protected]> wrote:
>
> On Mon, Nov 14, 2022 at 7:59 PM AngeloGioacchino Del Regno
> <[email protected]> wrote:
> >
> > Il 11/11/22 09:29, [email protected] ha scritto:
> > > From: Matthias Brugger <[email protected]>
> > >
> > > For backward compatibility we add the deprecated compatible.
> > >
> > > Signed-off-by: Matthias Brugger <[email protected]>
> >
> > Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
> >
> > ...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

2022-12-16 14:05:42

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH v2] soc: mediatek: Add deprecated compatible to mmsys



On 01/12/2022 12:25, Chen-Yu Tsai wrote:
> On Thu, Dec 1, 2022 at 7:20 PM Chen-Yu Tsai <[email protected]> wrote:
>>
>> On Mon, Nov 14, 2022 at 7:59 PM AngeloGioacchino Del Regno
>> <[email protected]> wrote:
>>>
>>> Il 11/11/22 09:29, [email protected] ha scritto:
>>>> From: Matthias Brugger <[email protected]>
>>>>
>>>> For backward compatibility we add the deprecated compatible.
>>>>
>>>> Signed-off-by: Matthias Brugger <[email protected]>
>>>
>>> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
>>>
>>> ...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

2022-12-16 14:06:25

by Matthias Brugger

[permalink] [raw]
Subject: Re: [PATCH v2] soc: mediatek: Add deprecated compatible to mmsys



On 01/12/2022 12:20, Chen-Yu Tsai wrote:
> On Mon, Nov 14, 2022 at 7:59 PM AngeloGioacchino Del Regno
> <[email protected]> wrote:
>>
>> Il 11/11/22 09:29, [email protected] ha scritto:
>>> From: Matthias Brugger <[email protected]>
>>>
>>> For backward compatibility we add the deprecated compatible.
>>>
>>> Signed-off-by: Matthias Brugger <[email protected]>
>>
>> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
>>
>> ...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.
>

2022-12-16 14:25:14

by Chen-Yu Tsai

[permalink] [raw]
Subject: Re: [PATCH v2] soc: mediatek: Add deprecated compatible to mmsys

On Fri, Dec 16, 2022 at 9:35 PM Matthias Brugger <[email protected]> wrote:
>
>
>
> On 01/12/2022 12:25, Chen-Yu Tsai wrote:
> > On Thu, Dec 1, 2022 at 7:20 PM Chen-Yu Tsai <[email protected]> wrote:
> >>
> >> On Mon, Nov 14, 2022 at 7:59 PM AngeloGioacchino Del Regno
> >> <[email protected]> wrote:
> >>>
> >>> Il 11/11/22 09:29, [email protected] ha scritto:
> >>>> From: Matthias Brugger <[email protected]>
> >>>>
> >>>> For backward compatibility we add the deprecated compatible.
> >>>>
> >>>> Signed-off-by: Matthias Brugger <[email protected]>
> >>>
> >>> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
> >>>
> >>> ...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.

2022-12-16 14:34:59

by Chen-Yu Tsai

[permalink] [raw]
Subject: Re: [PATCH v2] soc: mediatek: Add deprecated compatible to mmsys

On Fri, Dec 16, 2022 at 9:33 PM Matthias Brugger <[email protected]> wrote:
>
>
>
> On 01/12/2022 12:20, Chen-Yu Tsai wrote:
> > On Mon, Nov 14, 2022 at 7:59 PM AngeloGioacchino Del Regno
> > <[email protected]> wrote:
> >>
> >> Il 11/11/22 09:29, [email protected] ha scritto:
> >>> From: Matthias Brugger <[email protected]>
> >>>
> >>> For backward compatibility we add the deprecated compatible.
> >>>
> >>> Signed-off-by: Matthias Brugger <[email protected]>
> >>
> >> Reviewed-by: AngeloGioacchino Del Regno <[email protected]>
> >>
> >> ...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