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 <shiven@codeaurora.org>
This commit is contained in:
Shivendra Kakrania 2021-06-07 13:34:51 -07:00 committed by Gerrit - the friendly Code Review server
parent ae5bc9a128
commit 879f70c521

View File

@ -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)
{