blob: 53d70857d0e32d8641e8acb54969c1f3a6ba25ed [file] [log] [blame]
Jeremy Gebbenf84c7992013-03-26 10:29:36 -06001#ifndef MSM_ADRENO_DEVFREQ_H
2#define MSM_ADRENO_DEVFREQ_H
3
4#include <linux/notifier.h>
5
6#define ADRENO_DEVFREQ_NOTIFY_SUBMIT 1
7#define ADRENO_DEVFREQ_NOTIFY_RETIRE 2
8#define ADRENO_DEVFREQ_NOTIFY_IDLE 3
9
10struct device;
11
12int kgsl_devfreq_add_notifier(struct device *, struct notifier_block *);
13
14int kgsl_devfreq_del_notifier(struct device *, struct notifier_block *);
15
16/* same as KGSL_MAX_PWRLEVELS */
17#define MSM_ADRENO_MAX_PWRLEVELS 10
18
Lucille Sylvesterb80b6c92013-09-20 16:53:50 -060019struct xstats {
20 u64 ram_time;
21 u64 ram_wait;
22 int mod;
23};
24
Jeremy Gebbenf84c7992013-03-26 10:29:36 -060025struct devfreq_msm_adreno_tz_data {
26 struct notifier_block nb;
27 struct {
28 s64 total_time;
29 s64 busy_time;
30 } bin;
Lucille Sylvesterb80b6c92013-09-20 16:53:50 -060031 struct {
32 u64 total_time;
33 u64 ram_time;
34 u64 gpu_time;
35 u32 num;
36 u32 max;
37 u32 up[MSM_ADRENO_MAX_PWRLEVELS];
38 u32 down[MSM_ADRENO_MAX_PWRLEVELS];
39 u32 p_up[MSM_ADRENO_MAX_PWRLEVELS];
40 u32 p_down[MSM_ADRENO_MAX_PWRLEVELS];
41 unsigned int *index;
42 uint64_t *ib;
43 } bus;
Jeremy Gebbenf84c7992013-03-26 10:29:36 -060044 unsigned int device_id;
45};
46
47#endif