Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/panfrost: Drop duplicated Mediatek supplies arrays

In the panfrost driver, the platform data of several Mediatek SoC
declares and uses custom supplies array definitions
(mediatek_mt8192_supplies, mediatek_mt8183_b_supplies), that are the
same as default_supplies (used by default platform data).

So drop these duplicated definitions and use default_supplies instead.
Also, rename mediatek_mt8183_supplies to a more generic name too
(legacy_supplies).

Signed-off-by: Louis-Alexis Eyraud <louisalexis.eyraud@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Signed-off-by: Steven Price <steven.price@arm.com>
Link: https://lore.kernel.org/r/20250509-mt8370-enable-gpu-v6-2-2833888cb1d3@collabora.com

authored by

Louis-Alexis Eyraud and committed by
Steven Price
6905b0d9 ea024e6e

+11 -13
+11 -13
drivers/gpu/drm/panfrost/panfrost_drv.c
··· 874 874 * On new devicetrees please use the _b variant with a single and 875 875 * coupled regulators instead. 876 876 */ 877 - static const char * const mediatek_mt8183_supplies[] = { "mali", "sram", NULL }; 877 + static const char * const legacy_supplies[] = { "mali", "sram", NULL }; 878 878 static const char * const mediatek_mt8183_pm_domains[] = { "core0", "core1", "core2" }; 879 879 static const struct panfrost_compatible mediatek_mt8183_data = { 880 - .num_supplies = ARRAY_SIZE(mediatek_mt8183_supplies) - 1, 881 - .supply_names = mediatek_mt8183_supplies, 880 + .num_supplies = ARRAY_SIZE(legacy_supplies) - 1, 881 + .supply_names = legacy_supplies, 882 882 .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains), 883 883 .pm_domain_names = mediatek_mt8183_pm_domains, 884 884 }; 885 885 886 - static const char * const mediatek_mt8183_b_supplies[] = { "mali", NULL }; 887 886 static const struct panfrost_compatible mediatek_mt8183_b_data = { 888 - .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1, 889 - .supply_names = mediatek_mt8183_b_supplies, 887 + .num_supplies = ARRAY_SIZE(default_supplies) - 1, 888 + .supply_names = default_supplies, 890 889 .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains), 891 890 .pm_domain_names = mediatek_mt8183_pm_domains, 892 891 .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF), ··· 893 894 894 895 static const char * const mediatek_mt8186_pm_domains[] = { "core0", "core1" }; 895 896 static const struct panfrost_compatible mediatek_mt8186_data = { 896 - .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1, 897 - .supply_names = mediatek_mt8183_b_supplies, 897 + .num_supplies = ARRAY_SIZE(default_supplies) - 1, 898 + .supply_names = default_supplies, 898 899 .num_pm_domains = ARRAY_SIZE(mediatek_mt8186_pm_domains), 899 900 .pm_domain_names = mediatek_mt8186_pm_domains, 900 901 .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF), ··· 902 903 903 904 /* MT8188 uses the same power domains and power supplies as MT8183 */ 904 905 static const struct panfrost_compatible mediatek_mt8188_data = { 905 - .num_supplies = ARRAY_SIZE(mediatek_mt8183_b_supplies) - 1, 906 - .supply_names = mediatek_mt8183_b_supplies, 906 + .num_supplies = ARRAY_SIZE(default_supplies) - 1, 907 + .supply_names = default_supplies, 907 908 .num_pm_domains = ARRAY_SIZE(mediatek_mt8183_pm_domains), 908 909 .pm_domain_names = mediatek_mt8183_pm_domains, 909 910 .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF), 910 911 .gpu_quirks = BIT(GPU_QUIRK_FORCE_AARCH64_PGTABLE), 911 912 }; 912 913 913 - static const char * const mediatek_mt8192_supplies[] = { "mali", NULL }; 914 914 static const char * const mediatek_mt8192_pm_domains[] = { "core0", "core1", "core2", 915 915 "core3", "core4" }; 916 916 static const struct panfrost_compatible mediatek_mt8192_data = { 917 - .num_supplies = ARRAY_SIZE(mediatek_mt8192_supplies) - 1, 918 - .supply_names = mediatek_mt8192_supplies, 917 + .num_supplies = ARRAY_SIZE(default_supplies) - 1, 918 + .supply_names = default_supplies, 919 919 .num_pm_domains = ARRAY_SIZE(mediatek_mt8192_pm_domains), 920 920 .pm_domain_names = mediatek_mt8192_pm_domains, 921 921 .pm_features = BIT(GPU_PM_CLK_DIS) | BIT(GPU_PM_VREG_OFF),