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

Commit 918b0205 authored by Karthik Anantha Ram's avatar Karthik Anantha Ram
Browse files

msm: camera: Add flag to dynamically update axi ib bw



While updating the axi vote check if that port supports
dynamic ib bw update.

Change-Id: I02f2695d90dbb25502f359ab09013fe7b9f0ced2
Signed-off-by: default avatarKarthik Anantha Ram <kartanan@codeaurora.org>
parent b048651c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -187,6 +187,11 @@ Third Level Node - CAM AXI Port properties
  Value type: <string>
  Definition: Name of the AXI Port.

- ib-bw-voting-needed
  Usage: optional
  Value type: <bool>
  Definition: Determines if this port votes for ib bw dynamically.

===================================================================
Fourth Level Node - CAM AXI Bus properties
===================================================================
+13 −3
Original line number Diff line number Diff line
@@ -313,6 +313,9 @@ static int cam_cpas_util_axi_setup(struct cam_cpas *cpas_core,
			goto mnoc_node_get_fail;
		}
		axi_port->axi_port_mnoc_node = axi_port_mnoc_node;
		axi_port->ib_bw_voting_needed =
			of_property_read_bool(axi_port_node,
				"ib-bw-voting-needed");

		rc = cam_cpas_util_register_bus_client(soc_info,
			axi_port_mnoc_node, &axi_port->mnoc_bus);
@@ -662,12 +665,19 @@ static int cam_cpas_util_apply_client_axi_vote(
		axi_port->camnoc_bus.src, axi_port->camnoc_bus.dst,
		camnoc_bw, mnoc_bw);

	if (axi_port->ib_bw_voting_needed)
		rc = cam_cpas_util_vote_bus_client_bw(&axi_port->mnoc_bus,
			mnoc_bw, mnoc_bw, false);
	else
		rc = cam_cpas_util_vote_bus_client_bw(&axi_port->mnoc_bus,
			mnoc_bw, 0, false);

	if (rc) {
		CAM_ERR(CAM_CPAS,
			"Failed in mnoc vote ab[%llu] ib[%llu] rc=%d",
			mnoc_bw, mnoc_bw, rc);
			mnoc_bw,
			(axi_port->ib_bw_voting_needed ? mnoc_bw : 0),
			rc);
		goto unlock_axi_port;
	}

+2 −0
Original line number Diff line number Diff line
@@ -149,6 +149,7 @@ struct cam_cpas_bus_client {
 * @camnoc_bus: CAMNOC bus client info for this port
 * @mnoc_bus: MNOC bus client info for this port
 * @axi_port_name: Name of this AXI port
 * @ib_bw_voting_needed: if this port can update ib bw dynamically
 * @axi_port_node: Node representing this AXI Port
 * @axi_port_mnoc_node: Node representing mnoc in this AXI Port
 * @axi_port_camnoc_node: Node representing camnoc in this AXI Port
@@ -161,6 +162,7 @@ struct cam_cpas_axi_port {
	struct cam_cpas_bus_client camnoc_bus;
	struct cam_cpas_bus_client mnoc_bus;
	const char *axi_port_name;
	bool ib_bw_voting_needed;
	struct device_node *axi_port_node;
	struct device_node *axi_port_mnoc_node;
	struct device_node *axi_port_camnoc_node;