diff options
| author | Christian Hewitt <[email protected]> | 2021-01-27 19:40:47 +0000 |
|---|---|---|
| committer | Qiang Yu <[email protected]> | 2021-02-07 12:55:08 +0000 |
| commit | 1d048afe7e52462d6b2a31dd6ee09c4475f39b4b (patch) | |
| tree | 4b55549793ccf95592c66605a3a42638e9fb6a87 /drivers/gpu/drm/lima/lima_devfreq.c | |
| parent | drm/lima: Use delayed timer as default in devfreq profile (diff) | |
| download | kernel-1d048afe7e52462d6b2a31dd6ee09c4475f39b4b.tar.gz kernel-1d048afe7e52462d6b2a31dd6ee09c4475f39b4b.zip | |
drm/lima: add governor data with pre-defined thresholds
This patch adapts the panfrost pre-defined thresholds change [0] to the
lima driver to improve real-world performance. The upthreshold value has
been set to ramp GPU frequency to max freq faster (compared to panfrost)
to compensate for the lower overall performance of utgard devices.
[0] https://patchwork.kernel.org/project/dri-devel/patch/[email protected]/
Signed-off-by: Christian Hewitt <[email protected]>
Reviewed-by: Lukasz Luba <[email protected]>
Signed-off-by: Qiang Yu <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/lima/lima_devfreq.c')
| -rw-r--r-- | drivers/gpu/drm/lima/lima_devfreq.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c index f1c9eb3e71bd..4f64940b9055 100644 --- a/drivers/gpu/drm/lima/lima_devfreq.c +++ b/drivers/gpu/drm/lima/lima_devfreq.c @@ -164,8 +164,16 @@ int lima_devfreq_init(struct lima_device *ldev) lima_devfreq_profile.initial_freq = cur_freq; dev_pm_opp_put(opp); + /* + * Setup default thresholds for the simple_ondemand governor. + * The values are chosen based on experiments. + */ + ldevfreq->gov_data.upthreshold = 30; + ldevfreq->gov_data.downdifferential = 5; + devfreq = devm_devfreq_add_device(dev, &lima_devfreq_profile, - DEVFREQ_GOV_SIMPLE_ONDEMAND, NULL); + DEVFREQ_GOV_SIMPLE_ONDEMAND, + &ldevfreq->gov_data); if (IS_ERR(devfreq)) { dev_err(dev, "Couldn't initialize GPU devfreq\n"); ret = PTR_ERR(devfreq); |
