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

Commit 950f5925 authored by Kyle Piefer's avatar Kyle Piefer Committed by Gerrit - the friendly Code Review server
Browse files

msm: kgsl: Send HFI test message during HFI start



To enable the IFPC feature, a test HFI must be sent
as the last HFI message during HFI start.

CRs-Fixed: 2085877
Change-Id: I22080b643d0176c95fa684fb5bd94234fcc3aacf
Signed-off-by: default avatarKyle Piefer <kpiefer@codeaurora.org>
parent cd538dbf
Loading
Loading
Loading
Loading
+25 −2
Original line number Diff line number Diff line
@@ -454,6 +454,22 @@ int hfi_send_bwtbl(struct gmu_device *gmu)
	return rc;
}

static int hfi_send_test(struct gmu_device *gmu)
{
	struct hfi_test_cmd test_msg = {
		.hdr = {
			.id = H2F_MSG_TEST,
			.size = sizeof(test_msg) >> 2,
			.type = HFI_MSG_CMD,
		},
	};
	uint32_t msg_size_dwords = (sizeof(test_msg)) >> 2;
	struct pending_msg msg;

	return hfi_send_msg(gmu, (struct hfi_msg_hdr *)&test_msg.hdr,
			msg_size_dwords, &msg);
}

int hfi_send_dcvs_vote(struct gmu_device *gmu, uint32_t perf_idx,
		uint32_t bw_idx, enum rpm_ack_type ack_type)
{
@@ -614,12 +630,19 @@ int hfi_start(struct gmu_device *gmu, uint32_t boot_state)

		result = hfi_send_lmconfig(gmu);
		if (result) {
			dev_err(dev, "Failire enabling limits management (%d)\n",
			dev_err(dev, "Failure enabling LM (%d)\n",
					result);
			return result;
		}
	}

	/* Tell the GMU we are sending no more HFIs until the next boot */
	if (ADRENO_QUIRK(adreno_dev, ADRENO_QUIRK_HFI_USE_REG)) {
		result = hfi_send_test(gmu);
		if (result)
			return result;
	}

	set_bit(GMU_HFI_ON, &gmu->flags);
	return 0;
}
+4 −0
Original line number Diff line number Diff line
@@ -228,6 +228,10 @@ struct hfi_bwtable_cmd {
	uint32_t ddr_cmd_data[MAX_GX_LEVELS][MAX_BW_CMDS];
};

struct hfi_test_cmd {
	struct hfi_msg_hdr hdr;
};

struct arc_vote_desc {
	/* In case of GPU freq vote, primary is GX, secondary is MX
	 * in case of GMU freq vote, primary is CX, secondary is MX