* [PATCH v3 0/3] Add Mali GPU support for Mediatek MT8370 SoC
@ 2025-02-07 15:18 Louis-Alexis Eyraud
2025-02-07 15:18 ` [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for " Louis-Alexis Eyraud
` (2 more replies)
0 siblings, 3 replies; 12+ messages in thread
From: Louis-Alexis Eyraud @ 2025-02-07 15:18 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Boris Brezillon,
Steven Price
Cc: kernel, dri-devel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Louis-Alexis Eyraud
This patchset adds the support of the ARM Mali G57 MC2 GPU (Valhall-JM,
dual core), integrated in the Mediatek MT8370 SoC, to the panfrost driver
and to the mt8370.dtsi include file.
I've tested this patchset on a Mediatek Genio 510 EVK board,
with a kernel based on linux-next (tag: next-20250207) plus [1] patch
(not needed for building, only for testing to avoid boot issues on this
board).
The panfrost driver probed with the following messages:
```
panfrost 13000000.gpu: clock rate = 390000000
panfrost 13000000.gpu: mali-g57 id 0x9093 major 0x0 minor 0x0 status 0x0
panfrost 13000000.gpu: features: 00000000,000019f7, issues: 00000003,
80000400
panfrost 13000000.gpu: Features: L2:0x08130206 Shader:0x00000000
Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
panfrost 13000000.gpu: shader_present=0x5 l2_present=0x1
[drm] Initialized panfrost 1.3.0 for 13000000.gpu on minor 0
```
[1] https://lore.kernel.org/all/20250124191644.2309790-1-robh@kernel.org/
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
Changes in v3:
- Rebased on linux-next (tag: next-20250207)
- Remove prerequisite change/patch ids
- Reword commit messages to better explicit compatible needs
- Link to v2: https://lore.kernel.org/r/20250130-mt8370-enable-gpu-v2-0-c154d0815db5@collabora.com
Changes in v2:
- Rework "drm/panfrost: Add support for Mali on the MT8370 SoC" to avoid
data structure duplication, as requested by Krzysztof Kozlowski
- Reword commit messages to use imperative mood and make new compatible
need more explicit
- Link to v1: https://lore.kernel.org/r/20250116-mt8370-enable-gpu-v1-0-0a6b78e925c8@collabora.com
---
Louis-Alexis Eyraud (3):
dt-bindings: gpu: mali-bifrost: Add compatible for MT8370 SoC
drm/panfrost: Add support for Mali on the MT8370 SoC
arm64: dts: mediatek: mt8370: Enable gpu support
Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 5 ++++-
arch/arm64/boot/dts/mediatek/mt8370.dtsi | 9 +++++++++
drivers/gpu/drm/panfrost/panfrost_drv.c | 1 +
3 files changed, 14 insertions(+), 1 deletion(-)
---
base-commit: ed58d103e6da15a442ff87567898768dc3a66987
change-id: 20250115-mt8370-enable-gpu-3b6f595fa63d
Best regards,
--
Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for MT8370 SoC
2025-02-07 15:18 [PATCH v3 0/3] Add Mali GPU support for Mediatek MT8370 SoC Louis-Alexis Eyraud
@ 2025-02-07 15:18 ` Louis-Alexis Eyraud
2025-02-10 10:52 ` AngeloGioacchino Del Regno
2025-02-11 8:29 ` Krzysztof Kozlowski
2025-02-07 15:18 ` [PATCH v3 2/3] drm/panfrost: Add support for Mali on the " Louis-Alexis Eyraud
2025-02-07 15:18 ` [PATCH v3 3/3] arm64: dts: mediatek: mt8370: Enable gpu support Louis-Alexis Eyraud
2 siblings, 2 replies; 12+ messages in thread
From: Louis-Alexis Eyraud @ 2025-02-07 15:18 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Boris Brezillon,
Steven Price
Cc: kernel, dri-devel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Louis-Alexis Eyraud
Add a compatible for the MediaTek MT8370 SoC, with an
integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core).
This new compatible is needed for this SoC support, as the other
existing compatibles for the same GPU architecture (MT8188, MT8192) do
not match the required power domain number.
The other compatibles (especially MT8186) cannot be reused because of
GPU architecture difference.
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
index 735c7f06c24e632ab738d062f15378f754c8adaf..6f6211950bb495fa6bfcdfe8d1e27e5ce7aeeae0 100644
--- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
+++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
@@ -37,6 +37,7 @@ properties:
- enum:
- mediatek,mt8188-mali
- mediatek,mt8192-mali
+ - mediatek,mt8370-mali
- const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable
reg:
@@ -217,7 +218,9 @@ allOf:
properties:
compatible:
contains:
- const: mediatek,mt8186-mali
+ enum:
+ - mediatek,mt8186-mali
+ - mediatek,mt8370-mali
then:
properties:
power-domains:
--
2.48.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC
2025-02-07 15:18 [PATCH v3 0/3] Add Mali GPU support for Mediatek MT8370 SoC Louis-Alexis Eyraud
2025-02-07 15:18 ` [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for " Louis-Alexis Eyraud
@ 2025-02-07 15:18 ` Louis-Alexis Eyraud
2025-02-10 10:52 ` AngeloGioacchino Del Regno
2025-02-11 8:30 ` Krzysztof Kozlowski
2025-02-07 15:18 ` [PATCH v3 3/3] arm64: dts: mediatek: mt8370: Enable gpu support Louis-Alexis Eyraud
2 siblings, 2 replies; 12+ messages in thread
From: Louis-Alexis Eyraud @ 2025-02-07 15:18 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Boris Brezillon,
Steven Price
Cc: kernel, dri-devel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Louis-Alexis Eyraud
Add a compatible for the MediaTek MT8370 SoC, with an
integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core),
with the same platform data as MT8186 (one regulator, two power
domains).
Despite their different GPU architecture (making them not being
compatible), the MT8186 platform data can still be used for MT8370
because it only describes supplies, pm_domains and enablement of power
management features in the panfrost driver.
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
drivers/gpu/drm/panfrost/panfrost_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index 0f3935556ac761adcd80197d87e8e478df436fd5..7b7e9f6f620659a7fdcb5d907ebc4f01eca876e0 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -859,6 +859,7 @@ static const struct of_device_id dt_match[] = {
{ .compatible = "mediatek,mt8186-mali", .data = &mediatek_mt8186_data },
{ .compatible = "mediatek,mt8188-mali", .data = &mediatek_mt8188_data },
{ .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data },
+ { .compatible = "mediatek,mt8370-mali", .data = &mediatek_mt8186_data },
{}
};
MODULE_DEVICE_TABLE(of, dt_match);
--
2.48.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH v3 3/3] arm64: dts: mediatek: mt8370: Enable gpu support
2025-02-07 15:18 [PATCH v3 0/3] Add Mali GPU support for Mediatek MT8370 SoC Louis-Alexis Eyraud
2025-02-07 15:18 ` [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for " Louis-Alexis Eyraud
2025-02-07 15:18 ` [PATCH v3 2/3] drm/panfrost: Add support for Mali on the " Louis-Alexis Eyraud
@ 2025-02-07 15:18 ` Louis-Alexis Eyraud
2025-02-10 10:52 ` AngeloGioacchino Del Regno
2025-02-11 8:31 ` Krzysztof Kozlowski
2 siblings, 2 replies; 12+ messages in thread
From: Louis-Alexis Eyraud @ 2025-02-07 15:18 UTC (permalink / raw)
To: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Boris Brezillon,
Steven Price
Cc: kernel, dri-devel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Louis-Alexis Eyraud
Add a new gpu node in mt8370.dtsi to enable support for the
ARM Mali G57 MC2 GPU (Valhall-JM) found on the MT8370 SoC, using the
Panfrost driver.
On a Mediatek Genio 510 EVK board, the panfrost driver probed with the
following message:
```
panfrost 13000000.gpu: clock rate = 390000000
panfrost 13000000.gpu: mali-g57 id 0x9093 major 0x0 minor 0x0 status 0x0
panfrost 13000000.gpu: features: 00000000,000019f7, issues: 00000003,
80000400
panfrost 13000000.gpu: Features: L2:0x08130206 Shader:0x00000000
Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
panfrost 13000000.gpu: shader_present=0x5 l2_present=0x1
[drm] Initialized panfrost 1.3.0 for 13000000.gpu on minor 0
```
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt8370.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8370.dtsi b/arch/arm64/boot/dts/mediatek/mt8370.dtsi
index cf1a3759451ff899ce9e63e5a00f192fb483f6e5..2f27f7e7ab813b97f869297ae360f69854e966e1 100644
--- a/arch/arm64/boot/dts/mediatek/mt8370.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8370.dtsi
@@ -59,6 +59,15 @@ &cpu_little3_cooling_map0 {
<&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
+&gpu {
+ compatible = "mediatek,mt8370-mali", "arm,mali-valhall-jm";
+
+ power-domains = <&spm MT8188_POWER_DOMAIN_MFG2>,
+ <&spm MT8188_POWER_DOMAIN_MFG3>;
+
+ power-domain-names = "core0", "core1";
+};
+
&ppi_cluster0 {
affinity = <&cpu0 &cpu1 &cpu2 &cpu3>;
};
--
2.48.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/3] arm64: dts: mediatek: mt8370: Enable gpu support
2025-02-07 15:18 ` [PATCH v3 3/3] arm64: dts: mediatek: mt8370: Enable gpu support Louis-Alexis Eyraud
@ 2025-02-10 10:52 ` AngeloGioacchino Del Regno
2025-02-11 8:31 ` Krzysztof Kozlowski
1 sibling, 0 replies; 12+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-02-10 10:52 UTC (permalink / raw)
To: Louis-Alexis Eyraud, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
Boris Brezillon, Steven Price
Cc: kernel, dri-devel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
Il 07/02/25 16:18, Louis-Alexis Eyraud ha scritto:
> Add a new gpu node in mt8370.dtsi to enable support for the
> ARM Mali G57 MC2 GPU (Valhall-JM) found on the MT8370 SoC, using the
> Panfrost driver.
>
> On a Mediatek Genio 510 EVK board, the panfrost driver probed with the
> following message:
> ```
> panfrost 13000000.gpu: clock rate = 390000000
> panfrost 13000000.gpu: mali-g57 id 0x9093 major 0x0 minor 0x0 status 0x0
> panfrost 13000000.gpu: features: 00000000,000019f7, issues: 00000003,
> 80000400
> panfrost 13000000.gpu: Features: L2:0x08130206 Shader:0x00000000
> Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
> panfrost 13000000.gpu: shader_present=0x5 l2_present=0x1
> [drm] Initialized panfrost 1.3.0 for 13000000.gpu on minor 0
> ```
>
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC
2025-02-07 15:18 ` [PATCH v3 2/3] drm/panfrost: Add support for Mali on the " Louis-Alexis Eyraud
@ 2025-02-10 10:52 ` AngeloGioacchino Del Regno
2025-02-11 8:30 ` Krzysztof Kozlowski
1 sibling, 0 replies; 12+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-02-10 10:52 UTC (permalink / raw)
To: Louis-Alexis Eyraud, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
Boris Brezillon, Steven Price
Cc: kernel, dri-devel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
Il 07/02/25 16:18, Louis-Alexis Eyraud ha scritto:
> Add a compatible for the MediaTek MT8370 SoC, with an
> integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core),
> with the same platform data as MT8186 (one regulator, two power
> domains).
> Despite their different GPU architecture (making them not being
> compatible), the MT8186 platform data can still be used for MT8370
> because it only describes supplies, pm_domains and enablement of power
> management features in the panfrost driver.
>
> Reviewed-by: Steven Price <steven.price@arm.com>
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for MT8370 SoC
2025-02-07 15:18 ` [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for " Louis-Alexis Eyraud
@ 2025-02-10 10:52 ` AngeloGioacchino Del Regno
2025-02-11 8:29 ` Krzysztof Kozlowski
1 sibling, 0 replies; 12+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-02-10 10:52 UTC (permalink / raw)
To: Louis-Alexis Eyraud, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
Boris Brezillon, Steven Price
Cc: kernel, dri-devel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
Il 07/02/25 16:18, Louis-Alexis Eyraud ha scritto:
> Add a compatible for the MediaTek MT8370 SoC, with an
> integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core).
> This new compatible is needed for this SoC support, as the other
> existing compatibles for the same GPU architecture (MT8188, MT8192) do
> not match the required power domain number.
> The other compatibles (especially MT8186) cannot be reused because of
> GPU architecture difference.
>
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
> index 735c7f06c24e632ab738d062f15378f754c8adaf..6f6211950bb495fa6bfcdfe8d1e27e5ce7aeeae0 100644
> --- a/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
> +++ b/Documentation/devicetree/bindings/gpu/arm,mali-bifrost.yaml
> @@ -37,6 +37,7 @@ properties:
> - enum:
> - mediatek,mt8188-mali
> - mediatek,mt8192-mali
> + - mediatek,mt8370-mali
> - const: arm,mali-valhall-jm # Mali Valhall GPU model/revision is fully discoverable
>
> reg:
> @@ -217,7 +218,9 @@ allOf:
> properties:
> compatible:
> contains:
> - const: mediatek,mt8186-mali
> + enum:
> + - mediatek,mt8186-mali
> + - mediatek,mt8370-mali
> then:
> properties:
> power-domains:
>
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for MT8370 SoC
2025-02-07 15:18 ` [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for " Louis-Alexis Eyraud
2025-02-10 10:52 ` AngeloGioacchino Del Regno
@ 2025-02-11 8:29 ` Krzysztof Kozlowski
1 sibling, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-11 8:29 UTC (permalink / raw)
To: Louis-Alexis Eyraud
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Boris Brezillon,
Steven Price, kernel, dri-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On Fri, Feb 07, 2025 at 04:18:30PM +0100, Louis-Alexis Eyraud wrote:
> Add a compatible for the MediaTek MT8370 SoC, with an
> integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core).
> This new compatible is needed for this SoC support, as the other
You *always* need new compatible.
> existing compatibles for the same GPU architecture (MT8188, MT8192) do
> not match the required power domain number.
> The other compatibles (especially MT8186) cannot be reused because of
> GPU architecture difference.
Just FYI: you must not *ever* reuse compatibles. What you wanted is to
mark devices compatible and not. You claim devices are not compatible
because of this and that.
Please fix the commit msg because I am afraid later people will use it:
"I can reuse the compatible because that commit msg was acked".
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC
2025-02-07 15:18 ` [PATCH v3 2/3] drm/panfrost: Add support for Mali on the " Louis-Alexis Eyraud
2025-02-10 10:52 ` AngeloGioacchino Del Regno
@ 2025-02-11 8:30 ` Krzysztof Kozlowski
1 sibling, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-11 8:30 UTC (permalink / raw)
To: Louis-Alexis Eyraud
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Boris Brezillon,
Steven Price, kernel, dri-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On Fri, Feb 07, 2025 at 04:18:31PM +0100, Louis-Alexis Eyraud wrote:
> Add a compatible for the MediaTek MT8370 SoC, with an
> integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core),
> with the same platform data as MT8186 (one regulator, two power
> domains).
> Despite their different GPU architecture (making them not being
> compatible), the MT8186 platform data can still be used for MT8370
> because it only describes supplies, pm_domains and enablement of power
> management features in the panfrost driver.
>
> Reviewed-by: Steven Price <steven.price@arm.com>
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
> ---
> drivers/gpu/drm/panfrost/panfrost_drv.c | 1 +
> 1 file changed, 1 insertion(+)
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/3] arm64: dts: mediatek: mt8370: Enable gpu support
2025-02-07 15:18 ` [PATCH v3 3/3] arm64: dts: mediatek: mt8370: Enable gpu support Louis-Alexis Eyraud
2025-02-10 10:52 ` AngeloGioacchino Del Regno
@ 2025-02-11 8:31 ` Krzysztof Kozlowski
2025-02-11 9:28 ` AngeloGioacchino Del Regno
1 sibling, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2025-02-11 8:31 UTC (permalink / raw)
To: Louis-Alexis Eyraud
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, AngeloGioacchino Del Regno, Boris Brezillon,
Steven Price, kernel, dri-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
On Fri, Feb 07, 2025 at 04:18:32PM +0100, Louis-Alexis Eyraud wrote:
> Add a new gpu node in mt8370.dtsi to enable support for the
> ARM Mali G57 MC2 GPU (Valhall-JM) found on the MT8370 SoC, using the
> Panfrost driver.
>
> On a Mediatek Genio 510 EVK board, the panfrost driver probed with the
> following message:
> ```
> panfrost 13000000.gpu: clock rate = 390000000
> panfrost 13000000.gpu: mali-g57 id 0x9093 major 0x0 minor 0x0 status 0x0
> panfrost 13000000.gpu: features: 00000000,000019f7, issues: 00000003,
> 80000400
> panfrost 13000000.gpu: Features: L2:0x08130206 Shader:0x00000000
> Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
> panfrost 13000000.gpu: shader_present=0x5 l2_present=0x1
> [drm] Initialized panfrost 1.3.0 for 13000000.gpu on minor 0
> ```
>
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
> ---
> arch/arm64/boot/dts/mediatek/mt8370.dtsi | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/mediatek/mt8370.dtsi b/arch/arm64/boot/dts/mediatek/mt8370.dtsi
> index cf1a3759451ff899ce9e63e5a00f192fb483f6e5..2f27f7e7ab813b97f869297ae360f69854e966e1 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8370.dtsi
> +++ b/arch/arm64/boot/dts/mediatek/mt8370.dtsi
> @@ -59,6 +59,15 @@ &cpu_little3_cooling_map0 {
> <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
> };
>
> +&gpu {
> + compatible = "mediatek,mt8370-mali", "arm,mali-valhall-jm";
It's up to platform maintainers, but IMHO this is discouraged practice.
If you ever need to override compatible, this means the node is not
really shared between this and base SoC (base DTSI).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/3] arm64: dts: mediatek: mt8370: Enable gpu support
2025-02-11 8:31 ` Krzysztof Kozlowski
@ 2025-02-11 9:28 ` AngeloGioacchino Del Regno
2025-02-11 10:41 ` Louis-Alexis Eyraud
0 siblings, 1 reply; 12+ messages in thread
From: AngeloGioacchino Del Regno @ 2025-02-11 9:28 UTC (permalink / raw)
To: Krzysztof Kozlowski, Louis-Alexis Eyraud
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, Boris Brezillon, Steven Price, kernel,
dri-devel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
Il 11/02/25 09:31, Krzysztof Kozlowski ha scritto:
> On Fri, Feb 07, 2025 at 04:18:32PM +0100, Louis-Alexis Eyraud wrote:
>> Add a new gpu node in mt8370.dtsi to enable support for the
>> ARM Mali G57 MC2 GPU (Valhall-JM) found on the MT8370 SoC, using the
>> Panfrost driver.
>>
>> On a Mediatek Genio 510 EVK board, the panfrost driver probed with the
>> following message:
>> ```
>> panfrost 13000000.gpu: clock rate = 390000000
>> panfrost 13000000.gpu: mali-g57 id 0x9093 major 0x0 minor 0x0 status 0x0
>> panfrost 13000000.gpu: features: 00000000,000019f7, issues: 00000003,
>> 80000400
>> panfrost 13000000.gpu: Features: L2:0x08130206 Shader:0x00000000
>> Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
>> panfrost 13000000.gpu: shader_present=0x5 l2_present=0x1
>> [drm] Initialized panfrost 1.3.0 for 13000000.gpu on minor 0
>> ```
>>
>> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
>> ---
>> arch/arm64/boot/dts/mediatek/mt8370.dtsi | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/mediatek/mt8370.dtsi b/arch/arm64/boot/dts/mediatek/mt8370.dtsi
>> index cf1a3759451ff899ce9e63e5a00f192fb483f6e5..2f27f7e7ab813b97f869297ae360f69854e966e1 100644
>> --- a/arch/arm64/boot/dts/mediatek/mt8370.dtsi
>> +++ b/arch/arm64/boot/dts/mediatek/mt8370.dtsi
>> @@ -59,6 +59,15 @@ &cpu_little3_cooling_map0 {
>> <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
>> };
>>
>> +&gpu {
>> + compatible = "mediatek,mt8370-mali", "arm,mali-valhall-jm";
>
> It's up to platform maintainers, but IMHO this is discouraged practice.
> If you ever need to override compatible, this means the node is not
> really shared between this and base SoC (base DTSI).
>
That's true, indeed, but this is a special case, where the GPU actually is really
architecturally and generationally the same, difference being that one core is
lasered off from the lower binned silicon.
I appreciate you pointing that out, and effectively we shall not create any
misunderstanding on this practice, which shall remain discouraged.
Speaking of which!
Louis, since you anyway have to send a v4, please add a comment before that
gpu node override saying:
/*
* Please note that overriding compatibles is a discouraged practice and is a
* clear indication of nodes not being, well, compatible!
*
* This is a special case, where the GPU is the same as MT8188, but with one
* of the cores fused out in this lower-binned SoC.
*/
&gpu {
....etc
Thanks,
Angelo
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v3 3/3] arm64: dts: mediatek: mt8370: Enable gpu support
2025-02-11 9:28 ` AngeloGioacchino Del Regno
@ 2025-02-11 10:41 ` Louis-Alexis Eyraud
0 siblings, 0 replies; 12+ messages in thread
From: Louis-Alexis Eyraud @ 2025-02-11 10:41 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Krzysztof Kozlowski
Cc: Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, David Airlie,
Simona Vetter, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Matthias Brugger, Boris Brezillon, Steven Price, kernel,
dri-devel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On Tue, 2025-02-11 at 10:28 +0100, AngeloGioacchino Del Regno wrote:
> Il 11/02/25 09:31, Krzysztof Kozlowski ha scritto:
> > On Fri, Feb 07, 2025 at 04:18:32PM +0100, Louis-Alexis Eyraud
> > wrote:
> > > Add a new gpu node in mt8370.dtsi to enable support for the
> > > ARM Mali G57 MC2 GPU (Valhall-JM) found on the MT8370 SoC, using
> > > the
> > > Panfrost driver.
> > >
> > > On a Mediatek Genio 510 EVK board, the panfrost driver probed
> > > with the
> > > following message:
> > > ```
> > > panfrost 13000000.gpu: clock rate = 390000000
> > > panfrost 13000000.gpu: mali-g57 id 0x9093 major 0x0 minor 0x0
> > > status 0x0
> > > panfrost 13000000.gpu: features: 00000000,000019f7, issues:
> > > 00000003,
> > > 80000400
> > > panfrost 13000000.gpu: Features: L2:0x08130206 Shader:0x00000000
> > > Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
> > > panfrost 13000000.gpu: shader_present=0x5 l2_present=0x1
> > > [drm] Initialized panfrost 1.3.0 for 13000000.gpu on minor 0
> > > ```
> > >
> > > Signed-off-by: Louis-Alexis Eyraud
> > > <louisalexis.eyraud@collabora.com>
> > > ---
> > > arch/arm64/boot/dts/mediatek/mt8370.dtsi | 9 +++++++++
> > > 1 file changed, 9 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/mediatek/mt8370.dtsi
> > > b/arch/arm64/boot/dts/mediatek/mt8370.dtsi
> > > index
> > > cf1a3759451ff899ce9e63e5a00f192fb483f6e5..2f27f7e7ab813b97f869297
> > > ae360f69854e966e1 100644
> > > --- a/arch/arm64/boot/dts/mediatek/mt8370.dtsi
> > > +++ b/arch/arm64/boot/dts/mediatek/mt8370.dtsi
> > > @@ -59,6 +59,15 @@ &cpu_little3_cooling_map0 {
> > > <&cpu3 THERMAL_NO_LIMIT
> > > THERMAL_NO_LIMIT>;
> > > };
> > >
> > > +&gpu {
> > > + compatible = "mediatek,mt8370-mali", "arm,mali-valhall-
> > > jm";
> >
> > It's up to platform maintainers, but IMHO this is discouraged
> > practice.
> > If you ever need to override compatible, this means the node is not
> > really shared between this and base SoC (base DTSI).
> >
>
> That's true, indeed, but this is a special case, where the GPU
> actually is really
> architecturally and generationally the same, difference being that
> one core is
> lasered off from the lower binned silicon.
>
> I appreciate you pointing that out, and effectively we shall not
> create any
> misunderstanding on this practice, which shall remain discouraged.
>
> Speaking of which!
>
> Louis, since you anyway have to send a v4, please add a comment
> before that
> gpu node override saying:
>
> /*
> * Please note that overriding compatibles is a discouraged practice
> and is a
> * clear indication of nodes not being, well, compatible!
> *
> * This is a special case, where the GPU is the same as MT8188, but
> with one
> * of the cores fused out in this lower-binned SoC.
> */
> &gpu {
> ....etc
>
>
> Thanks,
> Angelo
Hi,
I understand your concerns and I agree with you.
Adding this warning comment in mt8370.dtsi file seems appropriate to
explain why it was done this way, and make more cautious those who
might read this override code and inspire from it.
I'll amend this commit with it in the v4 patchset.
Regards,
Louis-Alexis
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2025-02-11 10:57 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-07 15:18 [PATCH v3 0/3] Add Mali GPU support for Mediatek MT8370 SoC Louis-Alexis Eyraud
2025-02-07 15:18 ` [PATCH v3 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for " Louis-Alexis Eyraud
2025-02-10 10:52 ` AngeloGioacchino Del Regno
2025-02-11 8:29 ` Krzysztof Kozlowski
2025-02-07 15:18 ` [PATCH v3 2/3] drm/panfrost: Add support for Mali on the " Louis-Alexis Eyraud
2025-02-10 10:52 ` AngeloGioacchino Del Regno
2025-02-11 8:30 ` Krzysztof Kozlowski
2025-02-07 15:18 ` [PATCH v3 3/3] arm64: dts: mediatek: mt8370: Enable gpu support Louis-Alexis Eyraud
2025-02-10 10:52 ` AngeloGioacchino Del Regno
2025-02-11 8:31 ` Krzysztof Kozlowski
2025-02-11 9:28 ` AngeloGioacchino Del Regno
2025-02-11 10:41 ` Louis-Alexis Eyraud
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox