diff options
author | Chia-I Wu <olvaffe@gmail.com> | 2022-04-16 03:33:13 +0300 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2022-04-22 01:05:23 +0300 |
commit | 15c411980bacddf294452fd1cf7308b14f3f8c63 (patch) | |
tree | f482ecbab90197faaf18a80337ef8ea6cda3eb27 /drivers/gpu/drm/msm/msm_gpu.h | |
parent | 69f06a5d854f28ee65e15c20e488f21a063c1968 (diff) | |
download | linux-15c411980bacddf294452fd1cf7308b14f3f8c63.tar.xz |
drm/msm: simplify gpu_busy callback
Move tracking and busy time calculation to msm_devfreq_get_dev_status.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Cc: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20220416003314.59211-2-olvaffe@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gpu.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h index 93299f91b414..7418f99e77d9 100644 --- a/drivers/gpu/drm/msm/msm_gpu.h +++ b/drivers/gpu/drm/msm/msm_gpu.h @@ -63,7 +63,7 @@ struct msm_gpu_funcs { /* for generation specific debugfs: */ void (*debugfs_init)(struct msm_gpu *gpu, struct drm_minor *minor); #endif - unsigned long (*gpu_busy)(struct msm_gpu *gpu); + u64 (*gpu_busy)(struct msm_gpu *gpu, unsigned long *out_sample_rate); struct msm_gpu_state *(*gpu_state_get)(struct msm_gpu *gpu); int (*gpu_state_put)(struct msm_gpu_state *state); unsigned long (*gpu_get_freq)(struct msm_gpu *gpu); @@ -107,11 +107,8 @@ struct msm_gpu_devfreq { struct dev_pm_qos_request boost_freq; /** - * busy_cycles: - * - * Used by implementation of gpu->gpu_busy() to track the last - * busy counter value, for calculating elapsed busy cycles since - * last sampling period. + * busy_cycles: Last busy counter value, for calculating elapsed busy + * cycles since last sampling period. */ u64 busy_cycles; |