drm/panfrost: make devfreq optional again
Subsystems (3)
PATCH v2 1/1 drm/panfrost: make devfreq optional again
Devfreq runtime usage was made mandatory, thus making panfrost fail to probe on Amlogic S912 SoCs missing the "operating-points-v2" property. Make it optional again, leaving PM_DEVFREQ selected by default.
---
Changes since v1:
- fixed else/if logic in panfrost_devfreq_init
drivers/gpu/drm/panfrost/panfrost_devfreq.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/gpu/drm/panfrost/panfrost_devfreq.c +12 -1
@@ -140,7 +140,9 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)return 0 ; ret =dev_pm_opp_of_add_table (&pfdev->pdev->dev); -if (ret) +if (ret == -ENODEV )/* Optional, continue without devfreq */ +return 0 ; +else if (ret)return ret;panfrost_devfreq_reset (pfdev);
@@ -170,6 +172,9 @@ void panfrost_devfreq_resume(struct panfrost_device *pfdev) {int i; +if (!pfdev->devfreq.devfreq) +return ; +panfrost_devfreq_reset (pfdev);for (i =0 ; i <NUM_JOB_SLOTS ; i++) pfdev->devfreq.slot[i].busy = false;
@@ -179,6 +184,9 @@ void panfrost_devfreq_resume(struct panfrost_device *pfdev)void panfrost_devfreq_suspend (struct panfrost_device *pfdev) { +if (!pfdev->devfreq.devfreq) +return ; +devfreq_suspend_device (pfdev->devfreq.devfreq); }
@@ -188,6 +196,9 @@ static void panfrost_devfreq_update_utilization(struct panfrost_device *pfdev, iktime_t now;ktime_t last; +if (!pfdev->devfreq.devfreq) +return ; + now =ktime_get (); last = pfdev->devfreq.slot[slot].time_last_update;
Signature · 6 lines
2.21.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Neil Armstrong
Devfreq runtime usage was made mandatory, thus making panfrost fail to probe on Amlogic S912 SoCs missing the "operating-points-v2" property. Make it optional again, leaving
PM_DEVFREQselected by default.Fixes f3617b449d ("drm/panfrost: Select devfreq")Signed-off-by Neil Armstrong <[email protected]>
Thanks for the fix,
Eze
Quoted 43 lines
---
Changes since v1:
- fixed else/if logic inpanfrost_devfreq_initdrivers/gpu/drm/panfrost/panfrost_devfreq.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)drivers/gpu/drm/panfrost/panfrost_devfreq.c +9
-1@@ -140,7 +140,9 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)return 0 ; ret =dev_pm_opp_of_add_table (&pfdev->pdev->dev); -if (ret) +if (ret == -ENODEV )/* Optional, continue without devfreq */ +return 0 ; +else if (ret)return ret;panfrost_devfreq_reset (pfdev);@@ -170,6 +172,9 @@ void panfrost_devfreq_resume(struct panfrost_device *pfdev) {int i; +if (!pfdev->devfreq.devfreq) +return ; +panfrost_devfreq_reset (pfdev);for (i =0 ; i <NUM_JOB_SLOTS ; i++) pfdev->devfreq.slot[i].busy = false;@@ -179,6 +184,9 @@ void panfrost_devfreq_resume(struct panfrost_device *pfdev)void panfrost_devfreq_suspend (struct panfrost_device *pfdev) { +if (!pfdev->devfreq.devfreq) +return ; +devfreq_suspend_device (pfdev->devfreq.devfreq); }
drivers/gpu/drm/panfrost/panfrost_devfreq.c static void panfrost_devfreq_update_utilization(struct panfrost_device *pfdev, i · line 204
Quoted 9 lines
drivers/gpu/drm/panfrost/panfrost_devfreq.c +3
-0@@ -188,6 +196,9 @@ static void panfrost_devfreq_update_utilization(struct panfrost_device *pfdev, iktime_t now;ktime_t last; +if (!pfdev->devfreq.devfreq) +return ; + now =ktime_get (); last = pfdev->devfreq.slot[slot].time_last_update;
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Rob Herring
maintainerQuoted 5 lines · Neil Armstrong
Devfreq runtime usage was made mandatory, thus making panfrost fail to probe on Amlogic S912 SoCs missing the "operating-points-v2" property. Make it optional again, leaving
PM_DEVFREQselected by default.
Quoted 8 lines
Fixes f3617b449d ("drm/panfrost: Select devfreq")Signed-off-by Neil Armstrong <[email protected]>---
Changes since v1:
- fixed else/if logic inpanfrost_devfreq_initdrivers/gpu/drm/panfrost/panfrost_devfreq.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
Applied.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel