Loading drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c +26 −26 Original line number Diff line number Diff line Loading @@ -687,24 +687,16 @@ static int __cam_isp_ctx_reg_upd_in_sof(struct cam_isp_context *ctx_isp, * This is for the first update. The initial setting will * cause the reg_upd in the first frame. */ if (!list_empty(&ctx->pending_req_list)) { req = list_first_entry(&ctx->pending_req_list, if (!list_empty(&ctx->wait_req_list)) { req = list_first_entry(&ctx->wait_req_list, struct cam_ctx_request, list); list_del_init(&req->list); req_isp = (struct cam_isp_ctx_req *) req->req_priv; if (req_isp->num_fence_map_out == req_isp->num_acked) { if (req_isp->num_fence_map_out == req_isp->num_acked) list_add_tail(&req->list, &ctx->free_req_list); } else { /* need to handle the buf done */ list_add_tail(&req->list, &ctx->active_req_list); ctx_isp->active_req_cnt++; CAM_DBG(CAM_REQ, "move request %lld to active list(cnt = %d)", req->request_id, ctx_isp->active_req_cnt); ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_EPOCH; } else CAM_ERR(CAM_ISP, "receive rup in unexpected state"); } if (req != NULL) { __cam_isp_ctx_update_state_monitor_array(ctx_isp, Loading @@ -728,7 +720,7 @@ static int __cam_isp_ctx_epoch_in_applied(struct cam_isp_context *ctx_isp, * If no wait req in epoch, this is an error case. * The recovery is to go back to sof state */ CAM_ERR(CAM_ISP, "No pending request"); CAM_ERR(CAM_ISP, "No wait request"); ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_SOF; /* Send SOF event as empty frame*/ Loading Loading @@ -830,8 +822,10 @@ static int __cam_isp_ctx_sof_in_epoch(struct cam_isp_context *ctx_isp, req = list_last_entry(&ctx->active_req_list, struct cam_ctx_request, list); if (req) __cam_isp_ctx_update_state_monitor_array(ctx_isp, CAM_ISP_STATE_CHANGE_TRIGGER_SOF, ctx->req_list->request_id); CAM_ISP_STATE_CHANGE_TRIGGER_SOF, ctx->req_list->request_id); CAM_DBG(CAM_ISP, "next substate %d", ctx_isp->substate_activated); Loading Loading @@ -873,7 +867,7 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( * transition to BUBBLE state again. */ if (list_empty(&ctx->pending_req_list)) { if (list_empty(&ctx->wait_req_list)) { /* * If no pending req in epoch, this is an error case. * Just go back to the bubble state. Loading @@ -886,14 +880,16 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( goto end; } req = list_first_entry(&ctx->pending_req_list, struct cam_ctx_request, req = list_first_entry(&ctx->wait_req_list, struct cam_ctx_request, list); req_isp = (struct cam_isp_ctx_req *)req->req_priv; list_del_init(&req->list); if (req_isp->bubble_report && ctx->ctx_crm_intf && ctx->ctx_crm_intf->notify_err) { struct cam_req_mgr_error_notify notify; list_add(&req->list, &ctx->pending_req_list); notify.link_hdl = ctx->link_hdl; notify.dev_hdl = ctx->dev_hdl; notify.req_id = req->request_id; Loading @@ -907,7 +903,6 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( * If we can not report bubble, then treat it as if no bubble * report. Just move the req to active list. */ list_del_init(&req->list); list_add_tail(&req->list, &ctx->active_req_list); ctx_isp->active_req_cnt++; CAM_DBG(CAM_ISP, "move request %lld to active list(cnt = %d)", Loading @@ -933,6 +928,7 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( end: req = list_last_entry(&ctx->active_req_list, struct cam_ctx_request, list); if (req) __cam_isp_ctx_update_state_monitor_array(ctx_isp, CAM_ISP_STATE_CHANGE_TRIGGER_EPOCH, req->request_id); return 0; Loading Loading @@ -1752,11 +1748,11 @@ static int __cam_isp_ctx_rdi_only_reg_upd_in_bubble_applied_state( ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_EPOCH; /* notify reqmgr with sof signal*/ if (ctx->ctx_crm_intf && ctx->ctx_crm_intf->notify_trigger) { if (list_empty(&ctx->pending_req_list)) { CAM_ERR(CAM_ISP, "Reg upd ack with no pending request"); if (list_empty(&ctx->wait_req_list)) { CAM_ERR(CAM_ISP, "Reg upd ack with no waiting request"); goto error; } req = list_first_entry(&ctx->pending_req_list, req = list_first_entry(&ctx->wait_req_list, struct cam_ctx_request, list); list_del_init(&req->list); Loading Loading @@ -2401,9 +2397,13 @@ static int __cam_isp_ctx_start_dev_in_ready(struct cam_context *ctx, } CAM_DBG(CAM_ISP, "start device success ctx %u", ctx->ctx_id); if (req_isp->num_fence_map_out) { list_del_init(&req->list); if (req_isp->num_fence_map_out) { list_add_tail(&req->list, &ctx->active_req_list); ctx_isp->active_req_cnt++; } else { list_add_tail(&req->list, &ctx->wait_req_list); } end: return rc; Loading Loading
drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c +26 −26 Original line number Diff line number Diff line Loading @@ -687,24 +687,16 @@ static int __cam_isp_ctx_reg_upd_in_sof(struct cam_isp_context *ctx_isp, * This is for the first update. The initial setting will * cause the reg_upd in the first frame. */ if (!list_empty(&ctx->pending_req_list)) { req = list_first_entry(&ctx->pending_req_list, if (!list_empty(&ctx->wait_req_list)) { req = list_first_entry(&ctx->wait_req_list, struct cam_ctx_request, list); list_del_init(&req->list); req_isp = (struct cam_isp_ctx_req *) req->req_priv; if (req_isp->num_fence_map_out == req_isp->num_acked) { if (req_isp->num_fence_map_out == req_isp->num_acked) list_add_tail(&req->list, &ctx->free_req_list); } else { /* need to handle the buf done */ list_add_tail(&req->list, &ctx->active_req_list); ctx_isp->active_req_cnt++; CAM_DBG(CAM_REQ, "move request %lld to active list(cnt = %d)", req->request_id, ctx_isp->active_req_cnt); ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_EPOCH; } else CAM_ERR(CAM_ISP, "receive rup in unexpected state"); } if (req != NULL) { __cam_isp_ctx_update_state_monitor_array(ctx_isp, Loading @@ -728,7 +720,7 @@ static int __cam_isp_ctx_epoch_in_applied(struct cam_isp_context *ctx_isp, * If no wait req in epoch, this is an error case. * The recovery is to go back to sof state */ CAM_ERR(CAM_ISP, "No pending request"); CAM_ERR(CAM_ISP, "No wait request"); ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_SOF; /* Send SOF event as empty frame*/ Loading Loading @@ -830,8 +822,10 @@ static int __cam_isp_ctx_sof_in_epoch(struct cam_isp_context *ctx_isp, req = list_last_entry(&ctx->active_req_list, struct cam_ctx_request, list); if (req) __cam_isp_ctx_update_state_monitor_array(ctx_isp, CAM_ISP_STATE_CHANGE_TRIGGER_SOF, ctx->req_list->request_id); CAM_ISP_STATE_CHANGE_TRIGGER_SOF, ctx->req_list->request_id); CAM_DBG(CAM_ISP, "next substate %d", ctx_isp->substate_activated); Loading Loading @@ -873,7 +867,7 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( * transition to BUBBLE state again. */ if (list_empty(&ctx->pending_req_list)) { if (list_empty(&ctx->wait_req_list)) { /* * If no pending req in epoch, this is an error case. * Just go back to the bubble state. Loading @@ -886,14 +880,16 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( goto end; } req = list_first_entry(&ctx->pending_req_list, struct cam_ctx_request, req = list_first_entry(&ctx->wait_req_list, struct cam_ctx_request, list); req_isp = (struct cam_isp_ctx_req *)req->req_priv; list_del_init(&req->list); if (req_isp->bubble_report && ctx->ctx_crm_intf && ctx->ctx_crm_intf->notify_err) { struct cam_req_mgr_error_notify notify; list_add(&req->list, &ctx->pending_req_list); notify.link_hdl = ctx->link_hdl; notify.dev_hdl = ctx->dev_hdl; notify.req_id = req->request_id; Loading @@ -907,7 +903,6 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( * If we can not report bubble, then treat it as if no bubble * report. Just move the req to active list. */ list_del_init(&req->list); list_add_tail(&req->list, &ctx->active_req_list); ctx_isp->active_req_cnt++; CAM_DBG(CAM_ISP, "move request %lld to active list(cnt = %d)", Loading @@ -933,6 +928,7 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( end: req = list_last_entry(&ctx->active_req_list, struct cam_ctx_request, list); if (req) __cam_isp_ctx_update_state_monitor_array(ctx_isp, CAM_ISP_STATE_CHANGE_TRIGGER_EPOCH, req->request_id); return 0; Loading Loading @@ -1752,11 +1748,11 @@ static int __cam_isp_ctx_rdi_only_reg_upd_in_bubble_applied_state( ctx_isp->substate_activated = CAM_ISP_CTX_ACTIVATED_EPOCH; /* notify reqmgr with sof signal*/ if (ctx->ctx_crm_intf && ctx->ctx_crm_intf->notify_trigger) { if (list_empty(&ctx->pending_req_list)) { CAM_ERR(CAM_ISP, "Reg upd ack with no pending request"); if (list_empty(&ctx->wait_req_list)) { CAM_ERR(CAM_ISP, "Reg upd ack with no waiting request"); goto error; } req = list_first_entry(&ctx->pending_req_list, req = list_first_entry(&ctx->wait_req_list, struct cam_ctx_request, list); list_del_init(&req->list); Loading Loading @@ -2401,9 +2397,13 @@ static int __cam_isp_ctx_start_dev_in_ready(struct cam_context *ctx, } CAM_DBG(CAM_ISP, "start device success ctx %u", ctx->ctx_id); if (req_isp->num_fence_map_out) { list_del_init(&req->list); if (req_isp->num_fence_map_out) { list_add_tail(&req->list, &ctx->active_req_list); ctx_isp->active_req_cnt++; } else { list_add_tail(&req->list, &ctx->wait_req_list); } end: return rc; Loading