From bc49527660af79eed1f57150d43557b3ce2eeda6 Mon Sep 17 00:00:00 2001 From: George Shen Date: Mon, 13 Sep 2021 10:27:58 -0700 Subject: [PATCH] msm: cvp: Avoid interrupting FW after WFI Flushing debug queue may trigger interrupt to FW. So flushing it before Tensilica going to WFI. Change-Id: I3b93183612439d5f499a30aadea18f0c2348ee13 Signed-off-by: George Shen --- msm/eva/cvp_hfi.c | 4 ++-- msm/eva/msm_cvp_common.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/msm/eva/cvp_hfi.c b/msm/eva/cvp_hfi.c index 4649e43a49..c982d7efd6 100644 --- a/msm/eva/cvp_hfi.c +++ b/msm/eva/cvp_hfi.c @@ -2452,6 +2452,8 @@ static int __power_collapse(struct iris_hfi_device *device, bool force) else if (rc) goto skip_power_off; + __flush_debug_queue(device, device->raw_packet); + pc_ready = __read_register(device, CVP_CTRL_STATUS) & CVP_CTRL_STATUS_PC_READY; if (!pc_ready) { @@ -2506,8 +2508,6 @@ static int __power_collapse(struct iris_hfi_device *device, bool force) } } - __flush_debug_queue(device, device->raw_packet); - rc = __suspend(device); if (rc) dprintk(CVP_ERR, "Failed __suspend\n"); diff --git a/msm/eva/msm_cvp_common.c b/msm/eva/msm_cvp_common.c index facb59d2e6..73f7ec56ba 100644 --- a/msm/eva/msm_cvp_common.c +++ b/msm/eva/msm_cvp_common.c @@ -1315,8 +1315,9 @@ int msm_cvp_noc_error_info(struct msm_cvp_core *core) last_fault_count = core->smmu_fault_count; core->ssr_count++; - dprintk(CVP_ERR, "cvp ssr count %d %d\n", core->ssr_count, - core->resources.max_ssr_allowed); + dprintk(CVP_ERR, "cvp ssr count %d %d %d\n", core->ssr_count, + core->resources.max_ssr_allowed, + core->smmu_fault_count); hdev = core->device; call_hfi_op(hdev, noc_error_info, hdev->hfi_device_data);