msm: camera: isp: Update last flush request id
On flush specific request, update last flush request ID for the link. CRs-Fixed: 3404872 Change-Id: I05eade5792a891c78fa279895b8053ecb1ae9f95 Signed-off-by: Karthik Anantha Ram <quic_kartanan@quicinc.com>
This commit is contained in:

committed by
Camera Software Integration

parent
6d559d7ed1
commit
7a1b3e3de0
@@ -6522,15 +6522,14 @@ static int __cam_isp_ctx_config_dev_in_top_state(
|
|||||||
if (rc) {
|
if (rc) {
|
||||||
if (rc == -EBADR)
|
if (rc == -EBADR)
|
||||||
CAM_INFO(CAM_ISP,
|
CAM_INFO(CAM_ISP,
|
||||||
"Add req failed:req id=%llu flushed,ctx:%u,link:0x%x",
|
"Add req failed: req id=%llu, it has been flushed on link 0x%x ctx %u",
|
||||||
req->request_id, ctx->ctx_id, ctx->link_hdl);
|
req->request_id, ctx->link_hdl, ctx->ctx_id);
|
||||||
else
|
else
|
||||||
CAM_ERR(CAM_ISP,
|
CAM_ERR(CAM_ISP,
|
||||||
"Add req failed: req id=%llu, ctx_idx: %u, link: 0x%x",
|
"Add req failed: req id=%llu on link 0x%x ctx %u",
|
||||||
req->request_id, ctx->ctx_id, ctx->link_hdl);
|
req->request_id, ctx->link_hdl, ctx->ctx_id);
|
||||||
} else {
|
} else {
|
||||||
__cam_isp_ctx_enqueue_request_in_order(
|
__cam_isp_ctx_enqueue_request_in_order(ctx, req, true);
|
||||||
ctx, req, true);
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
CAM_ERR(CAM_ISP, "Unable to add request: req id=%llu,ctx: %u,link: 0x%x",
|
CAM_ERR(CAM_ISP, "Unable to add request: req id=%llu,ctx: %u,link: 0x%x",
|
||||||
|
@@ -2957,14 +2957,17 @@ int cam_req_mgr_process_flush_req(void *priv, void *data)
|
|||||||
switch (flush_info->flush_type) {
|
switch (flush_info->flush_type) {
|
||||||
case CAM_REQ_MGR_FLUSH_TYPE_ALL:
|
case CAM_REQ_MGR_FLUSH_TYPE_ALL:
|
||||||
link->last_flush_id = flush_info->req_id;
|
link->last_flush_id = flush_info->req_id;
|
||||||
CAM_INFO(CAM_CRM, "Last request id to flush is %lld",
|
CAM_INFO(CAM_CRM, "Last request id to flush is %lld on link 0x%x",
|
||||||
flush_info->req_id);
|
flush_info->req_id, link->link_hdl);
|
||||||
__cam_req_mgr_flush_req_slot(link);
|
__cam_req_mgr_flush_req_slot(link);
|
||||||
__cam_req_mgr_reset_apply_data(link);
|
__cam_req_mgr_reset_apply_data(link);
|
||||||
__cam_req_mgr_flush_dev_with_max_pd(link, flush_info, link->max_delay);
|
__cam_req_mgr_flush_dev_with_max_pd(link, flush_info, link->max_delay);
|
||||||
link->open_req_cnt = 0;
|
link->open_req_cnt = 0;
|
||||||
break;
|
break;
|
||||||
case CAM_REQ_MGR_FLUSH_TYPE_CANCEL_REQ:
|
case CAM_REQ_MGR_FLUSH_TYPE_CANCEL_REQ:
|
||||||
|
link->last_flush_id = flush_info->req_id;
|
||||||
|
CAM_DBG(CAM_CRM, "Canceling req %lld on link 0x%x",
|
||||||
|
flush_info->req_id, link->link_hdl);
|
||||||
rc = __cam_req_mgr_try_cancel_req(link, flush_info);
|
rc = __cam_req_mgr_try_cancel_req(link, flush_info);
|
||||||
if (rc)
|
if (rc)
|
||||||
CAM_WARN(CAM_CRM, "cannot cancel req_id %lld on link 0x%x",
|
CAM_WARN(CAM_CRM, "cannot cancel req_id %lld on link 0x%x",
|
||||||
@@ -3742,13 +3745,13 @@ static int cam_req_mgr_cb_add_req(struct cam_req_mgr_add_request *add_req)
|
|||||||
if (idx < 0) {
|
if (idx < 0) {
|
||||||
if (((uint32_t)add_req->req_id) <= (link->last_flush_id)) {
|
if (((uint32_t)add_req->req_id) <= (link->last_flush_id)) {
|
||||||
CAM_INFO(CAM_CRM,
|
CAM_INFO(CAM_CRM,
|
||||||
"req %lld not found in in_q; it has been flushed [last_flush_req %u]",
|
"req %lld not found in in_q; it has been flushed [last_flush_req %lld] link 0x%x",
|
||||||
add_req->req_id, link->last_flush_id);
|
add_req->req_id, link->last_flush_id, link->link_hdl);
|
||||||
rc = -EBADR;
|
rc = -EBADR;
|
||||||
} else {
|
} else {
|
||||||
CAM_ERR(CAM_CRM,
|
CAM_ERR(CAM_CRM,
|
||||||
"req %lld not found in in_q",
|
"req %lld not found in in_q on link 0x%x [last_flush_req %lld]",
|
||||||
add_req->req_id);
|
add_req->req_id, link->link_hdl, link->last_flush_id);
|
||||||
rc = -ENOENT;
|
rc = -ENOENT;
|
||||||
}
|
}
|
||||||
goto end;
|
goto end;
|
||||||
|
Reference in New Issue
Block a user