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

Commit cc972f42 authored by Dhaval Patel's avatar Dhaval Patel Committed by Abhijit Kulkarni
Browse files

drm/msm: allow ab/ib vote update without rsc client



Allow ab/ib vote update without rsc client to avoid
failure log message.

Change-Id: I5ae29122838430b880e1e823b4ceb9e6d9046b34
Signed-off-by: default avatarDhaval Patel <pdhaval@codeaurora.org>
parent f8a2ff32
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -898,23 +898,22 @@ EXPORT_SYMBOL(sde_rsc_client_state_update);
int sde_rsc_client_vote(struct sde_rsc_client *caller_client,
		u32 bus_id, u64 ab_vote, u64 ib_vote)
{
	int rc = 0;
	int rc = 0, rsc_index;
	struct sde_rsc_priv *rsc;

	if (!caller_client) {
		pr_err("invalid client for ab/ib vote\n");
		return -EINVAL;
	} else if (caller_client->rsc_index >= MAX_RSC_COUNT) {
	if (caller_client && caller_client->rsc_index >= MAX_RSC_COUNT) {
		pr_err("invalid rsc index\n");
		return -EINVAL;
	}

	rsc = rsc_prv_list[caller_client->rsc_index];
	rsc_index = caller_client ? caller_client->rsc_index : SDE_RSC_INDEX;
	rsc = rsc_prv_list[rsc_index];
	if (!rsc)
		return -EINVAL;

	pr_debug("client:%s ab:%llu ib:%llu\n",
			caller_client->name, ab_vote, ib_vote);
			caller_client ? caller_client->name : "unknown",
			ab_vote, ib_vote);

	mutex_lock(&rsc->client_lock);
	rc = sde_rsc_clk_enable(&rsc->phandle, rsc->pclient, true);