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

Commit 2a0d096e authored by Carter Cooper's avatar Carter Cooper Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Force a vote after CORE_FW_START



Force a valid vote to ensure everybody starts with valid values

Change-Id: Ic86779bf389e27f79090e1dd03da2ced4ab814b2
Signed-off-by: default avatarOleg Perelet <operelet@codeaurora.org>
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent 66ad6f80
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -404,6 +404,17 @@ static int hfi_send_feature_ctrls(struct gmu_device *gmu)
	return 0;
}

static int hfi_send_init_perf_vote(struct gmu_device *gmu)
{
	struct hfi_gx_bw_perf_vote_cmd req = {
		.ack_type = DCVS_ACK_NONBLOCK,
		.freq = 2,
		.bw = 2,
	};

	return hfi_send_req(gmu, H2F_MSG_GX_BW_PERF_VOTE, &req);
}

static int hfi_send_dcvstbl(struct gmu_device *gmu)
{
	struct hfi_dcvstable_cmd cmd = {
@@ -636,6 +647,11 @@ int hfi_start(struct gmu_device *gmu, uint32_t boot_state)
		result = hfi_send_core_fw_start(gmu);
		if (result)
			return result;

		/* Force a vote with initial values */
		result = hfi_send_init_perf_vote(gmu);
		if (result)
			return result;
	} else {
		/*
		 * Tell the GMU we are sending no more HFIs