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

Commit 0615d61c authored by Mukund Madhusudan Atre's avatar Mukund Madhusudan Atre Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Add LCR in axi bw vote and checks for memory free



Adding LCR resource id in isp bw voting for axi bw voting v1 path
and v2 path. Also, adding checks for unwanted memory free during
cpas probe.

Change-Id: Ib3dca34727b640326893fb227b160a42dab457fc
Signed-off-by: default avatarMukund Madhusudan Atre <matre@codeaurora.org>
parent 801a63a2
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -102,12 +102,17 @@ int cam_cpas_node_tree_cleanup(struct cam_cpas *cpas_core,
	}

	for (i = 0; i < CAM_CPAS_MAX_TREE_LEVELS; i++) {
		if (soc_private->level_node[i]) {
			of_node_put(soc_private->level_node[i]);
			soc_private->level_node[i] = NULL;
		}
	}

	if (soc_private->camera_bus_node) {
		of_node_put(soc_private->camera_bus_node);
		soc_private->camera_bus_node = NULL;
	}

	mutex_destroy(&cpas_core->tree_lock);

	return 0;
+8 −28
Original line number Diff line number Diff line
@@ -2715,7 +2715,8 @@ static int cam_isp_classify_vote_info(

	if ((hw_mgr_res->res_id == CAM_ISP_HW_VFE_IN_CAMIF)
		|| (hw_mgr_res->res_id == CAM_ISP_HW_VFE_IN_RD) ||
		(hw_mgr_res->res_id == CAM_ISP_HW_VFE_IN_PDLIB)) {
		(hw_mgr_res->res_id == CAM_ISP_HW_VFE_IN_PDLIB) ||
		(hw_mgr_res->res_id == CAM_ISP_HW_VFE_IN_LCR)) {
		if (split_idx == CAM_ISP_HW_SPLIT_LEFT) {
			if (*camif_l_bw_updated)
				return rc;
@@ -2890,8 +2891,11 @@ static int cam_isp_blob_bw_update(
			if (!hw_mgr_res->hw_res[i])
				continue;

			if ((hw_mgr_res->res_id == CAM_ISP_HW_VFE_IN_CAMIF)
			|| (hw_mgr_res->res_id == CAM_ISP_HW_VFE_IN_RD))
			if ((hw_mgr_res->res_id == CAM_ISP_HW_VFE_IN_CAMIF) ||
				(hw_mgr_res->res_id == CAM_ISP_HW_VFE_IN_RD) ||
				(hw_mgr_res->res_id == CAM_ISP_HW_VFE_IN_PDLIB)
				|| (hw_mgr_res->res_id ==
				CAM_ISP_HW_VFE_IN_LCR))
				if (i == CAM_ISP_HW_SPLIT_LEFT) {
					if (camif_l_bw_updated)
						continue;
@@ -2925,32 +2929,8 @@ static int cam_isp_blob_bw_update(
					bw_config->rdi_vote[idx].cam_bw_bps;
				ext_bw_bps =
					bw_config->rdi_vote[idx].ext_bw_bps;
			} else if (hw_mgr_res->res_id ==
				CAM_ISP_HW_VFE_IN_PDLIB) {
				if (i == CAM_ISP_HW_SPLIT_LEFT) {
					if (camif_l_bw_updated)
						continue;

					cam_bw_bps =
					bw_config->left_pix_vote.cam_bw_bps;
					ext_bw_bps =
					bw_config->left_pix_vote.ext_bw_bps;

					camif_l_bw_updated = true;
			} else {
					if (camif_r_bw_updated)
						continue;

					cam_bw_bps =
					bw_config->right_pix_vote.cam_bw_bps;
					ext_bw_bps =
					bw_config->right_pix_vote.ext_bw_bps;

					camif_r_bw_updated = true;
				}
			} else {
				if (hw_mgr_res->res_id != CAM_ISP_HW_VFE_IN_LCR
					&& hw_mgr_res->hw_res[i]) {
				if (hw_mgr_res->hw_res[i]) {
					CAM_ERR(CAM_ISP, "Invalid res_id %u",
						hw_mgr_res->res_id);
					rc = -EINVAL;