Re: [PATCH v2 09/10] drm/panfrost: Add mediatek, mt8192-mali compatible

2023-02-21 Thread Chen-Yu Tsai
On Tue, Feb 21, 2023 at 11:37 PM AngeloGioacchino Del Regno
 wrote:
>
> From: Alyssa Rosenzweig 
>
> Required for Mali-G57 on the Mediatek MT8192 and MT8195, which
> uses even more power domains than the MT8183 before it.
>
> Signed-off-by: Alyssa Rosenzweig 
> [Angelo: Removed unneeded "sram" supply, added mt8195 to commit description]
> Co-developed-by: AngeloGioacchino Del Regno 
> 
> Signed-off-by: AngeloGioacchino Del Regno 
> 
> Reviewed-by: Steven Price 

Reviewed-by: Chen-Yu Tsai 


[PATCH v2 09/10] drm/panfrost: Add mediatek,mt8192-mali compatible

2023-02-21 Thread AngeloGioacchino Del Regno
From: Alyssa Rosenzweig 

Required for Mali-G57 on the Mediatek MT8192 and MT8195, which
uses even more power domains than the MT8183 before it.

Signed-off-by: Alyssa Rosenzweig 
[Angelo: Removed unneeded "sram" supply, added mt8195 to commit description]
Co-developed-by: AngeloGioacchino Del Regno 

Signed-off-by: AngeloGioacchino Del Regno 

Reviewed-by: Steven Price 
---
 drivers/gpu/drm/panfrost/panfrost_drv.c | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c 
b/drivers/gpu/drm/panfrost/panfrost_drv.c
index abb0dadd8f63..5d25e77e1037 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -663,6 +663,16 @@ static const struct panfrost_compatible 
mediatek_mt8183_data = {
.pm_domain_names = mediatek_mt8183_pm_domains,
 };
 
+static const char * const mediatek_mt8192_supplies[] = { "mali", NULL };
+static const char * const mediatek_mt8192_pm_domains[] = { "core0", "core1", 
"core2",
+  "core3", "core4" };
+static const struct panfrost_compatible mediatek_mt8192_data = {
+   .num_supplies = ARRAY_SIZE(mediatek_mt8192_supplies) - 1,
+   .supply_names = mediatek_mt8192_supplies,
+   .num_pm_domains = ARRAY_SIZE(mediatek_mt8192_pm_domains),
+   .pm_domain_names = mediatek_mt8192_pm_domains,
+};
+
 static const struct of_device_id dt_match[] = {
/* Set first to probe before the generic compatibles */
{ .compatible = "amlogic,meson-gxm-mali",
@@ -681,6 +691,7 @@ static const struct of_device_id dt_match[] = {
{ .compatible = "arm,mali-bifrost", .data = _data, },
{ .compatible = "arm,mali-valhall-jm", .data = _data, },
{ .compatible = "mediatek,mt8183-mali", .data = _mt8183_data },
+   { .compatible = "mediatek,mt8192-mali", .data = _mt8192_data },
{}
 };
 MODULE_DEVICE_TABLE(of, dt_match);
-- 
2.39.2