Merge "msm: camera: cpas: Update camera AXI ab, ib bw voting" into dev/msm-4.9-camx
diff --git a/drivers/media/platform/msm/camera/cam_cpas/cam_cpas_hw.c b/drivers/media/platform/msm/camera/cam_cpas/cam_cpas_hw.c
index 9063049..fc84d9d 100644
--- a/drivers/media/platform/msm/camera/cam_cpas/cam_cpas_hw.c
+++ b/drivers/media/platform/msm/camera/cam_cpas/cam_cpas_hw.c
@@ -21,6 +21,8 @@
#include "cam_cpas_hw_intf.h"
#include "cam_cpas_soc.h"
+#define CAM_CPAS_AXI_MIN_BW (2048 * 1024)
+
int cam_cpas_util_reg_update(struct cam_hw_info *cpas_hw,
enum cam_cpas_reg_base reg_base, struct cam_cpas_reg *reg_info)
{
@@ -116,6 +118,12 @@
bus_client->curr_vote_level = idx;
mutex_unlock(&bus_client->lock);
+ if ((ab > 0) && (ab < CAM_CPAS_AXI_MIN_BW))
+ ab = CAM_CPAS_AXI_MIN_BW;
+
+ if ((ib > 0) && (ib < CAM_CPAS_AXI_MIN_BW))
+ ib = CAM_CPAS_AXI_MIN_BW;
+
pdata = bus_client->pdata;
path = &(pdata->usecase[idx]);
path->vectors[0].ab = ab;
@@ -362,7 +370,7 @@
list_for_each_entry_safe(curr_port, temp_port,
&cpas_core->axi_ports_list_head, sibling_port) {
rc = cam_cpas_util_vote_bus_client_bw(&curr_port->mnoc_bus,
- mnoc_bw, 0);
+ mnoc_bw, mnoc_bw);
if (rc) {
CAM_ERR(CAM_CPAS,
"Failed in mnoc vote, enable=%d, rc=%d",
@@ -372,7 +380,7 @@
if (soc_private->axi_camnoc_based) {
cam_cpas_util_vote_bus_client_bw(
- &curr_port->camnoc_bus, camnoc_bw, 0);
+ &curr_port->camnoc_bus, 0, camnoc_bw);
if (rc) {
CAM_ERR(CAM_CPAS,
"Failed in mnoc vote, enable=%d, %d",
@@ -563,7 +571,7 @@
camnoc_bw, mnoc_bw);
rc = cam_cpas_util_vote_bus_client_bw(&axi_port->mnoc_bus,
- mnoc_bw, 0);
+ mnoc_bw, mnoc_bw);
if (rc) {
CAM_ERR(CAM_CPAS,
"Failed in mnoc vote ab[%llu] ib[%llu] rc=%d",
@@ -573,11 +581,11 @@
if (soc_private->axi_camnoc_based) {
rc = cam_cpas_util_vote_bus_client_bw(&axi_port->camnoc_bus,
- camnoc_bw, 0);
+ 0, camnoc_bw);
if (rc) {
CAM_ERR(CAM_CPAS,
"Failed camnoc vote ab[%llu] ib[%llu] rc=%d",
- camnoc_bw, camnoc_bw, rc);
+ 0, camnoc_bw, rc);
goto unlock_axi_port;
}
}