msm: eva: Fix sum fps aggregation setting
Initialize the sum fps calculation to avoid the value keep increasing. Add addional option (fps=0) to disable FD dcvs. Fix HFI header size checking. Change-Id: Ieb44b626a112205091327c7785a8c92c8c77c0b0 Signed-off-by: Ronald Karyodisa <ronaldk@codeaurora.org>
This commit is contained in:
@@ -479,14 +479,25 @@ static int cvp_fence_proc(struct msm_cvp_inst *inst,
|
||||
timeout = msecs_to_jiffies(CVP_MAX_WAIT_TIME);
|
||||
rc = cvp_wait_process_message(inst, sq, &ktid, timeout,
|
||||
(struct eva_kmd_hfi_packet *)&hdr);
|
||||
if (get_msg_size((struct cvp_hfi_msg_session_hdr *) &hdr)
|
||||
== sizeof(struct cvp_hfi_msg_session_hdr_ext)) {
|
||||
|
||||
/* Only FD support dcvs at certain FW */
|
||||
if (hdr.size == sizeof(struct cvp_hfi_msg_session_hdr_ext)
|
||||
+ sizeof(struct cvp_hfi_buf_type) ) {
|
||||
struct cvp_hfi_msg_session_hdr_ext *fhdr =
|
||||
(struct cvp_hfi_msg_session_hdr_ext *)&hdr;
|
||||
dprintk(CVP_HFI, "busy cycle 0x%x, total 0x%x\n",
|
||||
struct msm_cvp_core *core = inst->core;
|
||||
dprintk(CVP_PWR, "busy cycle %d, total %d\n",
|
||||
fhdr->busy_cycles, fhdr->total_cycles);
|
||||
|
||||
if (core &&
|
||||
(core->dyn_clk.sum_fps[HFI_HW_FDU] ||
|
||||
core->dyn_clk.sum_fps[HFI_HW_MPU] ||
|
||||
core->dyn_clk.sum_fps[HFI_HW_OD] ||
|
||||
core->dyn_clk.sum_fps[HFI_HW_ICA]))
|
||||
{
|
||||
clock_check = true;
|
||||
}
|
||||
}
|
||||
hfi_err = hdr.error_type;
|
||||
if (rc) {
|
||||
dprintk(CVP_ERR, "%s %s: cvp_wait_process_message rc %d\n",
|
||||
@@ -755,6 +766,10 @@ static void aggregate_power_update(struct msm_cvp_core *core,
|
||||
unsigned long op_fdu_max[2] = {0}, op_od_max[2] = {0};
|
||||
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};
|
||||
core->dyn_clk.sum_fps[HFI_HW_FDU] = 0;
|
||||
core->dyn_clk.sum_fps[HFI_HW_MPU] = 0;
|
||||
core->dyn_clk.sum_fps[HFI_HW_OD] = 0;
|
||||
core->dyn_clk.sum_fps[HFI_HW_ICA] = 0;
|
||||
|
||||
list_for_each_entry(inst, &core->instances, list) {
|
||||
if (inst->state == MSM_CVP_CORE_INVALID ||
|
||||
|
Reference in New Issue
Block a user