Skip to contentSkip to conversation

drm/panthor: skip regulator setup if no such prop

PATCH In review Rain Yang 2 participants 3 messages Sep 26, 2025 – Sep 28, 2025

Subsystems (4)
lore
Share & tools
lore

Rain Yang

author
#0 lore raw

PATCH 1/1 drm/panthor: skip regulator setup if no such prop

From: Rain Yang <[email protected]>

The regulator is optional, skip the setup instead of returning an error if it is not present

---
 drivers/gpu/drm/panthor/panthor_devfreq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/panthor/panthor_devfreq.c +1 -2
index 3686515d368d..2df1d76d84a0 100644
@@ -146,10 +146,9 @@ int panthor_devfreq_init(struct panthor_device *ptdev)
 	ptdev->devfreq = pdevfreq;
 
 	ret = devm_pm_opp_set_regulators(dev, reg_names);
-	if (ret) {
+	if (ret && ret != -ENODEV) {
 		if (ret != -EPROBE_DEFER)
 			DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n");
-
 		return ret;
 	}
 
Signature · 1 line
2.39.5
maintainer
#1 lore raw
Quoted 4 lines · On Fri, 26 Sep 2025 17:07:22 +0800 Rain Yang <[email protected]> wrote:

From: Rain Yang <[email protected]>

The regulator is optional, skip the setup instead of returning an error if it is not present

AFAICT, it's not flagged optional in the DT bindings yet, so I'd prefer to have this change and the DT bindings update in the same patch series (both will go through the drm-misc tree anway).

Quoted 22 lines
---
 drivers/gpu/drm/panthor/panthor_devfreq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/panthor/panthor_devfreq.c +1 -2
index 3686515d368d..2df1d76d84a0 100644
@@ -146,10 +146,9 @@ int panthor_devfreq_init(struct panthor_device *ptdev)
 	ptdev->devfreq = pdevfreq;
 
 	ret = devm_pm_opp_set_regulators(dev, reg_names);
-	if (ret) {
+	if (ret && ret != -ENODEV) {
 		if (ret != -EPROBE_DEFER)
 			DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n");
-
 		return ret;
 	}
 
author
#2 lore raw
Quoted 12 lines · Boris Brezillon
Quoted 4 lines · On Fri, 26 Sep 2025 17:07:22 +0800 Rain Yang <[email protected]> wrote:

From: Rain Yang <[email protected]>

The regulator is optional, skip the setup instead of returning an error if it is not present

AFAICT, it's not flagged optional in the DT bindings yet, so I'd prefer to have this change and the DT bindings update in the same patch series (both will go through the drm-misc tree anway).

thanks, Boris.
I will create a patch in dt-binding to make mali-supply required only applied to to rk3588

Quoted 23 lines
Quoted 22 lines
---
 drivers/gpu/drm/panthor/panthor_devfreq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/panthor/panthor_devfreq.c +1 -2
index 3686515d368d..2df1d76d84a0 100644
@@ -146,10 +146,9 @@ int panthor_devfreq_init(struct panthor_device *ptdev)
 	ptdev->devfreq = pdevfreq;
 
 	ret = devm_pm_opp_set_regulators(dev, reg_names);
-	if (ret) {
+	if (ret && ret != -ENODEV) {
 		if (ret != -EPROBE_DEFER)
 			DRM_DEV_ERROR(dev, "Couldn't set OPP regulators\n");
-
 		return ret;
 	}