From 879f70c521d405f11e31ae2ef6ae928d542305fc Mon Sep 17 00:00:00 2001 From: Shivendra Kakrania Date: Mon, 7 Jun 2021 13:34:51 -0700 Subject: [PATCH] msm_mmrm: Add api support to check if mmrm is supported MMRM implements clk admission control for different multimedia resources. This api is added to assist clk clients to check if mmrm is supported for a chipset. If MMRM is not supported for a chipset then clients can use this api before going any further to mmrm apis for clk admission control. Change-Id: Ic2323d274902b4e83002ed431c013eef9f0bf25e Signed-off-by: Shivendra Kakrania --- include/linux/soc/qcom/msm_mmrm.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/include/linux/soc/qcom/msm_mmrm.h b/include/linux/soc/qcom/msm_mmrm.h index 4a369296bc7f..deec55b085c1 100644 --- a/include/linux/soc/qcom/msm_mmrm.h +++ b/include/linux/soc/qcom/msm_mmrm.h @@ -171,6 +171,18 @@ struct mmrm_client_data { }; #if IS_ENABLED(CONFIG_MSM_MMRM) +/** + * mmrm_client_check_scaling_supported - check if mmrm client type (clk, bw) + * scaling is supported for a client domain (camera, cvp, video, display) + * @client_type: Type of mmrm client (clk, bw) + * @client_domain: client domain (camera, cvp, display, video) + * + * Returns true : mmrm scaling is supported for a client type & domain + * false: mmrm scaling is not supported for a client type & domain + */ +bool mmrm_client_check_scaling_supported(enum mmrm_client_type client_type, + u32 client_domain); + /** * mmrm_client_register - register an mmrm client * This call not configure any rate, use set rate to configure desired rate. @@ -236,6 +248,12 @@ int mmrm_client_get_value(struct mmrm_client *client, struct mmrm_client_res_value *val); #else +static inline bool mmrm_client_check_scaling_supported( + enum mmrm_client_type client_type, u32 client_domain) +{ + return false; +} + static inline struct mmrm_client *mmrm_client_register( struct mmrm_client_desc *desc) {