* [PATCH v1] drm/panthor: skip regulator setup if no such prop
@ 2025-09-26 9:07 Rain Yang
2025-09-26 10:03 ` Boris Brezillon
0 siblings, 1 reply; 3+ messages in thread
From: Rain Yang @ 2025-09-26 9:07 UTC (permalink / raw)
To: boris.brezillon, steven.price, liviu.dudau, maarten.lankhorst,
mripard, tzimmermann, airlied, simona, marek.vasut, dri-devel,
linux-kernel, imx
Cc: Rain Yang
From: Rain Yang <jiyu.yang@nxp.com>
The regulator is optional, skip the setup instead of returning an
error if it is not present
Signed-off-by: Rain Yang <jiyu.yang@nxp.com>
---
drivers/gpu/drm/panthor/panthor_devfreq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panthor/panthor_devfreq.c b/drivers/gpu/drm/panthor/panthor_devfreq.c
index 3686515d368d..2df1d76d84a0 100644
--- a/drivers/gpu/drm/panthor/panthor_devfreq.c
+++ b/drivers/gpu/drm/panthor/panthor_devfreq.c
@@ -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;
}
--
2.39.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] drm/panthor: skip regulator setup if no such prop
2025-09-26 9:07 [PATCH v1] drm/panthor: skip regulator setup if no such prop Rain Yang
@ 2025-09-26 10:03 ` Boris Brezillon
2025-09-28 8:36 ` Rain Yang
0 siblings, 1 reply; 3+ messages in thread
From: Boris Brezillon @ 2025-09-26 10:03 UTC (permalink / raw)
To: Rain Yang
Cc: steven.price, liviu.dudau, maarten.lankhorst, mripard,
tzimmermann, airlied, simona, marek.vasut, dri-devel,
linux-kernel, imx, Rain Yang
On Fri, 26 Sep 2025 17:07:22 +0800
Rain Yang <jiyu.yang@oss.nxp.com> wrote:
> From: Rain Yang <jiyu.yang@nxp.com>
>
> 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).
>
> Signed-off-by: Rain Yang <jiyu.yang@nxp.com>
> ---
> drivers/gpu/drm/panthor/panthor_devfreq.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/panthor/panthor_devfreq.c b/drivers/gpu/drm/panthor/panthor_devfreq.c
> index 3686515d368d..2df1d76d84a0 100644
> --- a/drivers/gpu/drm/panthor/panthor_devfreq.c
> +++ b/drivers/gpu/drm/panthor/panthor_devfreq.c
> @@ -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;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] drm/panthor: skip regulator setup if no such prop
2025-09-26 10:03 ` Boris Brezillon
@ 2025-09-28 8:36 ` Rain Yang
0 siblings, 0 replies; 3+ messages in thread
From: Rain Yang @ 2025-09-28 8:36 UTC (permalink / raw)
To: Boris Brezillon
Cc: airlied, dri-devel, imx, jiyu.yang, linux-kernel, liviu.dudau,
maarten.lankhorst, marek.vasut, mripard, simona, steven.price,
tzimmermann
On Fri, Sep 26, 2025 at 12:03:11PM +0200, Boris Brezillon wrote:
>On Fri, 26 Sep 2025 17:07:22 +0800
>Rain Yang <jiyu.yang@oss.nxp.com> wrote:
>
>> From: Rain Yang <jiyu.yang@nxp.com>
>>
>> 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
>>
>> Signed-off-by: Rain Yang <jiyu.yang@nxp.com>
>> ---
>> drivers/gpu/drm/panthor/panthor_devfreq.c | 3 +--
>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/panthor/panthor_devfreq.c b/drivers/gpu/drm/panthor/panthor_devfreq.c
>> index 3686515d368d..2df1d76d84a0 100644
>> --- a/drivers/gpu/drm/panthor/panthor_devfreq.c
>> +++ b/drivers/gpu/drm/panthor/panthor_devfreq.c
>> @@ -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;
>> }
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-09-28 8:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-26 9:07 [PATCH v1] drm/panthor: skip regulator setup if no such prop Rain Yang
2025-09-26 10:03 ` Boris Brezillon
2025-09-28 8:36 ` Rain Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox