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

Commit 6703dbe7 authored by Carter Cooper's avatar Carter Cooper
Browse files

msm: kgsl: Update HFI message IDs to reflect v1.0



Clean up unused message IDs.

Change-Id: I462fd5dae5d77e4a2002abd6a52b4cdf907819a9
Signed-off-by: default avatarCarter Cooper <ccooper@codeaurora.org>
parent dcf5408b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -478,7 +478,7 @@ int gmu_dcvs_set(struct gmu_device *gmu,
		return ret;
	}

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

struct rpmh_arc_vals {
+8 −8
Original line number Diff line number Diff line
@@ -469,12 +469,12 @@ static int hfi_send_test(struct gmu_device *gmu)
#define DCVS_VOTE(perf, clk_opt) ((((clk_opt) & 0xF) << 28) | ((perf) & 0xFF))
#define BW_VOTE(bw) ((bw) & 0xFF)

static int hfi_send_dcvs_vote(struct gmu_device *gmu, uint32_t perf_idx,
static int hfi_send_gx_bw_perf_vote(struct gmu_device *gmu, uint32_t perf_idx,
		uint32_t bw_idx, enum rpm_ack_type ack_type)
{
	struct hfi_dcvs_cmd dcvs_cmd = {
		.hdr = CMD_MSG_HDR(H2F_MSG_DCVS_VOTE,
				sizeof(struct hfi_dcvs_cmd) >> 2),
	struct hfi_gx_bw_perf_vote_cmd cmd = {
		.hdr = CMD_MSG_HDR(H2F_MSG_GX_BW_PERF_VOTE,
				sizeof(struct hfi_gx_bw_perf_vote_cmd) >> 2),
		.ack_type = ack_type,
		.freq = DCVS_VOTE(perf_idx, OPTION_AT_LEAST),
		.bw = BW_VOTE(bw_idx),
@@ -483,7 +483,7 @@ static int hfi_send_dcvs_vote(struct gmu_device *gmu, uint32_t perf_idx,
	int rc = 0;
	struct pending_msg msg;

	rc = hfi_send_msg(gmu, (uint32_t *)&dcvs_cmd, &msg);
	rc = hfi_send_msg(gmu, (uint32_t *)&cmd, &msg);
	if (rc)
		return rc;

@@ -663,16 +663,16 @@ void hfi_stop(struct gmu_device *gmu)
}

/* Entry point for external HFI requests */
int hfi_send_req(struct gmu_device *gmu, enum hfi_msg_id id, void *data)
int hfi_send_req(struct gmu_device *gmu, unsigned int id, void *data)
{
	switch (id) {
	case H2F_MSG_LM_CFG: {
		return hfi_send_lmconfig(gmu);
	}
	case H2F_MSG_DCVS_VOTE: {
	case H2F_MSG_GX_BW_PERF_VOTE: {
		struct hfi_dcvs_vote *req = (struct hfi_dcvs_vote *)data;

		return hfi_send_dcvs_vote(gmu, req->perf_idx, req->bw_idx,
		return hfi_send_gx_bw_perf_vote(gmu, req->perf_idx, req->bw_idx,
				req->ack_type);
	}
	case H2F_MSG_PREPARE_SLUMBER: {
+28 −28
Original line number Diff line number Diff line
@@ -123,31 +123,19 @@ enum hfi_msg_type {
	HFI_MSG_INVALID = 3
};

enum hfi_msg_id {
	H2F_MSG_INIT = 0,
	H2F_MSG_FW_VER = 1,
	H2F_MSG_LM_CFG = 2,
	H2F_MSG_BW_VOTE_TBL = 3,
	H2F_MSG_PERF_TBL = 4,
	H2F_MSG_TEST = 5,
	H2F_MSG_DCVS_VOTE = 30,
	H2F_MSG_FW_HALT = 31,
	H2F_MSG_PREPARE_SLUMBER = 33,
	F2H_MSG_ERR  = 100,
	F2H_MSG_GMU_CNTR_REGISTER = 101,
	F2H_MSG_ACK = 126,
	H2F_MSG_ACK = 127,
	H2F_MSG_REGISTER_CONTEXT = 128,
	H2F_MSG_UNREGISTER_CONTEXT = 129,
	H2F_MSG_ISSUE_IB = 130,
	H2F_MSG_REGISTER_QUEUE = 131,
	H2F_MSG_UNREGISTER_QUEUE = 132,
	H2F_MSG_CLOSE = 133,
	H2F_REGISTER_CONTEXT_DONE = 134,
	H2F_UNREG_CONTEXT_DONE = 135,
	H2F_ISSUE_IB_DONE = 136,
	H2F_REGISTER_QUEUE_DONE = 137,
};
#define H2F_MSG_INIT		0
#define H2F_MSG_FW_VER		1
#define H2F_MSG_LM_CFG		2
#define H2F_MSG_BW_VOTE_TBL	3
#define H2F_MSG_PERF_TBL	4
#define H2F_MSG_TEST		5
#define H2F_MSG_GX_BW_PERF_VOTE	30
#define H2F_MSG_FW_HALT		32
#define H2F_MSG_PREPARE_SLUMBER	33
#define F2H_MSG_ERR		100
#define F2H_MSG_DEBUG		101
#define F2H_MSG_ACK		126
#define H2F_MSG_ACK		127

#define MAX_GX_LEVELS		16
#define MAX_CX_LEVELS		4
@@ -244,13 +232,18 @@ struct hfi_dcvs_vote {
	enum rpm_ack_type ack_type;
};

struct hfi_dcvs_cmd {
struct hfi_gx_bw_perf_vote_cmd {
	uint32_t hdr;
	uint32_t ack_type;
	uint32_t freq;
	uint32_t bw;
};

struct hfi_fw_halt_cmd {
	uint32_t hdr;
	uint32_t en_halt;
};

struct hfi_prep_slumber_cmd {
	uint32_t hdr;
	uint32_t init_bw_idx;
@@ -263,6 +256,13 @@ struct hfi_fw_err_msg {
	uint32_t data[2];
};

struct hfi_debug_msg {
	uint32_t hdr;
	uint32_t type;
	uint32_t timestamp;
	uint32_t data;
};

/**
 * struct pending_msg - data structure to track outstanding HFI
 *	command messages
@@ -314,6 +314,6 @@ void hfi_receiver(unsigned long data);
void hfi_init(struct kgsl_hfi *hfi, struct gmu_memdesc *mem_addr,
		uint32_t queue_sz_bytes);

/* hfi_send_req is only for external (to HFI) requests. */
int hfi_send_req(struct gmu_device *gmu, enum hfi_msg_id id, void *data);
/* hfi_send_req is only for external (to HFI) requests */
int hfi_send_req(struct gmu_device *gmu, unsigned int id, void *data);
#endif  /* __KGSL_HFI_H */