Subject: [PATCH v3 0/2] drm/panfrost: Add MT8188 support

Changes in v3:
- Added comment stating that MT8188 uses same supplies as MT8183
as requested by Steven

Changes in v2:
- Fixed bindings to restrict number of power domains for MT8188's
GPU to three like MT8183(b).

This series adds support for MT8188's Mali-G57 MC3.

AngeloGioacchino Del Regno (2):
dt-bindings: gpu: mali-bifrost: Add compatible for MT8188 SoC
drm/panfrost: Add support for Mali on the MT8188 SoC

.../devicetree/bindings/gpu/arm,mali-bifrost.yaml | 5 ++++-
drivers/gpu/drm/panfrost/panfrost_drv.c | 10 ++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)

--
2.45.2



Subject: [PATCH v3 2/2] drm/panfrost: Add support for Mali on the MT8188 SoC

MediaTek MT8188 has a Mali-G57 MC3 (Valhall-JM): add a new
compatible and platform data using the same supplies and the
same power domain lists as MT8183 (one regulator, three power
domains).

Reviewed-by: Chen-Yu Tsai <[email protected]>
Signed-off-by: AngeloGioacchino Del Regno <[email protected]>
---
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 ef9f6c0716d5..b43557b10ae3 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -777,6 +777,15 @@ static const struct panfrost_compatible mediatek_mt8186_data = {
.pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
};

+/* MT8188 uses the same power domains and power supplies as MT8183 */
+static const struct panfrost_compatible mediatek_mt8188_data = {
+ .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1,
+ .supply_names = mediatek_mt8183_b_supplies,
+ .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains),
+ .pm_domain_names = mediatek_mt8183_pm_domains,
+ .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
+};
+
static const char * const mediatek_mt8192_supplies[] = { "mali", NULL };
static const char * const mediatek_mt8192_pm_domains[] = { "core0", "core1", "core2",
"core3", "core4" };
@@ -808,6 +817,7 @@ static const struct of_device_id dt_match[] = {
{ .compatible = "mediatek,mt8183-mali", .data = &mediatek_mt8183_data },
{ .compatible = "mediatek,mt8183b-mali", .data = &mediatek_mt8183_b_data },
{ .compatible = "mediatek,mt8186-mali", .data = &mediatek_mt8186_data },
+ { .compatible = "mediatek,mt8188-mali", .data = &mediatek_mt8188_data },
{ .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data },
{}
};
--
2.45.2


2024-06-12 09:40:12

by Steven Price

[permalink] [raw]
Subject: Re: [PATCH v3 2/2] drm/panfrost: Add support for Mali on the MT8188 SoC

On 11/06/2024 09:56, AngeloGioacchino Del Regno wrote:
> MediaTek MT8188 has a Mali-G57 MC3 (Valhall-JM): add a new
> compatible and platform data using the same supplies and the
> same power domain lists as MT8183 (one regulator, three power
> domains).
>
> Reviewed-by: Chen-Yu Tsai <[email protected]>
> Signed-off-by: AngeloGioacchino Del Regno <[email protected]>

Reviewed-by: Steven Price <[email protected]>

> ---
> 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 ef9f6c0716d5..b43557b10ae3 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> @@ -777,6 +777,15 @@ static const struct panfrost_compatible mediatek_mt8186_data = {
> .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
> };
>
> +/* MT8188 uses the same power domains and power supplies as MT8183 */
> +static const struct panfrost_compatible mediatek_mt8188_data = {
> + .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1,
> + .supply_names = mediatek_mt8183_b_supplies,
> + .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains),
> + .pm_domain_names = mediatek_mt8183_pm_domains,
> + .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
> +};
> +
> static const char * const mediatek_mt8192_supplies[] = { "mali", NULL };
> static const char * const mediatek_mt8192_pm_domains[] = { "core0", "core1", "core2",
> "core3", "core4" };
> @@ -808,6 +817,7 @@ static const struct of_device_id dt_match[] = {
> { .compatible = "mediatek,mt8183-mali", .data = &mediatek_mt8183_data },
> { .compatible = "mediatek,mt8183b-mali", .data = &mediatek_mt8183_b_data },
> { .compatible = "mediatek,mt8186-mali", .data = &mediatek_mt8186_data },
> + { .compatible = "mediatek,mt8188-mali", .data = &mediatek_mt8188_data },
> { .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data },
> {}
> };