Browse Source

disp: rotator: set ib, ab bandwidth votes in KBps for interconnect

icc_set_bw api requires ib, ab votes to be in KBps.
The votes received from the userspace will be in the order
of Bps. This change makes the conversion from Bytes to
KiloBytes before applying vote on interconnect path.

Change-Id: I1c02e91be91bda7dcbfe058f3681034a12aedbc5
Signed-off-by: Mahadevan <[email protected]>
Mahadevan 4 years ago
parent
commit
6987497452
1 changed files with 4 additions and 2 deletions
  1. 4 2
      rotator/sde_rotator_core.c

+ 4 - 2
rotator/sde_rotator_core.c

@@ -95,7 +95,8 @@ static int sde_rotator_bus_scale_set_quota(struct sde_rot_bus_data_type *bus,
 
 
 	for (i = 0; i < bus->data_paths_cnt; i++) {
 	for (i = 0; i < bus->data_paths_cnt; i++) {
 		if (bus->data_bus_hdl[i]) {
 		if (bus->data_bus_hdl[i]) {
-			ret = icc_set_bw(bus->data_bus_hdl[i], ab, ab);
+			ret = icc_set_bw(bus->data_bus_hdl[i], Bps_to_icc(ab),
+				Bps_to_icc(ab));
 			if (ret)
 			if (ret)
 				goto err;
 				goto err;
 		}
 		}
@@ -108,7 +109,8 @@ static int sde_rotator_bus_scale_set_quota(struct sde_rot_bus_data_type *bus,
 err:
 err:
 	ab = div_u64(bus->curr_quota_val, bus->data_paths_cnt);
 	ab = div_u64(bus->curr_quota_val, bus->data_paths_cnt);
 	for (j = 0; j < i; j++)
 	for (j = 0; j < i; j++)
-		icc_set_bw(bus->data_bus_hdl[j], ab, ab);
+		icc_set_bw(bus->data_bus_hdl[j], Bps_to_icc(ab),
+			Bps_to_icc(ab));
 	ATRACE_END("msm_bus_scale_req_rot");
 	ATRACE_END("msm_bus_scale_req_rot");
 	pr_err("failed to set data bus quota %llu\n", quota);
 	pr_err("failed to set data bus quota %llu\n", quota);