msm_adreno_devfreq.h 931 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef MSM_ADRENO_DEVFREQ_H
  2. #define MSM_ADRENO_DEVFREQ_H
  3. #include <linux/notifier.h>
  4. #define ADRENO_DEVFREQ_NOTIFY_SUBMIT 1
  5. #define ADRENO_DEVFREQ_NOTIFY_RETIRE 2
  6. #define ADRENO_DEVFREQ_NOTIFY_IDLE 3
  7. struct device;
  8. int kgsl_devfreq_add_notifier(struct device *, struct notifier_block *);
  9. int kgsl_devfreq_del_notifier(struct device *, struct notifier_block *);
  10. /* same as KGSL_MAX_PWRLEVELS */
  11. #define MSM_ADRENO_MAX_PWRLEVELS 10
  12. struct xstats {
  13. u64 ram_time;
  14. u64 ram_wait;
  15. int mod;
  16. };
  17. struct devfreq_msm_adreno_tz_data {
  18. struct notifier_block nb;
  19. struct {
  20. s64 total_time;
  21. s64 busy_time;
  22. } bin;
  23. struct {
  24. u64 total_time;
  25. u64 ram_time;
  26. u64 gpu_time;
  27. u32 num;
  28. u32 max;
  29. u32 up[MSM_ADRENO_MAX_PWRLEVELS];
  30. u32 down[MSM_ADRENO_MAX_PWRLEVELS];
  31. u32 p_up[MSM_ADRENO_MAX_PWRLEVELS];
  32. u32 p_down[MSM_ADRENO_MAX_PWRLEVELS];
  33. unsigned int *index;
  34. uint64_t *ib;
  35. } bus;
  36. unsigned int device_id;
  37. };
  38. #endif