Skip to contentSkip to conversation

drm/panthor: attach the driver's multiple power domains

PATCH Superseded Rain Yang 2 participants 2 messages Oct 13, 2025 – Oct 20, 2025

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Rain Yang

author
#0 lore raw

PATCH v2 1/1 drm/panthor: attach the driver's multiple power domains

From: Rain Yang <[email protected]>

Some platforms, such as i.MX95, utilize multiple power domains that need to be attached explicitly. This patch ensures that the driver properly attaches all available power domains using devm_pm_domain_attach_list().

---
 drivers/gpu/drm/panthor/panthor_device.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/panthor/panthor_device.c +7 -0
index f0b2da5b2b96..fbbc84e9efbe 100644
@@ -167,6 +167,7 @@ static void panthor_device_free_page(struct drm_device *ddev, void *data)
 int panthor_device_init(struct panthor_device *ptdev)
 {
 	u32 *dummy_page_virt;
+	struct dev_pm_domain_list  *pd_list = NULL;
 	struct resource *res;
 	struct page *p;
 	int ret;
@@ -218,6 +219,12 @@ int panthor_device_init(struct panthor_device *ptdev)
 	if (ret)
 		return ret;
 
+	ret = devm_pm_domain_attach_list(ptdev->base.dev, NULL, &pd_list);
+	if (ret < 0) {
+		drm_err(&ptdev->base, "attach power domains failed, ret=%d", ret);
+		return ret;
+	}
+
 	ret = panthor_devfreq_init(ptdev);
 	if (ret)
 		return ret;
Signature · 1 line
2.39.5
maintainer
#1 lore raw
Quoted 26 lines · Rain Yang

From: Rain Yang <[email protected]>

Some platforms, such as i.MX95, utilize multiple power domains that need to be attached explicitly. This patch ensures that the driver properly attaches all available power domains using devm_pm_domain_attach_list().

---
 drivers/gpu/drm/panthor/panthor_device.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/panthor/panthor_device.c +1 -0
index f0b2da5b2b96..fbbc84e9efbe 100644
@@ -167,6 +167,7 @@ static void panthor_device_free_page(struct drm_device *ddev, void *data)
 int panthor_device_init(struct panthor_device *ptdev)
 {
 	u32 *dummy_page_virt;
+	struct dev_pm_domain_list  *pd_list = NULL;
 	struct resource *res;
 	struct page *p;
 	int ret;

drivers/gpu/drm/panthor/panthor_device.c int panthor_device_init(struct panthor_device *ptdev) · line 225

Quoted 7 lines
drivers/gpu/drm/panthor/panthor_device.c +4 -0
@@ -218,6 +219,12 @@ int panthor_device_init(struct panthor_device *ptdev)
 	if (ret)
 		return ret;
 
+	ret = devm_pm_domain_attach_list(ptdev->base.dev, NULL, &pd_list);
+	if (ret < 0) {
+		drm_err(&ptdev->base, "attach power domains failed, ret=%d", ret);
+		return ret;

This fails on the rock-5b. I believe because the PM code automatically attaches a single power domain (as on the rock-5b) so this then returns -EEXIST:

[   11.433501] panthor fb000000.gpu: [drm] *ERROR* attach power domains failed, ret=-17

I notice that the tegra driver checks dev->pm_domain and only calls devm_pm_domain_attach_list if that is NULL.

Thanks,
Steve

Quoted 5 lines
drivers/gpu/drm/panthor/panthor_device.c +2 -0
+	}
+
 	ret = panthor_devfreq_init(ptdev);
 	if (ret)
 		return ret;