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

Commit 5545de75 authored by Camera Software Integration's avatar Camera Software Integration Committed by Gerrit - the friendly Code Review server
Browse files

Merge " msm: camera: cpas: Correct error handling in cpas start" into camera-kernel.lnx.3.1

parents 588b9cbc e20615fe
Loading
Loading
Loading
Loading
+14 −10
Original line number Diff line number Diff line
@@ -1224,7 +1224,7 @@ static int cam_cpas_hw_start(void *hw_priv, void *start_args,
	struct cam_ahb_vote remove_ahb;
	struct cam_axi_vote axi_vote = {0};
	enum cam_vote_level applied_level = CAM_SVS_VOTE;
	int rc, i = 0;
	int rc, rc_eh, i = 0;
	struct cam_cpas_private_soc *soc_private = NULL;
	bool invalid_start = true;

@@ -1346,6 +1346,9 @@ static int cam_cpas_hw_start(void *hw_priv, void *start_args,
				kgsl_pwr_limits_del(
					soc_private->gpu_pwr_limit);
				soc_private->gpu_pwr_limit = NULL;
				CAM_ERR(CAM_CPAS,
					"set cx_ipeak_gpu_limit failed, rc %d",
					rc);
				goto remove_axi_vote;
			}
		}
@@ -1395,25 +1398,26 @@ static int cam_cpas_hw_start(void *hw_priv, void *start_args,

remove_axi_vote:
	memset(&axi_vote, 0x0, sizeof(struct cam_axi_vote));
	rc = cam_cpas_util_create_vote_all_paths(cpas_client, &axi_vote);
	if (rc)
		CAM_ERR(CAM_CPAS, "Unable to create per path votes rc: %d", rc);
	rc_eh = cam_cpas_util_create_vote_all_paths(cpas_client, &axi_vote);
	if (rc_eh)
		CAM_ERR(CAM_CPAS,
			"Unable to create per path votes rc_eh: %d", rc_eh);

	cam_cpas_dump_axi_vote_info(cpas_client, "CPAS Start fail Vote",
		&axi_vote);

	rc = cam_cpas_util_apply_client_axi_vote(cpas_hw,
	rc_eh = cam_cpas_util_apply_client_axi_vote(cpas_hw,
		cpas_client, &axi_vote);
	if (rc)
		CAM_ERR(CAM_CPAS, "Unable remove votes rc: %d", rc);
	if (rc_eh)
		CAM_ERR(CAM_CPAS, "Unable remove votes rc_eh: %d", rc_eh);

remove_ahb_vote:
	remove_ahb.type = CAM_VOTE_ABSOLUTE;
	remove_ahb.vote.level = CAM_SUSPEND_VOTE;
	rc = cam_cpas_util_apply_client_ahb_vote(cpas_hw, cpas_client,
	rc_eh = cam_cpas_util_apply_client_ahb_vote(cpas_hw, cpas_client,
		&remove_ahb, NULL);
	if (rc)
		CAM_ERR(CAM_CPAS, "Removing AHB vote failed, rc=%d", rc);
	if (rc_eh)
		CAM_ERR(CAM_CPAS, "Removing AHB vote failed, rc_eh=%d", rc_eh);

error:
	mutex_unlock(&cpas_core->client_mutex[client_indx]);
+4 −0
Original line number Diff line number Diff line
@@ -210,6 +210,10 @@ int cam_ope_probe(struct platform_device *pdev)

	rc = cam_cpas_start(core_info->cpas_handle,
		&cpas_vote.ahb_vote, &cpas_vote.axi_vote);
	if (rc) {
		CAM_ERR(CAM_OPE, "cam_cpas_start failed, rc=%d", rc);
		goto init_hw_failure;
	}

	rc = cam_ope_init_hw_version(&ope_dev->soc_info, ope_dev->core_info);
	if (rc)