msm: camera: ife: Improve IFE logs for better debugging

Add HW index in Release, Acquire, Flush and confiqure
IFE Logs to Improve the debugging.

CRs-Fixed: 2709537
Change-Id: Ia540f1498d889f1e744e6ab20e07d17e27b07731
Signed-off-by: Jigar Agrawal <jigar@codeaurora.org>
This commit is contained in:
Jigar Agrawal 2020-06-15 16:59:19 -07:00 • committed by Gerrit - the friendly Code Review server
commit f3435b0efd
3 changed files with 35 additions and 21 deletions

View file

@ -28,7 +28,7 @@ static struct cam_isp_ctx_debug isp_ctx_debug;
div_u64_rem(atomic64_add_return(1, head),\
max_entries, (ret))
static int cam_isp_context_dump_active_request(void *data, unsigned long iova,
static int cam_isp_context_dump_requests(void *data, unsigned long iova,
uint32_t buf_info);
static int __cam_isp_ctx_start_dev_in_ready(struct cam_context *ctx,
@ -3010,8 +3010,8 @@ static int __cam_isp_ctx_flush_req_in_top_state(
ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_HALT;
spin_unlock_bh(&ctx->lock);
CAM_INFO(CAM_ISP, "Last request id to flush is %lld",
flush_req->req_id);
CAM_INFO(CAM_ISP, "Last request id to flush is %lld, ctx_id:%d",
flush_req->req_id, ctx->ctx_id);
ctx->last_flush_req = flush_req->req_id;
memset(&hw_cmd_args, 0, sizeof(hw_cmd_args));
@ -4583,7 +4583,8 @@ static int __cam_isp_ctx_config_dev_in_flushed(struct cam_context *ctx,
"Failed to re-start HW after flush rc: %d", rc);
else
CAM_INFO(CAM_ISP,
"Received init after flush. Re-start HW complete.");
"Received init after flush. Re-start HW complete in ctx:%d",
ctx->ctx_id);
end:
CAM_DBG(CAM_ISP, "next state %d sub_state:%d", ctx->state,
@ -5152,7 +5153,7 @@ static struct cam_ctx_ops
.dump_req = __cam_isp_ctx_dump_in_top_state,
},
.irq_ops = NULL,
.pagefault_ops = cam_isp_context_dump_active_request,
.pagefault_ops = cam_isp_context_dump_requests,
.dumpinfo_ops = cam_isp_context_info_dump,
},
/* Ready */
@ -5169,7 +5170,7 @@ static struct cam_ctx_ops
.dump_req = __cam_isp_ctx_dump_in_top_state,
},
.irq_ops = NULL,
.pagefault_ops = cam_isp_context_dump_active_request,
.pagefault_ops = cam_isp_context_dump_requests,
.dumpinfo_ops = cam_isp_context_info_dump,
},
/* Flushed */
@ -5185,7 +5186,7 @@ static struct cam_ctx_ops
.process_evt = __cam_isp_ctx_process_evt,
},
.irq_ops = NULL,
.pagefault_ops = cam_isp_context_dump_active_request,
.pagefault_ops = cam_isp_context_dump_requests,
.dumpinfo_ops = cam_isp_context_info_dump,
},
/* Activated */
@ -5204,13 +5205,13 @@ static struct cam_ctx_ops
.dump_req = __cam_isp_ctx_dump_in_top_state,
},
.irq_ops = __cam_isp_ctx_handle_irq_in_activated,
.pagefault_ops = cam_isp_context_dump_active_request,
.pagefault_ops = cam_isp_context_dump_requests,
.dumpinfo_ops = cam_isp_context_info_dump,
},
};
static int cam_isp_context_dump_active_request(void *data, unsigned long iova,
static int cam_isp_context_dump_requests(void *data, unsigned long iova,
uint32_t buf_info)
{
@ -5239,7 +5240,8 @@ static int cam_isp_context_dump_active_request(void *data, unsigned long iova,
req_isp = (struct cam_isp_ctx_req *) req->req_priv;
hw_update_data = &req_isp->hw_update_data;
pf_dbg_entry = &(req->pf_data);
CAM_INFO(CAM_ISP, "req_id : %lld ", req->request_id);
CAM_INFO(CAM_ISP, "Active List: req_id : %lld ",
req->request_id);
rc = cam_context_dump_pf_info_to_hw(ctx, pf_dbg_entry->packet,
iova, buf_info, &mem_found);
@ -5259,7 +5261,7 @@ static int cam_isp_context_dump_active_request(void *data, unsigned long iova,
req_isp = (struct cam_isp_ctx_req *) req->req_priv;
hw_update_data = &req_isp->hw_update_data;
pf_dbg_entry = &(req->pf_data);
CAM_INFO(CAM_ISP, "req_id : %lld ", req->request_id);
CAM_INFO(CAM_ISP, "Wait List: req_id : %lld ", req->request_id);
rc = cam_context_dump_pf_info_to_hw(ctx, pf_dbg_entry->packet,
iova, buf_info, &mem_found);
@ -5289,7 +5291,8 @@ static int cam_isp_context_dump_active_request(void *data, unsigned long iova,
req_isp = (struct cam_isp_ctx_req *) req->req_priv;
hw_update_data = &req_isp->hw_update_data;
pf_dbg_entry = &(req->pf_data);
CAM_INFO(CAM_ISP, "req_id : %lld ", req->request_id);
CAM_INFO(CAM_ISP, "Pending List: req_id : %lld ",
req->request_id);
rc = cam_context_dump_pf_info_to_hw(ctx, pf_dbg_entry->packet,
iova, buf_info, &mem_found);

View file

@ -402,11 +402,13 @@ static int cam_ife_hw_mgr_start_hw_res(
isp_hw_res->hw_res[i],
sizeof(struct cam_isp_resource_node));
if (rc) {
CAM_ERR(CAM_ISP, "Can not start HW resources");
CAM_ERR(CAM_ISP,
"Can not start HW:%d resources",
hw_intf->hw_idx);
goto err;
}
CAM_DBG(CAM_ISP, "Start HW %d Res %d", hw_intf->hw_idx,
isp_hw_res->hw_res[i]->res_id);
} else
CAM_INFO(CAM_ISP, "Started HW:%d",
hw_intf->hw_idx);
} else {
CAM_ERR(CAM_ISP, "function null");
goto err;
@ -436,10 +438,13 @@ static void cam_ife_hw_mgr_stop_hw_res(
CAM_ISP_RESOURCE_STATE_STREAMING)
continue;
if (hw_intf->hw_ops.stop)
if (hw_intf->hw_ops.stop) {
hw_intf->hw_ops.stop(hw_intf->hw_priv,
isp_hw_res->hw_res[i],
sizeof(struct cam_isp_resource_node));
CAM_INFO(CAM_ISP, "Stopped Hw:%d", hw_intf->hw_idx);
}
else
CAM_ERR(CAM_ISP, "stop null");
if (hw_intf->hw_ops.process_cmd &&
@ -645,8 +650,13 @@ static int cam_ife_hw_mgr_free_hw_res(
sizeof(struct cam_isp_resource_node));
if (rc)
CAM_ERR(CAM_ISP,
"Release hw resource id %d failed",
isp_hw_res->res_id);
"Release HW:%d resource id %d failed",
hw_intf->hw_idx, isp_hw_res->res_id);
else
CAM_INFO(CAM_ISP,
"Released HW:%d resource id %d",
hw_intf->hw_idx, isp_hw_res->res_id);
isp_hw_res->hw_res[i] = NULL;
} else
CAM_ERR(CAM_ISP, "Release null");

View file

@ -3928,8 +3928,9 @@ static int cam_ife_csid_sof_irq_debug(
csid_hw->sof_irq_triggered = false;
}
CAM_INFO(CAM_ISP, "SOF freeze: CSID SOF irq %s",
(sof_irq_enable == true) ? "enabled" : "disabled");
CAM_INFO(CAM_ISP, "SOF freeze: CSID SOF irq %s, CSID HW:%d",
(sof_irq_enable) ? "enabled" : "disabled",
csid_hw->hw_intf->hw_idx);
return 0;
}