DRM_DEV_ERROR(&pfdev->pdev->dev, "Couldn't initialize GPU devfreq\n");
ret = PTR_ERR(pfdev->devfreq.devfreq);
pfdev->devfreq.devfreq = NULL;
+ dev_pm_opp_of_remove_table(&pfdev->pdev->dev);
return ret;
}
return 0;
}
+void panfrost_devfreq_fini(struct panfrost_device *pfdev)
+{
+ dev_pm_opp_of_remove_table(&pfdev->pdev->dev);
+}
+
void panfrost_devfreq_resume(struct panfrost_device *pfdev)
{
int i;
#define __PANFROST_DEVFREQ_H__
int panfrost_devfreq_init(struct panfrost_device *pfdev);
+void panfrost_devfreq_fini(struct panfrost_device *pfdev);
void panfrost_devfreq_resume(struct panfrost_device *pfdev);
void panfrost_devfreq_suspend(struct panfrost_device *pfdev);
*/
err = drm_dev_register(ddev, 0);
if (err < 0)
- goto err_out1;
+ goto err_out2;
panfrost_gem_shrinker_init(ddev);
return 0;
+err_out2:
+ panfrost_devfreq_fini(pfdev);
err_out1:
panfrost_device_fini(pfdev);
err_out0:
pm_runtime_get_sync(pfdev->dev);
pm_runtime_put_sync_autosuspend(pfdev->dev);
pm_runtime_disable(pfdev->dev);
+ panfrost_devfreq_fini(pfdev);
panfrost_device_fini(pfdev);
drm_dev_put(ddev);
return 0;