-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backport fix max voltage (BPI R2) #107
Conversation
In order to prevent passing zero to 'PTR_ERR' in mtk_cpu_dvfs_info_init(), we fix the return value of of_get_cci() using error pointer by explicitly casting error number. Signed-off-by: Jia-Wei Chang <[email protected]> Fixes: 0daa473 ("cpufreq: mediatek: Link CCI device to CPU") Reported-by: Dan Carpenter <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
…/clk_put Any kind of failure in mtk_cpu_dvfs_info_init() will lead to calling regulator_put() or clk_put() and the KP will occur since the regulator/clk handlers are used after released in mtk_cpu_dvfs_info_release(). To prevent the usage after regulator_put()/clk_put(), the regulator/clk handlers are addressed in a way of "Free the Last Thing Style". Signed-off-by: Jia-Wei Chang <[email protected]> Fixes: 4b9ceb7 ("cpufreq: mediatek: Enable clocks and regulators") Suggested-by: AngeloGioacchino Del Regno <[email protected]> Suggested-by: Dan Carpenter <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
Since the upper boundary of proc/sram voltage of MT8516 is 1300 mV, which is greater than the value of MT2701 1150 mV, we fix it by adding the corresponding platform data and specify proc/sram_max_volt to support MT8516. Signed-off-by: Jia-Wei Chang <[email protected]> Fixes: ead858b ("cpufreq: mediatek: Move voltage limits to platform data") Fixes: 6a17b38 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()") Reported-by: Nick Hainke <[email protected]> Reviewed-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
During the addition of SRAM voltage tracking for CCI scaling, this driver got some voltage limits set for the vtrack algorithm: these were moved to platform data first, then enforced in a later commit 6a17b38 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()") using these as max values for the regulator_set_voltage() calls. In this case, the vsram/vproc constraints for MT7622 and MT7623 were supposed to be the same as MT2701 (and a number of other SoCs), but that turned out to be a mistake because the aforementioned two SoCs' maximum voltage for both VPROC and VPROC_SRAM is 1.36V. Fix that by adding new platform data for MT7622/7623 declaring the right {proc,sram}_max_volt parameter. Fixes: ead858b ("cpufreq: mediatek: Move voltage limits to platform data") Fixes: 6a17b38 ("cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking()") Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Signed-off-by: Jia-Wei Chang <[email protected]> Signed-off-by: Viresh Kumar <[email protected]>
Hi, Thx for tracing and reporting it need to update lts branches in next time,maybe these patches already backported in higher dot release... Have you tried merging latest 6.1.x from stable git? Will merge the pr if it is still needed. |
Hello, I've checked and I as I see it's also backported on the last upstream release 6.1.x. |
i have merged stable 6.1.x into 6.1-main, so you can test with this base. if it is still not working you can rebase the PR to the new base |
I've tested and it works so it's perfect. Thanks |
Thx for testing |
Problème
On my side the kernel 6.1 crash with this following stacktrace:
It's also a known issue here: https://bugzilla.kernel.org/show_bug.cgi?id=216690
Solution
Backport the patch from the 6.3-rc kernel to the LTS kernel version to fix the issue.
I've tested on my BPI R2 and it fix the issue on my side.