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

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

msm: camera: Add new bw voting logic for cpas and its clients



Adding new logic for bandwidth voting in client drivers by
classifying and comparing bw vote updates. Also, adding logic
to update bw vote and camnoc axi clock frequency as per camnoc
hw block by representing bus paths inside camnoc hw as tree
graph in DT. Overall voting includes traversing through the
tree and calculating consolidated votes to finally determine
appropriate camnoc axi clock frequency and mnoc bw vote.

Change-Id: Iea07973ca6d38cce4190d601eca7909e601b6924
Signed-off-by: default avatarMukund Madhusudan Atre <matre@codeaurora.org>
parent 4c13fa38
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -271,12 +271,21 @@ int cam_cdm_stream_ops_internal(void *hw_priv,
	if (operation == true) {
		if (!cdm_hw->open_count) {
			struct cam_ahb_vote ahb_vote;
			struct cam_axi_vote axi_vote;
			struct cam_axi_vote axi_vote = {0};

			ahb_vote.type = CAM_VOTE_ABSOLUTE;
			ahb_vote.vote.level = CAM_SVS_VOTE;
			axi_vote.compressed_bw = CAM_CPAS_DEFAULT_AXI_BW;
			axi_vote.uncompressed_bw = CAM_CPAS_DEFAULT_AXI_BW;
			axi_vote.num_paths = 1;
			axi_vote.axi_path[0].path_data_type =
				CAM_AXI_PATH_DATA_ALL;
			axi_vote.axi_path[0].transac_type =
				CAM_AXI_TRANSACTION_READ;
			axi_vote.axi_path[0].camnoc_bw =
				CAM_CPAS_DEFAULT_AXI_BW;
			axi_vote.axi_path[0].mnoc_ab_bw =
				CAM_CPAS_DEFAULT_AXI_BW;
			axi_vote.axi_path[0].mnoc_ib_bw =
				CAM_CPAS_DEFAULT_AXI_BW;

			rc = cam_cpas_start(core->cpas_handle,
				&ahb_vote, &axi_vote);
+8 −3
Original line number Diff line number Diff line
@@ -826,7 +826,7 @@ int cam_hw_cdm_probe(struct platform_device *pdev)
	struct cam_cdm_private_dt_data *soc_private = NULL;
	struct cam_cpas_register_params cpas_parms;
	struct cam_ahb_vote ahb_vote;
	struct cam_axi_vote axi_vote;
	struct cam_axi_vote axi_vote = {0};

	cdm_hw_intf = kzalloc(sizeof(struct cam_hw_intf), GFP_KERNEL);
	if (!cdm_hw_intf)
@@ -932,8 +932,13 @@ int cam_hw_cdm_probe(struct platform_device *pdev)

	ahb_vote.type = CAM_VOTE_ABSOLUTE;
	ahb_vote.vote.level = CAM_SVS_VOTE;
	axi_vote.compressed_bw = CAM_CPAS_DEFAULT_AXI_BW;
	axi_vote.uncompressed_bw = CAM_CPAS_DEFAULT_AXI_BW;
	axi_vote.num_paths = 1;
	axi_vote.axi_path[0].path_data_type = CAM_AXI_PATH_DATA_ALL;
	axi_vote.axi_path[0].transac_type = CAM_AXI_TRANSACTION_READ;
	axi_vote.axi_path[0].camnoc_bw = CAM_CPAS_DEFAULT_AXI_BW;
	axi_vote.axi_path[0].mnoc_ab_bw = CAM_CPAS_DEFAULT_AXI_BW;
	axi_vote.axi_path[0].mnoc_ib_bw = CAM_CPAS_DEFAULT_AXI_BW;

	rc = cam_cpas_start(cdm_core->cpas_handle, &ahb_vote, &axi_vote);
	if (rc) {
		CAM_ERR(CAM_CDM, "CPAS start failed");
Loading