drm/msm: Add devfreq support for the GPU
Add support for devfreq to dynamically control the GPU frequency. By default try to use the 'simple_ondemand' governor which can adjust the frequency based on GPU load. v2: Fix __aeabi_uldivmod issue from the 0 day bot and use devfreq_recommended_opp() as suggested by Rob. Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
@@ -66,6 +66,7 @@ struct msm_gpu_funcs {
|
||||
/* show GPU status in debugfs: */
|
||||
void (*show)(struct msm_gpu *gpu, struct seq_file *m);
|
||||
#endif
|
||||
int (*gpu_busy)(struct msm_gpu *gpu, uint64_t *value);
|
||||
};
|
||||
|
||||
struct msm_gpu {
|
||||
@@ -120,6 +121,12 @@ struct msm_gpu {
|
||||
struct work_struct recover_work;
|
||||
|
||||
struct drm_gem_object *memptrs_bo;
|
||||
|
||||
struct {
|
||||
struct devfreq *devfreq;
|
||||
u64 busy_cycles;
|
||||
ktime_t time;
|
||||
} devfreq;
|
||||
};
|
||||
|
||||
/* It turns out that all targets use the same ringbuffer size */
|
||||
|
Reference in New Issue
Block a user