Loading Documentation/devicetree/bindings/arm/msm/lpm-levels.txt +2 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,8 @@ that share the parameters.It contains the following properties. - qcom,pm-cpu-levels: The different low power modes that a CPU could enter. The following section explains the required properties of this node. -qcom,use-prediction: This optional property is used to indicate the the LPM governor is to apply sleep prediction to this cluster. [Node bindings for qcom,pm-cpu-levels] Required properties: Loading arch/arm64/boot/dts/qcom/sdm845-pm.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ #size-cells = <0>; qcom,psci-mode-shift = <0>; qcom,psci-mode-mask = <0xf>; qcom,use-prediction; qcom,cpu = <&CPU0 &CPU1 &CPU2 &CPU3>; qcom,pm-cpu-level@0 { /* C1 */ Loading drivers/cpuidle/lpm-levels-of.c +3 −0 Original line number Diff line number Diff line Loading @@ -713,6 +713,9 @@ static int parse_cpu_levels(struct device_node *node, struct lpm_cluster *c) if (ret) goto failed_parse_params; key = "qcom,use-prediction"; cpu->lpm_prediction = of_property_read_bool(node, key); key = "parse_cpu"; ret = parse_cpu(node, cpu); if (ret) Loading drivers/cpuidle/lpm-levels.c +2 −2 Original line number Diff line number Diff line Loading @@ -439,7 +439,7 @@ static uint64_t lpm_cpuidle_predict(struct cpuidle_device *dev, uint32_t *min_residency = get_per_cpu_min_residency(dev->cpu); uint32_t *max_residency = get_per_cpu_max_residency(dev->cpu); if (!lpm_prediction) if (!lpm_prediction || !cpu->lpm_prediction) return 0; /* Loading Loading @@ -625,7 +625,7 @@ static int cpu_power_select(struct cpuidle_device *dev, struct power_params *pwr_params = &level->pwr; bool allow; allow = lpm_cpu_mode_allow(dev->cpu, i, true); allow = i ? lpm_cpu_mode_allow(dev->cpu, i, true) : true; if (!allow) continue; Loading drivers/cpuidle/lpm-levels.h +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ struct lpm_cpu { int nlevels; unsigned int psci_mode_shift; unsigned int psci_mode_mask; bool lpm_prediction; struct cpuidle_driver *drv; struct lpm_cluster *parent; }; Loading Loading
Documentation/devicetree/bindings/arm/msm/lpm-levels.txt +2 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,8 @@ that share the parameters.It contains the following properties. - qcom,pm-cpu-levels: The different low power modes that a CPU could enter. The following section explains the required properties of this node. -qcom,use-prediction: This optional property is used to indicate the the LPM governor is to apply sleep prediction to this cluster. [Node bindings for qcom,pm-cpu-levels] Required properties: Loading
arch/arm64/boot/dts/qcom/sdm845-pm.dtsi +1 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,7 @@ #size-cells = <0>; qcom,psci-mode-shift = <0>; qcom,psci-mode-mask = <0xf>; qcom,use-prediction; qcom,cpu = <&CPU0 &CPU1 &CPU2 &CPU3>; qcom,pm-cpu-level@0 { /* C1 */ Loading
drivers/cpuidle/lpm-levels-of.c +3 −0 Original line number Diff line number Diff line Loading @@ -713,6 +713,9 @@ static int parse_cpu_levels(struct device_node *node, struct lpm_cluster *c) if (ret) goto failed_parse_params; key = "qcom,use-prediction"; cpu->lpm_prediction = of_property_read_bool(node, key); key = "parse_cpu"; ret = parse_cpu(node, cpu); if (ret) Loading
drivers/cpuidle/lpm-levels.c +2 −2 Original line number Diff line number Diff line Loading @@ -439,7 +439,7 @@ static uint64_t lpm_cpuidle_predict(struct cpuidle_device *dev, uint32_t *min_residency = get_per_cpu_min_residency(dev->cpu); uint32_t *max_residency = get_per_cpu_max_residency(dev->cpu); if (!lpm_prediction) if (!lpm_prediction || !cpu->lpm_prediction) return 0; /* Loading Loading @@ -625,7 +625,7 @@ static int cpu_power_select(struct cpuidle_device *dev, struct power_params *pwr_params = &level->pwr; bool allow; allow = lpm_cpu_mode_allow(dev->cpu, i, true); allow = i ? lpm_cpu_mode_allow(dev->cpu, i, true) : true; if (!allow) continue; Loading
drivers/cpuidle/lpm-levels.h +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ struct lpm_cpu { int nlevels; unsigned int psci_mode_shift; unsigned int psci_mode_mask; bool lpm_prediction; struct cpuidle_driver *drv; struct lpm_cluster *parent; }; Loading