int msm_isp_update_bandwidth(enum msm_isp_hw_client client, uint64_t ab, uint64_t ib) { int i; struct msm_bus_paths *path; mutex_lock(&bandwidth_mgr_mutex); if (!isp_bandwidth_mgr.use_count || !isp_bandwidth_mgr.bus_client) { pr_err("%s: bandwidth manager inactive\n", __func__); return -EINVAL; } isp_bandwidth_mgr.client_info[client].ab = ab; isp_bandwidth_mgr.client_info[client].ib = ib; ALT_VECTOR_IDX(isp_bandwidth_mgr.bus_vector_active_idx); path = &(msm_isp_bus_client_pdata.usecase[ isp_bandwidth_mgr.bus_vector_active_idx]); path->vectors[0].ab = MSM_ISP_MIN_AB; path->vectors[0].ib = MSM_ISP_MIN_IB; for (i = 0; i < MAX_ISP_CLIENT; i++) { if (isp_bandwidth_mgr.client_info[i].active) { path->vectors[0].ab += isp_bandwidth_mgr.client_info[i].ab; path->vectors[0].ib += isp_bandwidth_mgr.client_info[i].ib; } } msm_bus_scale_client_update_request(isp_bandwidth_mgr.bus_client, isp_bandwidth_mgr.bus_vector_active_idx); mutex_unlock(&bandwidth_mgr_mutex); return 0; }
int msm_isp_update_bandwidth(enum msm_isp_hw_client client, uint64_t ab, uint64_t ib) { int i; struct msm_bus_paths *path; mutex_lock(&bandwidth_mgr_mutex); if (!isp_bandwidth_mgr.use_count || !isp_bandwidth_mgr.bus_client) { /*QCT_PATCH S, fix lockup when start camera with 13M resolution, 2013-10-31, [email protected] */ pr_err("%s:error bandwidth manager inactive use_cnt:%d bus_clnt:%d\n", __func__, isp_bandwidth_mgr.use_count, isp_bandwidth_mgr.bus_client); /*QCT_PATCH E, fix lockup when start camera with 13M resolution, 2013-10-31, [email protected] */ return -EINVAL; } isp_bandwidth_mgr.client_info[client].ab = ab; isp_bandwidth_mgr.client_info[client].ib = ib; ALT_VECTOR_IDX(isp_bandwidth_mgr.bus_vector_active_idx); path = &(msm_isp_bus_client_pdata.usecase[ isp_bandwidth_mgr.bus_vector_active_idx]); path->vectors[0].ab = MSM_ISP_MIN_AB; path->vectors[0].ib = MSM_ISP_MIN_IB; for (i = 0; i < MAX_ISP_CLIENT; i++) { if (isp_bandwidth_mgr.client_info[i].active) { path->vectors[0].ab += isp_bandwidth_mgr.client_info[i].ab; path->vectors[0].ib += isp_bandwidth_mgr.client_info[i].ib; } } msm_bus_scale_client_update_request(isp_bandwidth_mgr.bus_client, isp_bandwidth_mgr.bus_vector_active_idx); mutex_unlock(&bandwidth_mgr_mutex); return 0; }