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

Commit 5bf0584a authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: cvp: Update SESSION_INIT CVP HFI packet"

parents 4cbed705 494fd117
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -2430,8 +2430,7 @@ static int venus_hfi_session_init(void *device, void *session_id,

	__set_default_sys_properties(device);

	if (call_hfi_pkt_op(dev, session_init, &pkt,
			s, session_type, codec_type)) {
	if (call_hfi_pkt_op(dev, session_init, &pkt, s)) {
		dprintk(CVP_ERR, "session_init: failed to create packet\n");
		goto err_session_init_fail;
	}
@@ -4308,8 +4307,6 @@ static int __load_fw(struct venus_hfi_device *device)
		goto fail_venus_power_on;
	}

	/*FIXME: proceed if TZ CVP PIL works */
	return 0;
	if ((!device->res->use_non_secure_pil && !device->res->firmware_base)
			|| device->res->use_non_secure_pil) {
		if (!device->resources.fw.cookie)
@@ -4365,7 +4362,7 @@ static void __unload_fw(struct venus_hfi_device *device)
	device->resources.fw.cookie = NULL;
	__deinit_resources(device);

	dprintk(CVP_PROF, "Firmware unloaded successfully\n");
	dprintk(CVP_DBG, "Firmware unloaded successfully\n");
}

static int venus_hfi_get_fw_info(void *dev, struct hal_fw_info *fw_info)
+12 −2
Original line number Diff line number Diff line
@@ -933,12 +933,22 @@ struct hfi_cmd_sys_get_property_packet {
	u32 rg_property_data[1];
};

enum HFI_SESSION_TYPE {
	HFI_SESSION_CV = 1,
	HFI_SESSION_LRME,
	HFI_SESSION_ODT,
	HFI_SESSION_FD
};

struct hfi_cmd_sys_session_init_packet {
	u32 size;
	u32 packet_type;
	u32 session_id;
	u32 session_domain;
	u32 session_codec;
	u32 session_type;
	u32 session_kmask;
	u32 session_prio;
	u32 is_secure;
	u32 dsp_ac_mask;
};

struct hfi_cmd_sys_session_end_packet {
+6 −6
Original line number Diff line number Diff line
@@ -407,8 +407,7 @@ int cvp_create_pkt_cmd_sys_ping(struct hfi_cmd_sys_ping_packet *pkt)

inline int cvp_create_pkt_cmd_sys_session_init(
		struct hfi_cmd_sys_session_init_packet *pkt,
		struct hal_session *session,
		u32 session_domain, u32 session_codec)
		struct hal_session *session)
{
	int rc = 0;

@@ -418,10 +417,11 @@ inline int cvp_create_pkt_cmd_sys_session_init(
	pkt->size = sizeof(struct hfi_cmd_sys_session_init_packet);
	pkt->packet_type = HFI_CMD_SYS_SESSION_INIT;
	pkt->session_id = hash32_ptr(session);
	pkt->session_domain = cvp_get_hfi_domain(session_domain);
	pkt->session_codec = cvp_get_hfi_codec(session_codec);
	if (!pkt->session_codec)
		return -EINVAL;
	pkt->session_kmask = 0xFFFFFFFF;
	pkt->session_type = HFI_SESSION_CV;
	pkt->session_prio = 0;
	pkt->is_secure = 0;
	pkt->dsp_ac_mask = 0;

	return rc;
}
+1 −2
Original line number Diff line number Diff line
@@ -40,8 +40,7 @@ struct hfi_packetization_ops {
		struct hfi_cmd_sys_test_ssr_packet *pkt);
	int (*session_init)(
		struct hfi_cmd_sys_session_init_packet *pkt,
		struct hal_session *session,
		u32 session_domain, u32 session_codec);
		struct hal_session *session);
	int (*session_cmd)(struct cvp_hal_session_cmd_pkt *pkt,
		int pkt_type, struct hal_session *session);
	int (*session_set_buffers)(
+7 −1
Original line number Diff line number Diff line
@@ -205,8 +205,11 @@ int msm_cvp_comm_vote_bus(struct msm_cvp_core *core)
		dprintk(CVP_ERR, "%s Invalid args: %pK\n", __func__, core);
		return -EINVAL;
	}
	hdev = core->device;

	if (!core->resources.bus_devfreq_on)
		return 0;

	hdev = core->device;
	vote_data = kzalloc(sizeof(struct cvp_bus_vote_data) *
			MAX_SUPPORTED_INSTANCES, GFP_ATOMIC);
	if (!vote_data) {
@@ -818,6 +821,9 @@ int msm_cvp_comm_scale_clocks(struct msm_cvp_inst *inst)
		return -EINVAL;
	}

	if (!inst->core->resources.bus_devfreq_on)
		return 0;

	mutex_lock(&inst->registeredbufs.lock);
	list_for_each_entry_safe(temp, next, &inst->registeredbufs.list, list) {
		if (temp->vvb.vb2_buf.type ==
Loading