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

Commit c5112061 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: ipa: add support to query and use smem restricted bytes"

parents be50e39a 201120b2
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include <linux/delay.h>
#include <linux/uaccess.h>
#include <soc/qcom/subsystem_restart.h>
#include <linux/ipa.h>

#include "ipa_qmi_service.h"
#include "ipa_ram_mmap.h"
@@ -338,6 +339,7 @@ static int qmi_init_modem_send_sync_msg(void)
	struct ipa_init_modem_driver_resp_msg_v01 resp;
	struct msg_desc req_desc, resp_desc;
	int rc;
	u16 smem_restr_bytes = ipa_get_smem_restr_bytes();

	memset(&req, 0, sizeof(struct ipa_init_modem_driver_req_msg_v01));
	memset(&resp, 0, sizeof(struct ipa_init_modem_driver_resp_msg_v01));
@@ -345,23 +347,26 @@ static int qmi_init_modem_send_sync_msg(void)
	req.platform_type = ipa_wan_platform;
	req.hdr_tbl_info_valid = true;
	req.hdr_tbl_info.modem_offset_start =
		IPA_MEM_PART(modem_hdr_ofst) + 256;
		IPA_MEM_PART(modem_hdr_ofst) + smem_restr_bytes;
	req.hdr_tbl_info.modem_offset_end = IPA_MEM_PART(modem_hdr_ofst) +
		256 + IPA_MEM_PART(modem_hdr_size) - 1;
		smem_restr_bytes + IPA_MEM_PART(modem_hdr_size) - 1;
	req.v4_route_tbl_info_valid = true;
	req.v4_route_tbl_info.route_tbl_start_addr = IPA_MEM_PART(v4_rt_ofst) +
		256;
		smem_restr_bytes;
	req.v4_route_tbl_info.num_indices = IPA_MEM_PART(v4_modem_rt_index_hi);
	req.v6_route_tbl_info_valid = true;
	req.v6_route_tbl_info.route_tbl_start_addr = IPA_MEM_PART(v6_rt_ofst) +
		256;
		smem_restr_bytes;
	req.v6_route_tbl_info.num_indices = IPA_MEM_PART(v6_modem_rt_index_hi);
	req.v4_filter_tbl_start_addr_valid = true;
	req.v4_filter_tbl_start_addr = IPA_MEM_PART(v4_flt_ofst) + 256;
	req.v4_filter_tbl_start_addr =
		IPA_MEM_PART(v4_flt_ofst) + smem_restr_bytes;
	req.v6_filter_tbl_start_addr_valid = true;
	req.v6_filter_tbl_start_addr = IPA_MEM_PART(v6_flt_ofst) + 256;
	req.v6_filter_tbl_start_addr =
		IPA_MEM_PART(v6_flt_ofst) + smem_restr_bytes;
	req.modem_mem_info_valid = true;
	req.modem_mem_info.block_start_addr = IPA_MEM_PART(modem_ofst) + 256;
	req.modem_mem_info.block_start_addr =
		IPA_MEM_PART(modem_ofst) + smem_restr_bytes;
	req.modem_mem_info.size = IPA_MEM_PART(modem_size);
	req.ctrl_comm_dest_end_pt_valid = true;
	req.ctrl_comm_dest_end_pt =
+11 −0
Original line number Diff line number Diff line
@@ -4612,3 +4612,14 @@ enum ipa_hw_type ipa_get_hw_type(void)
		return IPA_HW_None;
}
EXPORT_SYMBOL(ipa_get_hw_type);

u16 ipa_get_smem_restr_bytes(void)
{
	if (ipa_ctx) {
		return ipa_ctx->smem_restricted_bytes;
	} else {
		IPAERR("IPA Driver not initialized\n");
		return 0;
	}
}
EXPORT_SYMBOL(ipa_get_smem_restr_bytes);
+6 −0
Original line number Diff line number Diff line
@@ -1094,6 +1094,7 @@ int ipa_disable_wdi_pipe(u32 clnt_hdl);
int ipa_resume_wdi_pipe(u32 clnt_hdl);
int ipa_suspend_wdi_pipe(u32 clnt_hdl);
int ipa_get_wdi_stats(struct IpaHwStatsWDIInfoData_t *stats);
u16 ipa_get_smem_restr_bytes(void);

/*
 * Resource manager
@@ -1530,6 +1531,11 @@ static inline void ipa_free_skb(struct ipa_rx_data *rx_in)
/*
 * System pipes
 */
static inline u16 ipa_get_smem_restr_bytes(void)
{
	return -EPERM;
}

static inline int ipa_setup_sys_pipe(struct ipa_sys_connect_params *sys_in,
		u32 *clnt_hdl)
{