Browse Source

msm: camera: cpas: Update camnoc axi port vote during cpas start/stop

For some cpas clients like csiphy, cci voting is applied and
removed during their respective start and stop flow. Such
clients do no call for vote update explicitly.
For such cases, camnoc axi ports were not updated. This can
result in camnoc_sf vote to be present.
This commit updates the camnoc ports as well for the clients
for who the voting is applied and removed during the start and
stop only.

CRs-Fixed: 2571273
Change-Id: I2997e5abad904532dc0d582edbf6d6078ac732d7
Signed-off-by: Gaurav Jindal <[email protected]>
Gaurav Jindal 5 years ago
parent
commit
4f1388a7b0
1 changed files with 14 additions and 0 deletions
  1. 14 0
      drivers/cam_cpas/cam_cpas_hw.c

+ 14 - 0
drivers/cam_cpas/cam_cpas_hw.c

@@ -708,6 +708,20 @@ static int cam_cpas_util_apply_client_axi_vote(
 			}
 			mnoc_axi_port_updated[i] = true;
 		}
+
+		for (i = 0; i < cpas_core->num_camnoc_axi_ports; i++) {
+			if (axi_vote->axi_path[0].camnoc_bw) {
+				/* start case */
+				cpas_core->camnoc_axi_port[i].additional_bw +=
+					CAM_CPAS_DEFAULT_AXI_BW;
+			} else {
+				/* stop case */
+				cpas_core->camnoc_axi_port[i].additional_bw -=
+					CAM_CPAS_DEFAULT_AXI_BW;
+			}
+			camnoc_axi_port_updated[i] = true;
+		}
+
 		goto vote_start_clients;
 	}