diff options
author | Rob Clark <robdclark@chromium.org> | 2023-01-11 02:14:44 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2023-01-16 22:03:25 +0300 |
commit | 33f868db99f16af4ed3aa67f79cb8ede630b8574 (patch) | |
tree | baf8e6d50d52d5169e0566926a49f26bc9301be7 /drivers/gpu | |
parent | fadcc3ab1302d4e5baa32c272b658221f0066696 (diff) | |
download | linux-33f868db99f16af4ed3aa67f79cb8ede630b8574.tar.xz |
drm/msm/gpu: Add default devfreq thresholds
Setup more appropriate devfreq tuning thresholds.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/517788/
Link: https://lore.kernel.org/r/20230110231447.1939101-4-robdclark@gmail.com
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gpu_devfreq.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu_devfreq.c b/drivers/gpu/drm/msm/msm_gpu_devfreq.c index ae5380e2abf7..e27dbf12b5e8 100644 --- a/drivers/gpu/drm/msm/msm_gpu_devfreq.c +++ b/drivers/gpu/drm/msm/msm_gpu_devfreq.c @@ -145,6 +145,15 @@ void msm_devfreq_init(struct msm_gpu *gpu) if (!gpu->funcs->gpu_busy) return; + /* + * Setup default values for simple_ondemand governor tuning. We + * want to throttle up at 50% load for the double-buffer case, + * where due to stalling waiting for vblank we could get stuck + * at (for ex) 30fps at 50% utilization. + */ + priv->gpu_devfreq_config.upthreshold = 50; + priv->gpu_devfreq_config.downdifferential = 10; + mutex_init(&df->lock); dev_pm_qos_add_request(&gpu->pdev->dev, &df->boost_freq, |