From 4f1388a7b0f41a4e3b87a2e9e6702cf4f44b951f Mon Sep 17 00:00:00 2001 From: Gaurav Jindal Date: Mon, 16 Mar 2020 21:24:05 +0530 Subject: [PATCH] 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 --- drivers/cam_cpas/cam_cpas_hw.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/cam_cpas/cam_cpas_hw.c b/drivers/cam_cpas/cam_cpas_hw.c index 23c045bd1044..8fd153169d89 100644 --- a/drivers/cam_cpas/cam_cpas_hw.c +++ b/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; }