mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
msm: cvp: Avoid racing in session deletion and use
Avoid a deleted session being used for power update. Change-Id: I44a6ea0a4c0dda499bc6adac94b2edafdeeab82c Signed-off-by: George Shen <sqiao@codeaurora.org>
This commit is contained in:
parent
6a91a7d54b
commit
734e44bed3
1 changed files with 3 additions and 0 deletions
|
|
@ -754,6 +754,7 @@ static void aggregate_power_update(struct msm_cvp_core *core,
|
|||
unsigned long op_mpu_max[2] = {0}, op_ica_max[2] = {0};
|
||||
unsigned long op_fw_max[2] = {0}, bw_sum[2] = {0}, op_bw_max[2] = {0};
|
||||
|
||||
mutex_lock(&core->lock);
|
||||
list_for_each_entry(inst, &core->instances, list) {
|
||||
if (inst->state == MSM_CVP_CORE_INVALID ||
|
||||
inst->state == MSM_CVP_CORE_UNINIT ||
|
||||
|
|
@ -824,6 +825,8 @@ static void aggregate_power_update(struct msm_cvp_core *core,
|
|||
core->dyn_clk.sum_fps[HFI_HW_ICA]);
|
||||
}
|
||||
|
||||
mutex_unlock(&core->lock);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
fdu_sum[i] = max_3(fdu_sum[i], od_sum[i], mpu_sum[i]);
|
||||
fdu_sum[i] = max_3(fdu_sum[i], ica_sum[i], fw_sum[i]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue