From fc89958b2d3cef9bbb116880c8a8ec79ec3a6cab Mon Sep 17 00:00:00 2001 From: Mike Tipton Date: Tue, 10 Mar 2020 10:49:14 -0700 Subject: [PATCH] interconnect: qcom: Ignore -EBUSY for AMC requests AMC requests made while the RSC is in solver mode result in a -EBUSY response from the rpmh driver. This is expected and is a non-issue since in this case we just need the request to apply to the WAKE set instead. It's only possible to see this for secondary RSCs like the Display RSC, since the primary Apps RSC will only be in solver during the power collapse/restore sequences while SW isn't running. Ignore -EBUSY so we don't return an error and short-circuit before sending the necessary WAKE/SLEEP requests. Change-Id: Id34b91c6e46d282be2522434d3c2b4837291b3b7 Signed-off-by: Mike Tipton --- drivers/interconnect/qcom/bcm-voter.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/interconnect/qcom/bcm-voter.c b/drivers/interconnect/qcom/bcm-voter.c index db743e2dba38..905d382e221d 100644 --- a/drivers/interconnect/qcom/bcm-voter.c +++ b/drivers/interconnect/qcom/bcm-voter.c @@ -289,7 +289,19 @@ int qcom_icc_bcm_voter_commit(struct bcm_voter *voter) ret = rpmh_write_batch(voter->dev, RPMH_ACTIVE_ONLY_STATE, cmds, commit_idx); - if (ret) { + + /* + * Ignore -EBUSY for AMC requests, since this can only happen for AMC + * requests when the RSC is in solver mode. We can only be in solver + * mode at the time of request for secondary RSCs (e.g. Display RSC), + * since the primary Apps RSC is only in solver mode while + * entering/exiting power collapse when SW isn't running. The -EBUSY + * response is expected in solver and is a non-issue, since we just + * want the request to apply to the WAKE set in that case instead. + * Interconnect doesn't know when the RSC is in solver, so just always + * send AMC and ignore the harmless error response. + */ + if (ret && ret != -EBUSY) { pr_err("Error sending AMC RPMH requests (%d)\n", ret); goto out; }