drm/panfrost: Select devfreq
Subsystems (3)
PATCH 1/1 drm/panfrost: Select devfreq
Currently, there is some logic for the driver to work without devfreq. However, the driver actually fails to probe if !CONFIG_PM_DEVFREQ.
Fix this by selecting devfreq, and drop the additional checks for devfreq.
--- drivers/gpu/drm/panfrost/Kconfig | 1 + drivers/gpu/drm/panfrost/panfrost_devfreq.c | 13 ++----------- 2 files changed, 3 insertions(+), 11 deletions(-)
drivers/gpu/drm/panfrost/Kconfig +1 -0
@@ -9,6 +9,7 @@ config DRM_PANFROST select IOMMU_SUPPORT select IOMMU_IO_PGTABLE_LPAE select DRM_GEM_SHMEM_HELPER + select PM_DEVFREQ help DRM driver for ARM Mali Midgard (T6xx, T7xx, T8xx) and Bifrost (G3x, G5x, G7x) GPUs.
drivers/gpu/drm/panfrost/panfrost_devfreq.c +2 -11
@@ -140,8 +140,8 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)return 0 ; ret =dev_pm_opp_of_add_table (&pfdev->pdev->dev); -if (ret == -ENODEV )/* Optional, continue without devfreq */ -return 0 ; +if (ret) +return ret;panfrost_devfreq_reset (pfdev);
@@ -170,9 +170,6 @@ 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;
@@ -182,9 +179,6 @@ 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); }
@@ -194,9 +188,6 @@ 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.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Ezequiel Garcia
Currently, there is some logic for the driver to work without devfreq. However, the driver actually fails to probe if !CONFIG_PM_DEVFREQ.
Fix this by selecting devfreq, and drop the additional checks for devfreq.
Please add a Fixes tag.
Neil
Quoted 55 lines
Signed-off-by Ezequiel Garcia <[email protected]>--- drivers/gpu/drm/panfrost/Kconfig | 1 + drivers/gpu/drm/panfrost/panfrost_devfreq.c | 13 ++----------- 2 files changed, 3 insertions(+), 11 deletions(-)drivers/gpu/drm/panfrost/Kconfig +1
-0@@ -9,6 +9,7 @@ config DRM_PANFROST select IOMMU_SUPPORT select IOMMU_IO_PGTABLE_LPAE select DRM_GEM_SHMEM_HELPER + select PM_DEVFREQ help DRM driver for ARM Mali Midgard (T6xx, T7xx, T8xx) and Bifrost (G3x, G5x, G7x) GPUs.drivers/gpu/drm/panfrost/panfrost_devfreq.c +2
-8@@ -140,8 +140,8 @@ int panfrost_devfreq_init(struct panfrost_device *pfdev)return 0 ; ret =dev_pm_opp_of_add_table (&pfdev->pdev->dev); -if (ret == -ENODEV )/* Optional, continue without devfreq */ -return 0 ; +if (ret) +return ret;panfrost_devfreq_reset (pfdev);@@ -170,9 +170,6 @@ 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;@@ -182,9 +179,6 @@ 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 193
Quoted 9 lines
drivers/gpu/drm/panfrost/panfrost_devfreq.c +0
-3@@ -194,9 +188,6 @@ 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 10 lines · Neil Armstrong
Quoted 6 lines · Ezequiel Garcia
Currently, there is some logic for the driver to work without devfreq. However, the driver actually fails to probe if !CONFIG_PM_DEVFREQ.
Fix this by selecting devfreq, and drop the additional checks for devfreq.
Please add a Fixes tag.
I applied this, but forgot the Fixes tag.
Rob
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel