From 568d2b1529c1093b6c2708a67a58a1ee7b4c6aef Mon Sep 17 00:00:00 2001 From: Steve Cohen Date: Sun, 5 Apr 2020 21:32:02 -0400 Subject: [PATCH] disp: msm: fix data bus bandwidth vote units Bandwidth vote values were being applied as Bytes-per-second but the interconnect framework uses Kilobytes-per-second units. Fix the error by using unit conversion macros provided by the interconnect interface. Change-Id: I8bdce2d35afb8d97f200ce40fc1defa8a3be1b75 Signed-off-by: Steve Cohen --- msm/sde_power_handle.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/msm/sde_power_handle.c b/msm/sde_power_handle.c index 68fd20d749..2d67fe4fb3 100644 --- a/msm/sde_power_handle.c +++ b/msm/sde_power_handle.c @@ -303,8 +303,9 @@ static int _sde_power_data_bus_set_quota( SDE_ATRACE_BEGIN("msm_bus_scale_req"); for (i = 0; i < paths; i++) { if (pdbus->data_bus_hdl[i]) { - rc = icc_set_bw(pdbus->data_bus_hdl[i], in_ab_quota, - in_ib_quota); + rc = icc_set_bw(pdbus->data_bus_hdl[i], + Bps_to_icc(in_ab_quota), + Bps_to_icc(in_ib_quota)); if (rc) goto err; } @@ -320,8 +321,8 @@ err: for (; i >= 0; --i) if (pdbus->data_bus_hdl[i]) icc_set_bw(pdbus->data_bus_hdl[i], - pdbus->curr_val.ab, - pdbus->curr_val.ib); + Bps_to_icc(pdbus->curr_val.ab), + Bps_to_icc(pdbus->curr_val.ib)); SDE_ATRACE_END("msm_bus_scale_req"); pr_err("failed to set data bus vote ab=%llu ib=%llu rc=%d\n",