Skip to content

Commit 8164537

Browse files
laeyraudstevenprice-arm
authored andcommitted
drm/panfrost: Add support for Mali on the MT8370 SoC
Add a compatible for the MediaTek MT8370 SoC, with an integrated ARM Mali G57 MC2 GPU (Valhall-JM, dual core), with new platform data for its support in the panfrost driver. It uses the same data as MT8186 for the power management features to describe power supplies, pm_domains and enablement (one regulator, two power domains) but also sets the FORCE_AARCH64_PGTABLE flag in the GPU configuration quirks bitfield to enable AARCH64 4K page table format mode. As MT8186 and MT8370 SoC have different GPU architecture (Mali G52 2EE MC2 for MT8186), making them not compatible, and this mode is only enabled for Mediatek SoC that are Mali G57 based (compatible with mediatek,mali-mt8188 or mediatek,mali-8192), having specific platform data allows to set this flag for MT8370 without modifying MT8186 configuration and behaviour. Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com> Signed-off-by: Steven Price <steven.price@arm.com> Link: https://lore.kernel.org/r/20250509-mt8370-enable-gpu-v6-4-2833888cb1d3@collabora.com
1 parent bd77b87 commit 8164537

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/gpu/drm/panfrost/panfrost_drv.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,15 @@ static const struct panfrost_compatible mediatek_mt8192_data = {
918918
.gpu_quirks = BIT(GPU_QUIRK_FORCE_AARCH64_PGTABLE),
919919
};
920920

921+
static const struct panfrost_compatible mediatek_mt8370_data = {
922+
.num_supplies = ARRAY_SIZE(default_supplies) - 1,
923+
.supply_names = default_supplies,
924+
.num_pm_domains = 2,
925+
.pm_domain_names = mediatek_pm_domains,
926+
.pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),
927+
.gpu_quirks = BIT(GPU_QUIRK_FORCE_AARCH64_PGTABLE),
928+
};
929+
921930
static const struct of_device_id dt_match[] = {
922931
/* Set first to probe before the generic compatibles */
923932
{ .compatible = "amlogic,meson-gxm-mali",
@@ -940,6 +949,7 @@ static const struct of_device_id dt_match[] = {
940949
{ .compatible = "mediatek,mt8186-mali", .data = &mediatek_mt8186_data },
941950
{ .compatible = "mediatek,mt8188-mali", .data = &mediatek_mt8188_data },
942951
{ .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data },
952+
{ .compatible = "mediatek,mt8370-mali", .data = &mediatek_mt8370_data },
943953
{ .compatible = "allwinner,sun50i-h616-mali", .data = &allwinner_h616_data },
944954
{}
945955
};

0 commit comments

Comments
 (0)