Merge tag 'icc-6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc...
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Dec 2023 08:42:11 +0000 (09:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Dec 2023 08:42:11 +0000 (09:42 +0100)
Georgi writes:

interconnect fixes for v6.7-rc

This contains fixes for reported issues. One fix is in framework code to
explicitly treat returned NULL nodes as error when the device-tree data
is translated into endpoint nodes.
The other two fixes are in driver code. One is expected to improve the
power consumption on the sm8250 platforms and the other one is fixing a
bandwidth calculation formula that was introduced during this cycle.

- interconnect: Treat xlate() returning NULL node as an error
- interconnect: qcom: sm8250: Enable sync_state
- interconnect: qcom: icc-rpm: Fix peak rate calculation

Signed-off-by: Georgi Djakov <djakov@kernel.org>
* tag 'icc-6.7-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  interconnect: qcom: icc-rpm: Fix peak rate calculation
  interconnect: qcom: sm8250: Enable sync_state
  interconnect: Treat xlate() returning NULL node as an error

drivers/interconnect/core.c
drivers/interconnect/qcom/icc-rpm.c
drivers/interconnect/qcom/sm8250.c

index dfab160..50bac2d 100644 (file)
@@ -395,6 +395,9 @@ struct icc_node_data *of_icc_get_from_provider(struct of_phandle_args *spec)
        }
        mutex_unlock(&icc_lock);
 
+       if (!node)
+               return ERR_PTR(-EINVAL);
+
        if (IS_ERR(node))
                return ERR_CAST(node);
 
index 628e651..dbacb2a 100644 (file)
@@ -307,7 +307,7 @@ static u64 qcom_icc_calc_rate(struct qcom_icc_provider *qp, struct qcom_icc_node
 
        if (qn->ib_coeff) {
                agg_peak_rate = qn->max_peak[ctx] * 100;
-               agg_peak_rate = div_u64(qn->max_peak[ctx], qn->ib_coeff);
+               agg_peak_rate = div_u64(agg_peak_rate, qn->ib_coeff);
        } else {
                agg_peak_rate = qn->max_peak[ctx];
        }
index 83aeb3e..02d40ee 100644 (file)
@@ -1995,6 +1995,7 @@ static struct platform_driver qnoc_driver = {
        .driver = {
                .name = "qnoc-sm8250",
                .of_match_table = qnoc_of_match,
+               .sync_state = icc_sync_state,
        },
 };
 module_platform_driver(qnoc_driver);