lkml.org 
[lkml]   [2018]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v3 10/10] drivers: qcom: rpmh-rsc: allow active requests from wake TCS
Date
Quoting Lina Iyer (2018-03-02 08:43:17)
> diff --git a/drivers/soc/qcom/rpmh-rsc.c b/drivers/soc/qcom/rpmh-rsc.c
> index e9f5a1f387fd..d9cfa7aaf49c 100644
> --- a/drivers/soc/qcom/rpmh-rsc.c
> +++ b/drivers/soc/qcom/rpmh-rsc.c
> @@ -220,6 +220,7 @@ static struct tcs_group *get_tcs_for_msg(struct rsc_drv *drv,
> struct tcs_request *msg)
> {
> int type;
> + struct tcs_group *tcs;

const?

>
> switch (msg->state) {
> case RPMH_ACTIVE_ONLY_STATE:
> @@ -235,7 +236,22 @@ static struct tcs_group *get_tcs_for_msg(struct rsc_drv *drv,
> return ERR_PTR(-EINVAL);
> }
>
> - return get_tcs_of_type(drv, type);
> + /*
> + * If we are making an active request on a RSC that does not have a
> + * dedicated TCS for active state use, then re-purpose a wake TCS to
> + * send active votes.
> + * NOTE: The driver must be aware that this RSC does not have a
> + * dedicated AMC, and therefore would invalidate the sleep and wake
> + * TCSes before making an active state request.
> + */
> + tcs = get_tcs_of_type(drv, type);
> + if (msg->state == RPMH_ACTIVE_ONLY_STATE && IS_ERR(tcs)) {
> + tcs = get_tcs_of_type(drv, WAKE_TCS);
> + if (!IS_ERR(tcs))
> + rpmh_rsc_invalidate(drv);
> + }
> +
> + return tcs;

\
 
 \ /
  Last update: 2018-03-08 21:47    [W:0.783 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site