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

Commit d7a27d8c authored by Jeyaprakash Soundrapandian's avatar Jeyaprakash Soundrapandian Committed by Gerrit - the friendly Code Review server
Browse files

Merge changes Ic5cf65b9,I852ac506 into dev/msm-4.9-camx

* changes:
  msm: camera: icp: axi bandwidth fixes
  msm: camera: icp: Return CAM_MAX_VOTE if matching index not found
parents 3f0a2bc5 6c7bb893
Loading
Loading
Loading
Loading
+15 −8
Original line number Diff line number Diff line
/* Copyright (c) 2018, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -116,7 +116,12 @@ static int cam_icp_get_actual_clk_rate_idx(
		if (ctx_data->clk_info.clk_rate[i] >= base_clk)
			return i;

	return 0;
	/*
	 * Caller has to ensure returned index is within array
	 * size bounds while accessing that index.
	 */

	return i;
}

static bool cam_icp_is_over_clk(struct cam_icp_hw_mgr *hw_mgr,
@@ -132,7 +137,7 @@ static bool cam_icp_is_over_clk(struct cam_icp_hw_mgr *hw_mgr,
	curr_clk_idx = cam_icp_get_actual_clk_rate_idx(ctx_data,
		hw_mgr_clk_info->curr_clk);

	CAM_DBG(CAM_ICP, "bc_idx = %d cc_idx = %d %lld %lld",
	CAM_DBG(CAM_ICP, "bc_idx = %d cc_idx = %d %d %d",
		base_clk_idx, curr_clk_idx, hw_mgr_clk_info->base_clk,
		hw_mgr_clk_info->curr_clk);

@@ -1020,11 +1025,13 @@ static int cam_icp_update_cpas_vote(struct cam_icp_hw_mgr *hw_mgr,
	dev_intf->hw_ops.process_cmd(dev_intf->hw_priv, id,
		&clk_update, sizeof(clk_update));

	if (ctx_data->icp_dev_acquire_info->dev_type != CAM_ICP_RES_TYPE_BPS)
		if (ipe1_dev_intf)
			ipe1_dev_intf->hw_ops.process_cmd(
				ipe1_dev_intf->hw_priv, id,
				&clk_update, sizeof(clk_update));
	/*
	 * Consolidated bw needs to be voted on only one IPE client. Otherwise
	 * total bw that we vote at bus client would be doubled. So either
	 * remove voting on IPE1 or divide the vote for each IPE client
	 * and vote to cpas - cpas will add up and vote full bw to sf client
	 * anyway.
	 */

	return 0;
}
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
/* Copyright (c) 2017-2018, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -21,7 +21,7 @@
#define ICP_CLK_TURBO_HZ         600000000
#define ICP_CLK_SVS_HZ           400000000

#define CAM_ICP_A5_BW_BYTES_VOTE 100000000
#define CAM_ICP_A5_BW_BYTES_VOTE 40000000

#define CAM_ICP_CTX_MAX          36