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

Commit f1164755 authored by David Dai's avatar David Dai Committed by Gerrit - the friendly Code Review server
Browse files

msm: msm_bus: Ignore -EBUSY from RPMH when sending AWAKE requests



Since the msm bus driver does not have a way to differentiate between
the state of the display RSC. It will attempt to send AWAKE requests
regardless of display RSC state, which are invalid when the display
RSC is in solver mode. The requests are ignored and the error returned
is benign, but is flooding kernel logging and causing hangs.

Change-Id: Ib5ca20146d52312873b5ed01911aac4e6e4f0f15
Signed-off-by: default avatarDavid Dai <daidavid1@codeaurora.org>
parent 607b49ce
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -624,16 +624,25 @@ int msm_bus_commit_data(struct list_head *clist)
		MSM_BUS_ERR("%s: Error invalidating mbox: %d\n",
						__func__, ret);

	if (cur_rsc->rscdev->req_state == RPMH_AWAKE_STATE)
	if (cur_rsc->rscdev->req_state == RPMH_AWAKE_STATE) {
		ret = rpmh_write(cur_mbox, cur_rsc->rscdev->req_state,
						cmdlist_active, cnt_active);
	else
		/*
		 * Ignore -EBUSY from rpmh_write if it's an AWAKE_STATE
		 * request since AWAKE requests are invalid when
		 * the display RSC is in solver mode and the bus driver
		 * does not know the current state of the display RSC.
		 */
		if (ret && ret != -EBUSY)
			MSM_BUS_ERR("%s: error sending active/awake sets: %d\n",
						__func__, ret);
	} else {
		ret = rpmh_write_passthru(cur_mbox, cur_rsc->rscdev->req_state,
						cmdlist_active, n_active);
		if (ret)
			MSM_BUS_ERR("%s: error sending active/awake sets: %d\n",
						__func__, ret);

	}

	ret = rpmh_write_passthru(cur_mbox, RPMH_WAKE_ONLY_STATE,
						cmdlist_wake, n_wake);