* [PATCH 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for MT8370 SoC
2025-01-16 14:25 [PATCH 0/3] Add Mali GPU support for Mediatek MT8370 SoC Louis-Alexis Eyraud
@ 2025-01-16 14:25 ` Louis-Alexis Eyraud
2025-01-18 16:01 ` Krzysztof Kozlowski
2025-01-16 14:25 ` [PATCH 2/3] drm/panfrost: Add support for Mali on the " Louis-Alexis Eyraud
` (2 subsequent siblings)
3 siblings, 1 reply; 12+ messages in thread
From: Louis-Alexis Eyraud @ 2025-01-16 14:25 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 commit adds a compatible for the MediaTek MT8370 SoC, with an
integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core).
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.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for MT8370 SoC
2025-01-16 14:25 ` [PATCH 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for " Louis-Alexis Eyraud
@ 2025-01-18 16:01 ` Krzysztof Kozlowski
0 siblings, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-18 16:01 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 Thu, Jan 16, 2025 at 03:25:57PM +0100, Louis-Alexis Eyraud wrote:
> This commit adds a compatible for the MediaTek MT8370 SoC, with an
Please do not use "This commit/patch/change", but imperative mood. See
longer explanation here:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95
> integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core).
Anyway, your commit msg explains "what" which is obvious. Say something
not obvious - e.g. not compatible with 8192? Why not?
>
> 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
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC
2025-01-16 14:25 [PATCH 0/3] Add Mali GPU support for Mediatek MT8370 SoC Louis-Alexis Eyraud
2025-01-16 14:25 ` [PATCH 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for " Louis-Alexis Eyraud
@ 2025-01-16 14:25 ` Louis-Alexis Eyraud
2025-01-16 14:50 ` Steven Price
2025-01-18 16:08 ` Krzysztof Kozlowski
2025-01-16 14:25 ` [PATCH 3/3] arm64: dts: mediatek: mt8370: Enable gpu support Louis-Alexis Eyraud
2025-01-17 14:32 ` [PATCH 0/3] Add Mali GPU support for Mediatek MT8370 SoC Rob Herring (Arm)
3 siblings, 2 replies; 12+ messages in thread
From: Louis-Alexis Eyraud @ 2025-01-16 14:25 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 commit adds a compatible for the MediaTek MT8370 SoC, with an
integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core), and adds
platform data using the same supplies and the same power domain lists
as MT8186 (one regulator, two power domains).
Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
---
drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index 0f3935556ac761adcd80197d87e8e478df436fd5..1d51b64ed0f0660cc95263a289d5dad204540cfd 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -837,6 +837,15 @@ static const struct panfrost_compatible mediatek_mt8192_data = {
.pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
};
+/* MT8370 uses the same power domains and power supplies as MT8186 */
+static const struct panfrost_compatible mediatek_mt8370_data = {
+ .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1,
+ .supply_names = mediatek_mt8183_b_supplies,
+ .num_pm_domains = ARRAY_SIZE(mediatek_mt8186_pm_domains),
+ .pm_domain_names = mediatek_mt8186_pm_domains,
+ .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
+};
+
static const struct of_device_id dt_match[] = {
/* Set first to probe before the generic compatibles */
{ .compatible = "amlogic,meson-gxm-mali",
@@ -859,6 +868,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_mt8370_data },
{}
};
MODULE_DEVICE_TABLE(of, dt_match);
--
2.48.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC
2025-01-16 14:25 ` [PATCH 2/3] drm/panfrost: Add support for Mali on the " Louis-Alexis Eyraud
@ 2025-01-16 14:50 ` Steven Price
2025-01-18 16:08 ` Krzysztof Kozlowski
1 sibling, 0 replies; 12+ messages in thread
From: Steven Price @ 2025-01-16 14:50 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,
AngeloGioacchino Del Regno, Boris Brezillon
Cc: kernel, dri-devel, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek
On 16/01/2025 14:25, Louis-Alexis Eyraud wrote:
> This commit adds a compatible for the MediaTek MT8370 SoC, with an
> integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core), and adds
> platform data using the same supplies and the same power domain lists
> as MT8186 (one regulator, two power domains).
>
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
> ---
> drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> index 0f3935556ac761adcd80197d87e8e478df436fd5..1d51b64ed0f0660cc95263a289d5dad204540cfd 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> @@ -837,6 +837,15 @@ static const struct panfrost_compatible mediatek_mt8192_data = {
> .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
> };
>
> +/* MT8370 uses the same power domains and power supplies as MT8186 */
> +static const struct panfrost_compatible mediatek_mt8370_data = {
> + .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1,
> + .supply_names = mediatek_mt8183_b_supplies,
> + .num_pm_domains = ARRAY_SIZE(mediatek_mt8186_pm_domains),
> + .pm_domain_names = mediatek_mt8186_pm_domains,
> + .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
> +};
> +
> static const struct of_device_id dt_match[] = {
> /* Set first to probe before the generic compatibles */
> { .compatible = "amlogic,meson-gxm-mali",
> @@ -859,6 +868,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_mt8370_data },
> {}
> };
> MODULE_DEVICE_TABLE(of, dt_match);
>
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC
2025-01-16 14:25 ` [PATCH 2/3] drm/panfrost: Add support for Mali on the " Louis-Alexis Eyraud
2025-01-16 14:50 ` Steven Price
@ 2025-01-18 16:08 ` Krzysztof Kozlowski
2025-01-30 12:15 ` Louis-Alexis Eyraud
1 sibling, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-18 16:08 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 Thu, Jan 16, 2025 at 03:25:58PM +0100, Louis-Alexis Eyraud wrote:
> This commit adds a compatible for the MediaTek MT8370 SoC, with an
> integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core), and adds
> platform data using the same supplies and the same power domain lists
> as MT8186 (one regulator, two power domains).
>
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
> ---
> drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> index 0f3935556ac761adcd80197d87e8e478df436fd5..1d51b64ed0f0660cc95263a289d5dad204540cfd 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> @@ -837,6 +837,15 @@ static const struct panfrost_compatible mediatek_mt8192_data = {
> .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
> };
>
> +/* MT8370 uses the same power domains and power supplies as MT8186 */
> +static const struct panfrost_compatible mediatek_mt8370_data = {
> + .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1,
> + .supply_names = mediatek_mt8183_b_supplies,
> + .num_pm_domains = ARRAY_SIZE(mediatek_mt8186_pm_domains),
> + .pm_domain_names = mediatek_mt8186_pm_domains,
> + .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
> +};
No, people, stop this nonsense. This is exactly the same as previous.
Don't duplicate entries just because you want a commit.
> +
> static const struct of_device_id dt_match[] = {
> /* Set first to probe before the generic compatibles */
> { .compatible = "amlogic,meson-gxm-mali",
> @@ -859,6 +868,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_mt8370_data },
No, express properly compatibility or say in bindings commit msg why
devices are not compatible.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC
2025-01-18 16:08 ` Krzysztof Kozlowski
@ 2025-01-30 12:15 ` Louis-Alexis Eyraud
2025-01-30 13:20 ` Krzysztof Kozlowski
2025-01-30 13:21 ` Krzysztof Kozlowski
0 siblings, 2 replies; 12+ messages in thread
From: Louis-Alexis Eyraud @ 2025-01-30 12:15 UTC (permalink / raw)
To: Krzysztof Kozlowski
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
Hello,
sorry for the delay,
---- On Sat, 18 Jan 2025 17:08:10 +0100 Krzysztof Kozlowski wrote ---
> On Thu, Jan 16, 2025 at 03:25:58PM +0100, Louis-Alexis Eyraud wrote:
> > This commit adds a compatible for the MediaTek MT8370 SoC, with an
> > integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core), and adds
> > platform data using the same supplies and the same power domain lists
> > as MT8186 (one regulator, two power domains).
> >
> > Signed-off-by: Louis-Alexis Eyraud louisalexis.eyraud@collabora.com>
> > ---
> > drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> > index 0f3935556ac761adcd80197d87e8e478df436fd5..1d51b64ed0f0660cc95263a289d5dad204540cfd 100644
> > --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> > +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> > @@ -837,6 +837,15 @@ static const struct panfrost_compatible mediatek_mt8192_data = {
> > .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
> > };
> >
> > +/* MT8370 uses the same power domains and power supplies as MT8186 */
> > +static const struct panfrost_compatible mediatek_mt8370_data = {
> > + .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1,
> > + .supply_names = mediatek_mt8183_b_supplies,
> > + .num_pm_domains = ARRAY_SIZE(mediatek_mt8186_pm_domains),
> > + .pm_domain_names = mediatek_mt8186_pm_domains,
> > + .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
> > +};
>
> No, people, stop this nonsense. This is exactly the same as previous.
> Don't duplicate entries just because you want a commit.
>
I added this new compatible in bindings and panfrost driver because there were no other matching compatible
Using another mali-vallhal-jm compatible would make the driver probe fail because of power domains number difference.
Using mt8186-mali compatible would work without modifications but as it is not the same architecture (mali-bifrost), it would be incorrect.
I've also misguessed on the dt_match array modifications, sorry.
I'll amend this patch in order to reuse the mt8186 platform data instead.
> > +
> > static const struct of_device_id dt_match[] = {
> > /* Set first to probe before the generic compatibles */
> > { .compatible = "amlogic,meson-gxm-mali",
> > @@ -859,6 +868,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_mt8370_data },
>
> No, express properly compatibility or say in bindings commit msg why
> devices are not compatible.
>
I'll reword in V2 the commit messages to make the compatible need more explicit.
> Best regards,
> Krzysztof
>
>
Regards,
Louis-Alexis Eyraud
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC
2025-01-30 12:15 ` Louis-Alexis Eyraud
@ 2025-01-30 13:20 ` Krzysztof Kozlowski
2025-01-30 13:21 ` Krzysztof Kozlowski
1 sibling, 0 replies; 12+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-30 13:20 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 30/01/2025 13:15, Louis-Alexis Eyraud wrote:
> Hello,
>
> sorry for the delay,
>
> ---- On Sat, 18 Jan 2025 17:08:10 +0100 Krzysztof Kozlowski wrote ---
> > On Thu, Jan 16, 2025 at 03:25:58PM +0100, Louis-Alexis Eyraud wrote:
> > > This commit adds a compatible for the MediaTek MT8370 SoC, with an
> > > integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core), and adds
> > > platform data using the same supplies and the same power domain lists
> > > as MT8186 (one regulator, two power domains).
> > >
> > > Signed-off-by: Louis-Alexis Eyraud louisalexis.eyraud@collabora.com>
> > > ---
> > > drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++++++++++
> > > 1 file changed, 10 insertions(+)
> > >
> > > diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> > > index 0f3935556ac761adcd80197d87e8e478df436fd5..1d51b64ed0f0660cc95263a289d5dad204540cfd 100644
> > > --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> > > +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> > > @@ -837,6 +837,15 @@ static const struct panfrost_compatible mediatek_mt8192_data = {
> > > .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
> > > };
> > >
> > > +/* MT8370 uses the same power domains and power supplies as MT8186 */
> > > +static const struct panfrost_compatible mediatek_mt8370_data = {
> > > + .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1,
> > > + .supply_names = mediatek_mt8183_b_supplies,
> > > + .num_pm_domains = ARRAY_SIZE(mediatek_mt8186_pm_domains),
> > > + .pm_domain_names = mediatek_mt8186_pm_domains,
> > > + .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
> > > +};
> >
> > No, people, stop this nonsense. This is exactly the same as previous.
> > Don't duplicate entries just because you want a commit.
> >
> I added this new compatible in bindings and panfrost driver because there were no other matching compatible
> Using another mali-vallhal-jm compatible would make the driver probe fail because of power domains number difference.
> Using mt8186-mali compatible would work without modifications but as it is not the same architecture (mali-bifrost), it would be incorrect.
Fix your email app, so it won't add spaces before quote and will wrap
the text properly.
>
> I've also misguessed on the dt_match array modifications, sorry.
> I'll amend this patch in order to reuse the mt8186 platform data instead.
>
> > > +
> > > static const struct of_device_id dt_match[] = {
> > > /* Set first to probe before the generic compatibles */
> > > { .compatible = "amlogic,meson-gxm-mali",
> > > @@ -859,6 +868,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_mt8370_data },
> >
> > No, express properly compatibility or say in bindings commit msg why
> > devices are not compatible.
> >
> I'll reword in V2 the commit messages to make the compatible need more explicit.
Your commit msg should then explain that this is not compatible with
mt8186 because programming model or architecture is different. Number of
power domains rarely matters for actual compatibility and as easily
visible in panfrost driver: does not matter here, either.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: [PATCH 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC
2025-01-30 12:15 ` Louis-Alexis Eyraud
2025-01-30 13:20 ` Krzysztof Kozlowski
@ 2025-01-30 13:21 ` Krzysztof Kozlowski
2025-01-31 11:01 ` Louis-Alexis Eyraud
1 sibling, 1 reply; 12+ messages in thread
From: Krzysztof Kozlowski @ 2025-01-30 13:21 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 30/01/2025 13:15, Louis-Alexis Eyraud wrote:
> Hello,
>
> sorry for the delay,
You gave yourself 12 days to respond, which is fine. But to me, you gave
15 minutes and immediately sent v2.
So now your v2 will be still rejected.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 2/3] drm/panfrost: Add support for Mali on the MT8370 SoC
2025-01-30 13:21 ` Krzysztof Kozlowski
@ 2025-01-31 11:01 ` Louis-Alexis Eyraud
0 siblings, 0 replies; 12+ messages in thread
From: Louis-Alexis Eyraud @ 2025-01-31 11:01 UTC (permalink / raw)
To: Krzysztof Kozlowski
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 Thu, 2025-01-30 at 14:21 +0100, Krzysztof Kozlowski wrote:
> On 30/01/2025 13:15, Louis-Alexis Eyraud wrote:
> > Hello,
> >
> > sorry for the delay,
>
> You gave yourself 12 days to respond, which is fine. But to me, you
> gave
> 15 minutes and immediately sent v2.
>
> So now your v2 will be still rejected.
>
> Best regards,
> Krzysztof
Hello Krzysztof,
my apologies if you felt offended I sent my v2 patchset too early after
replying on the mailing list.
I meant well.
As I felt your first remarks were appropriate and precise enough to me,
I've submitted a second version so that the modifications to review
could be available shortly after my reply.
I'll be more cautious next time.
Regards,
Louis-Alexis
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/3] arm64: dts: mediatek: mt8370: Enable gpu support
2025-01-16 14:25 [PATCH 0/3] Add Mali GPU support for Mediatek MT8370 SoC Louis-Alexis Eyraud
2025-01-16 14:25 ` [PATCH 1/3] dt-bindings: gpu: mali-bifrost: Add compatible for " Louis-Alexis Eyraud
2025-01-16 14:25 ` [PATCH 2/3] drm/panfrost: Add support for Mali on the " Louis-Alexis Eyraud
@ 2025-01-16 14:25 ` Louis-Alexis Eyraud
2025-01-17 14:32 ` [PATCH 0/3] Add Mali GPU support for Mediatek MT8370 SoC Rob Herring (Arm)
3 siblings, 0 replies; 12+ messages in thread
From: Louis-Alexis Eyraud @ 2025-01-16 14:25 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 commits adds a 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.0
^ permalink raw reply related [flat|nested] 12+ messages in thread* Re: [PATCH 0/3] Add Mali GPU support for Mediatek MT8370 SoC
2025-01-16 14:25 [PATCH 0/3] Add Mali GPU support for Mediatek MT8370 SoC Louis-Alexis Eyraud
` (2 preceding siblings ...)
2025-01-16 14:25 ` [PATCH 3/3] arm64: dts: mediatek: mt8370: Enable gpu support Louis-Alexis Eyraud
@ 2025-01-17 14:32 ` Rob Herring (Arm)
3 siblings, 0 replies; 12+ messages in thread
From: Rob Herring (Arm) @ 2025-01-17 14:32 UTC (permalink / raw)
To: Louis-Alexis Eyraud
Cc: David Airlie, linux-mediatek, Thomas Zimmermann,
Maarten Lankhorst, Maxime Ripard, Simona Vetter,
AngeloGioacchino Del Regno, Boris Brezillon, kernel, dri-devel,
devicetree, linux-arm-kernel, Steven Price, linux-kernel,
Krzysztof Kozlowski, Matthias Brugger, Conor Dooley
On Thu, 16 Jan 2025 15:25:56 +0100, Louis-Alexis Eyraud wrote:
> 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 testing this patchset on a Mediatek Genio 510 EVK board,
> with a kernel based on linux-next (tag: next-20250113) plus [1] patchset.
>
> 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/linux-mediatek/20250115-dts_mt8370-genio-510-v2-0-fc9b01d08834@collabora.com/
>
> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@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 | 10 ++++++++++
> 3 files changed, 23 insertions(+), 1 deletion(-)
> ---
> base-commit: 37136bf5c3a6f6b686d74f41837a6406bec6b7bc
> change-id: 20250115-mt8370-enable-gpu-3b6f595fa63d
> prerequisite-change-id: 20250113-dts_mt8370-genio-510-3560b8010ba9:v2
> prerequisite-patch-id: af53ae39240467340ac4c9cdbc8fdd949c5457a2
> prerequisite-patch-id: ca07485956f81c1a40029b48d2b4bcf00d74fc13
> prerequisite-patch-id: c34d9870b2c61d87ad8a6facba13d8970682e679
> prerequisite-patch-id: 48784acdcdd8b886fdec9f21c9cb88abb327e2e1
>
> Best regards,
> --
> Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
>
>
>
My bot found new DTB warnings on the .dts files added or changed in this
series.
Some warnings may be from an existing SoC .dtsi. Or perhaps the warnings
are fixed by another series. Ultimately, it is up to the platform
maintainer whether these warnings are acceptable or not. No need to reply
unless the platform maintainer has comments.
If you already ran DT checks and didn't see these error(s), then
make sure dt-schema is up to date:
pip3 install dtschema --upgrade
New warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/mediatek/' for 20250116-mt8370-enable-gpu-v1-0-0a6b78e925c8@collabora.com:
arch/arm64/boot/dts/mediatek/mt8370-genio-510-evk.dtb: pinctrl@10005000: 'pcie-default' does not match any of the regexes: '-pins$', 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/pinctrl/mediatek,mt8188-pinctrl.yaml#
arch/arm64/boot/dts/mediatek/mt8370-genio-510-evk.dtb: pmic: regulators: 'compatible' is a required property
from schema $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
arch/arm64/boot/dts/mediatek/mt8370-genio-510-evk.dtb: pmic: '#sound-dai-cells', 'mt6359codec', 'mt6359rtc' do not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/mfd/mediatek,mt6397.yaml#
arch/arm64/boot/dts/mediatek/mt8370-genio-510-evk.dtb: mailbox@10320000: 'clock-names' is a required property
from schema $id: http://devicetree.org/schemas/mailbox/mediatek,gce-mailbox.yaml#
arch/arm64/boot/dts/mediatek/mt8370-genio-510-evk.dtb: mailbox@10330000: 'clock-names' is a required property
from schema $id: http://devicetree.org/schemas/mailbox/mediatek,gce-mailbox.yaml#
arch/arm64/boot/dts/mediatek/mt8370-genio-510-evk.dtb: jpeg-decoder@1a040000: iommus: [[123, 685], [123, 686], [123, 690], [123, 691], [123, 692], [123, 693]] is too long
from schema $id: http://devicetree.org/schemas/media/mediatek-jpeg-decoder.yaml#
^ permalink raw reply [flat|nested] 12+ messages in thread