diff options
| author | Jordan Crouse <jcrouse@codeaurora.org> | 2017-02-24 08:39:38 -0700 |
|---|---|---|
| committer | Jordan Crouse <jcrouse@codeaurora.org> | 2017-02-27 09:16:35 -0700 |
| commit | 411b19b48e2cce2434624360a4a6d420a1419466 (patch) | |
| tree | 8ca289240c08305d0649670469c9a052afaad6a0 /include/linux | |
| parent | 25becb443315339dc207c8687cad258836861063 (diff) | |
msm: kgsl: Add placeholders for KGSL power limit functions
Add placeholders for the KGSL power limit functions if
CONFIG_QCOM_KGSL is not enabled in the kernel config.
Change-Id: Ic0dedbad15b54cd8c3eba1b0649cb23193dbc16c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/msm_kgsl.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/msm_kgsl.h b/include/linux/msm_kgsl.h index 68cfe76e8652..5991485cdea4 100644 --- a/include/linux/msm_kgsl.h +++ b/include/linux/msm_kgsl.h @@ -3,11 +3,32 @@ #include <uapi/linux/msm_kgsl.h> +#ifdef CONFIG_QCOM_KGSL /* Limits mitigations APIs */ void *kgsl_pwr_limits_add(enum kgsl_deviceid id); void kgsl_pwr_limits_del(void *limit); int kgsl_pwr_limits_set_freq(void *limit, unsigned int freq); void kgsl_pwr_limits_set_default(void *limit); unsigned int kgsl_pwr_limits_get_freq(enum kgsl_deviceid id); +#else +static inline void *kgsl_pwr_limits_add(enum kgsl_deviceid id) +{ + return NULL; +} + +static inline void kgsl_pwr_limits_del(void *limit) { } + +static inline int kgsl_pwr_limits_set_freq(void *limit, unsigned int freq) +{ + return -EINVAL; +} + +static inline void kgsl_pwr_limits_set_default(void *limit) { } + +static inline unsigned int kgsl_pwr_limits_get_freq(enum kgsl_deviceid id) +{ + return 0; +} +#endif #endif /* _MSM_KGSL_H */ |
