]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/panfrost: Add GPU_PM_RT support for RZ/G3E SoC
authorBiju Das <biju.das.jz@bp.renesas.com>
Wed, 3 Dec 2025 12:51:01 +0000 (12:51 +0000)
committerAdrian Larumbe <adrianml@alumnos.upm.es>
Sun, 21 Dec 2025 01:34:49 +0000 (01:34 +0000)
RZ/G3E SoC is embedded with Mali-G52 GPU system. The system hangs after
STR in the following condition:

STR -> Wakeup from STR -> Unload panfrost using 'modprobe -r panfrost'.

Fix this issue by asserting/deasserting the reset during suspend/resume.
Rename the variable allwinner_h616_data->default_pm_rt_data for data
reuse and make it as generic GPU PM runtime data.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Adrián Larumbe <adrian.larumbe@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
Link: https://patch.msgid.link/20251203125104.67596-1-biju.das.jz@bp.renesas.com
Signed-off-by: Adrian Larumbe <adrianml@alumnos.upm.es>
drivers/gpu/drm/panfrost/panfrost_drv.c

index b95120682a72b4aafeadd1b80f67785611df0809..2f58a9b0773ae911f6d0b06b26f82d106a3d3b76 100644 (file)
@@ -1077,7 +1077,7 @@ static const struct panfrost_compatible default_data = {
        .pm_domain_names = NULL,
 };
 
-static const struct panfrost_compatible allwinner_h616_data = {
+static const struct panfrost_compatible default_pm_rt_data = {
        .num_supplies = ARRAY_SIZE(default_supplies) - 1,
        .supply_names = default_supplies,
        .num_pm_domains = 1,
@@ -1157,6 +1157,7 @@ static const struct of_device_id dt_match[] = {
          .data = &amlogic_data, },
        { .compatible = "amlogic,meson-g12a-mali",
          .data = &amlogic_data, },
+       { .compatible = "renesas,r9a09g047-mali", .data = &default_pm_rt_data },
        { .compatible = "arm,mali-t604", .data = &default_data, },
        { .compatible = "arm,mali-t624", .data = &default_data, },
        { .compatible = "arm,mali-t628", .data = &default_data, },
@@ -1174,7 +1175,7 @@ static const struct of_device_id dt_match[] = {
        { .compatible = "mediatek,mt8188-mali", .data = &mediatek_mt8188_data },
        { .compatible = "mediatek,mt8192-mali", .data = &mediatek_mt8192_data },
        { .compatible = "mediatek,mt8370-mali", .data = &mediatek_mt8370_data },
-       { .compatible = "allwinner,sun50i-h616-mali", .data = &allwinner_h616_data },
+       { .compatible = "allwinner,sun50i-h616-mali", .data = &default_pm_rt_data },
        {}
 };
 MODULE_DEVICE_TABLE(of, dt_match);