|
@@ -6018,7 +6018,7 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
|
|
|
struct cam_ife_hw_mgr_ctx *ctx;
|
|
|
struct cam_isp_prepare_hw_update_data *hw_update_data;
|
|
|
unsigned long rem_jiffies = 0;
|
|
|
- bool cdm_hang_detect = false;
|
|
|
+ bool is_cdm_hung = false;
|
|
|
|
|
|
if (!hw_mgr_priv || !config_hw_args) {
|
|
|
CAM_ERR(CAM_ISP,
|
|
@@ -6072,12 +6072,15 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
|
|
|
|
|
|
if (cfg->reapply_type && cfg->cdm_reset_before_apply) {
|
|
|
if (ctx->last_cdm_done_req < cfg->request_id) {
|
|
|
- cdm_hang_detect =
|
|
|
- cam_cdm_detect_hang_error(ctx->cdm_handle);
|
|
|
+ is_cdm_hung = !cam_cdm_detect_hang_error(ctx->cdm_handle);
|
|
|
CAM_ERR_RATE_LIMIT(CAM_ISP,
|
|
|
- "CDM callback not received for req: %lld, last_cdm_done_req: %lld, cdm_hang_detect: %d",
|
|
|
+ "CDM callback not received for req: %lld, last_cdm_done_req: %lld, is_cdm_hung: %d",
|
|
|
cfg->request_id, ctx->last_cdm_done_req,
|
|
|
- cdm_hang_detect);
|
|
|
+ is_cdm_hung);
|
|
|
+
|
|
|
+ if (!is_cdm_hung)
|
|
|
+ cam_cdm_dump_debug_registers(ctx->cdm_handle);
|
|
|
+
|
|
|
rc = cam_cdm_reset_hw(ctx->cdm_handle);
|
|
|
if (rc) {
|
|
|
CAM_ERR_RATE_LIMIT(CAM_ISP,
|
|
@@ -6230,10 +6233,10 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv,
|
|
|
"config done completion timeout for req_id=%llu ctx_index %d",
|
|
|
cfg->request_id, ctx->ctx_index);
|
|
|
|
|
|
- if (!cam_cdm_detect_hang_error(ctx->cdm_handle)) {
|
|
|
+ if (!cam_cdm_detect_hang_error(ctx->cdm_handle))
|
|
|
CAM_ERR(CAM_ISP, "CDM Workqueue delayed");
|
|
|
+ else
|
|
|
cam_cdm_dump_debug_registers(ctx->cdm_handle);
|
|
|
- }
|
|
|
|
|
|
rc = -ETIMEDOUT;
|
|
|
} else {
|