[PATCH 5/9] dt-bindings: gpu: mali-bifrost: Add a compatible for MediaTek MT8186

AngeloGioacchino Del Regno posted 9 patches 1 year, 9 months ago
There is a newer version of this series
[PATCH 5/9] dt-bindings: gpu: mali-bifrost: Add a compatible for MediaTek MT8186
Posted by AngeloGioacchino Del Regno 1 year, 9 months ago
Get GPU support on MT8186 by adding its compatible.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
 Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
index 8c57b89ee866..85111559dfe0 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
@@ -15,6 +15,11 @@ properties:
 
   compatible:
     oneOf:
+      - items:
+          - enum:
+              - mediatek,mt8186-mali
+          - const: mediatek,mt8183b-mali
+          - const: arm,mali-bifrost # Mali Bifrost GPU model/revision is fully discoverable
       - items:
           - enum:
               - amlogic,meson-g12a-mali
-- 
2.39.1
Re: [PATCH 5/9] dt-bindings: gpu: mali-bifrost: Add a compatible for MediaTek MT8186
Posted by Chen-Yu Tsai 1 year, 9 months ago
On Wed, Feb 8, 2023 at 6:37 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> Get GPU support on MT8186 by adding its compatible.

I'd skip MT8186 for now. We have to work out some binning details for the
OPP, in particular how to deal with both Panfrost (or Mali) and SVS adding
the OPP table. We were just looking at the Mali driver today.

ChenYu
Re: [PATCH 5/9] dt-bindings: gpu: mali-bifrost: Add a compatible for MediaTek MT8186
Posted by AngeloGioacchino Del Regno 1 year, 9 months ago
Il 09/02/23 09:49, Chen-Yu Tsai ha scritto:
> On Wed, Feb 8, 2023 at 6:37 PM AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
>>
>> Get GPU support on MT8186 by adding its compatible.
> 
> I'd skip MT8186 for now. We have to work out some binning details for the
> OPP, in particular how to deal with both Panfrost (or Mali) and SVS adding
> the OPP table. We were just looking at the Mali driver today.
> 

Dealing with binning is fairly easy... I have something already done for
that one, but I'm not sure that it would be the best option.
My solution makes use of opp-supported-hw by "standard means", but perhaps
let's have a separated conversation about it?

I don't think that skipping this would give any benefit though, because
that is only adding a compatible and whatever binning support would have
to be generic and 99% not bound to any mediatek specific compatible.

Angelo

> ChenYu
Re: [PATCH 5/9] dt-bindings: gpu: mali-bifrost: Add a compatible for MediaTek MT8186
Posted by Chen-Yu Tsai 1 year, 9 months ago
On Thu, Feb 9, 2023 at 5:20 PM AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> Il 09/02/23 09:49, Chen-Yu Tsai ha scritto:
> > On Wed, Feb 8, 2023 at 6:37 PM AngeloGioacchino Del Regno
> > <angelogioacchino.delregno@collabora.com> wrote:
> >>
> >> Get GPU support on MT8186 by adding its compatible.
> >
> > I'd skip MT8186 for now. We have to work out some binning details for the
> > OPP, in particular how to deal with both Panfrost (or Mali) and SVS adding
> > the OPP table. We were just looking at the Mali driver today.
> >
>
> Dealing with binning is fairly easy... I have something already done for
> that one, but I'm not sure that it would be the best option.
> My solution makes use of opp-supported-hw by "standard means", but perhaps
> let's have a separated conversation about it?
>
> I don't think that skipping this would give any benefit though, because
> that is only adding a compatible and whatever binning support would have
> to be generic and 99% not bound to any mediatek specific compatible.

The binning is related to voltage range, not maximum OPP. So it's more
like fast/slow example in Documentation/devicetree/bindings/opp/opp-v2.yaml
or the opp/allwinner,sun50i-h6-operating-points.yaml, minus the efuse node.

The downstream DT currently looks like this:

opp-950000000 {
        opp-hz = /bits/ 64 <950000000>;

/* This is Mali specific; ignore
        opp-hz-real = /bits/ 64 <950000000>,
                      /bits/ 64 <950000000>;
*/
        opp-microvolt = <900000>, <1000000>;
        opp-microvolt-bin4 = <875000>, <975000>;
        opp-microvolt-bin5 = <850000>, <950000>;
};


ChenYu
Re: [PATCH 5/9] dt-bindings: gpu: mali-bifrost: Add a compatible for MediaTek MT8186
Posted by AngeloGioacchino Del Regno 1 year, 9 months ago
Il 09/02/23 10:45, Chen-Yu Tsai ha scritto:
> On Thu, Feb 9, 2023 at 5:20 PM AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
>>
>> Il 09/02/23 09:49, Chen-Yu Tsai ha scritto:
>>> On Wed, Feb 8, 2023 at 6:37 PM AngeloGioacchino Del Regno
>>> <angelogioacchino.delregno@collabora.com> wrote:
>>>>
>>>> Get GPU support on MT8186 by adding its compatible.
>>>
>>> I'd skip MT8186 for now. We have to work out some binning details for the
>>> OPP, in particular how to deal with both Panfrost (or Mali) and SVS adding
>>> the OPP table. We were just looking at the Mali driver today.
>>>
>>
>> Dealing with binning is fairly easy... I have something already done for
>> that one, but I'm not sure that it would be the best option.
>> My solution makes use of opp-supported-hw by "standard means", but perhaps
>> let's have a separated conversation about it?
>>
>> I don't think that skipping this would give any benefit though, because
>> that is only adding a compatible and whatever binning support would have
>> to be generic and 99% not bound to any mediatek specific compatible.
> 
> The binning is related to voltage range, not maximum OPP. So it's more
> like fast/slow example in Documentation/devicetree/bindings/opp/opp-v2.yaml
> or the opp/allwinner,sun50i-h6-operating-points.yaml, minus the efuse node.
> 
> The downstream DT currently looks like this:
> 
> opp-950000000 {
>          opp-hz = /bits/ 64 <950000000>;
> 
> /* This is Mali specific; ignore
>          opp-hz-real = /bits/ 64 <950000000>,
>                        /bits/ 64 <950000000>;
> */
>          opp-microvolt = <900000>, <1000000>;
>          opp-microvolt-bin4 = <875000>, <975000>;
>          opp-microvolt-bin5 = <850000>, <950000>;
> };
> 

Yes, my option is, in short:

	opp-900000000 {
		opp-hz = /bits/ 64 <900000000>;
		opp-microvolt = <850000>;
		opp-supported-hw = <0xcf>;
	};

	opp-900000000-bin4 {
		opp-hz = /bits/ 64 <900000000>;
		opp-microvolt = <837500>;
		opp-supported-hw = <0x10>;
	};

	opp-900000000-bin5 {
		opp-hz = /bits/ 64 <900000000>;
		opp-microvolt = <825000>;
		opp-supported-hw = <0x20>;
	};



> 
> ChenYu