Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31bbb3d7 authored by Lina Iyer's avatar Lina Iyer
Browse files

drivers: qcom: rpmh: Release memory back to pool for sleep/wake requests



Sleep/wake requests are cached locally in RPMH driver and are not sent
to TCS. So there won't be a response callback from the mailbox driver.
Release the memory allocated for an async request. If the request is a
sync variant, signal the completion object, so there is no indefinite
wait for response from mailbox driver.

Change-Id: Ic29227adb7145c610a8d6e98eb09ae47a69f2cf2
Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
parent 68e85fd7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -254,6 +254,9 @@ int __rpmh_write(struct rpmh_client *rc, enum rpmh_state state,
		ret = mbox_send_message(rc->chan, &rpm_msg->msg);
		if (ret > 0)
			ret = 0;
	} else {
		/* Clean up our call by spoofing tx_done */
		rpmh_tx_done(&rc->client, &rpm_msg->msg, ret);
	}

	return ret;