Skip to content

Commit

Permalink
MALI: bifrost: Not to call kbase_ipa_reset_data() if rockchip simple-…
Browse files Browse the repository at this point in the history
…power-model is used

When rockchip simple-power-model is used,
kbase_ipa_reset_data() for the default mali power models should not be called.

The issue is exposed by the following exception logs:
[    3.406039] ------------[ cut here ]------------
[    3.406056] DEBUG_LOCKS_WARN_ON(lock->magic != lock)
[    3.406081] WARNING: CPU: 1 PID: 154 at kernel/locking/mutex.c:955 __mutex_lock_common+0x974/0xbc0
[    3.406094] Modules linked in:
[    3.406111] CPU: 1 PID: 154 Comm: kworker/u16:3 Not tainted 5.10.157 armbian#110
[    3.406118] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[    3.406132] Workqueue: devfreq_wq devfreq_monitor
[    3.406144] pstate: 60c00009 (nZCv daif +PAN +UAO -TCO BTYPE=--)
[    3.406152] pc : __mutex_lock_common+0x974/0xbc0
[    3.406161] lr : __mutex_lock_common+0x974/0xbc0
...
[    3.406342] Call trace:
[    3.406351] __mutex_lock_common+0x974/0xbc0
[    3.406361] mutex_lock_nested+0x50/0x5c
[    3.406374] kbase_ipa_reset_data+0x40/0x154
[    3.406384] kbase_devfreq_status+0x60/0x90
[    3.406394] devfreq_simple_ondemand_func+0x34/0x104
[    3.406401] update_devfreq+0x60/0xf0
[    3.406408] devfreq_monitor+0x34/0x9c
[    3.406421] process_one_work+0x218/0x358
[    3.406429] worker_thread+0x230/0x4e0
[    3.406439] kthread+0x144/0x160
[    3.406449] ret_from_fork+0x10/0x30

Fixes: 68c4487 ("MALI: bifrost: not to call kbase_ipa_init() if rockchip simple-power-model is used")
Change-Id: I5fb5d4b6e63df77e6ea45ab3c60d627e3d0a03a2
Signed-off-by: Zhen Chen <[email protected]>
  • Loading branch information
Zhen Chen authored and rkhuangtao committed Jun 14, 2023
1 parent f0a0c64 commit 73b5dde
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/arm/bifrost/backend/gpu/mali_kbase_devfreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ kbase_devfreq_status(struct device *dev, struct devfreq_dev_status *stat)
stat->private_data = NULL;

#if MALI_USE_CSF && defined CONFIG_DEVFREQ_THERMAL
kbase_ipa_reset_data(kbdev);
if (!kbdev->dfc_power.dyn_power_coeff)
kbase_ipa_reset_data(kbdev);
#endif

return 0;
Expand Down

0 comments on commit 73b5dde

Please sign in to comment.