Loading drivers/media/platform/msm/camera/cam_core/cam_hw_mgr_intf.h +2 −0 Original line number Diff line number Diff line Loading @@ -211,6 +211,7 @@ struct cam_hw_stream_setttings { * @num_out_map_entries: Number of out map entries * @priv: Private pointer * @request_id: Request ID * @reapply True if reapplying after bubble * */ struct cam_hw_config_args { Loading @@ -222,6 +223,7 @@ struct cam_hw_config_args { void *priv; uint64_t request_id; bool init_packet; bool reapply; }; /** Loading drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c +7 −0 Original line number Diff line number Diff line Loading @@ -698,6 +698,7 @@ static int __cam_isp_ctx_handle_buf_done_in_activated_state( } else { list_del_init(&req->list); list_add_tail(&req->list, &ctx->free_req_list); req_isp->reapply = false; CAM_DBG(CAM_REQ, "Move active request %lld to free list(cnt = %d) [all fences done], ctx %u", Loading Loading @@ -1125,6 +1126,7 @@ static int __cam_isp_ctx_epoch_in_applied(struct cam_isp_context *ctx_isp, list); req_isp = (struct cam_isp_ctx_req *)req->req_priv; req_isp->bubble_detected = true; req_isp->reapply = true; CAM_INFO(CAM_ISP, "ctx:%d Report Bubble flag %d req id:%lld", ctx->ctx_id, req_isp->bubble_report, req->request_id); Loading Loading @@ -1288,6 +1290,7 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( CAM_INFO(CAM_ISP, "Ctx:%d Report Bubble flag %d req id:%lld", ctx->ctx_id, req_isp->bubble_report, req->request_id); __cam_isp_ctx_dump_state_monitor_array(ctx_isp, true); req_isp->reapply = true; if (req_isp->bubble_report && ctx->ctx_crm_intf && ctx->ctx_crm_intf->notify_err) { Loading Loading @@ -2065,6 +2068,7 @@ static int __cam_isp_ctx_apply_req_in_activated_state( cfg.num_hw_update_entries = req_isp->num_cfg; cfg.priv = &req_isp->hw_update_data; cfg.init_packet = 0; cfg.reapply = req_isp->reapply; rc = ctx->hw_mgr_intf->hw_config(ctx->hw_mgr_intf->hw_mgr_priv, &cfg); if (rc) { Loading Loading @@ -2345,6 +2349,7 @@ static int __cam_isp_ctx_flush_req(struct cam_context *ctx, req_isp->fence_map_out[i].sync_id = -1; } } req_isp->reapply = false; list_add_tail(&req->list, &ctx->free_req_list); } Loading Loading @@ -2707,6 +2712,7 @@ static int __cam_isp_ctx_rdi_only_sof_in_bubble_applied( CAM_INFO(CAM_ISP, "Ctx:%d Report Bubble flag %d req id:%lld", ctx->ctx_id, req_isp->bubble_report, req->request_id); __cam_isp_ctx_dump_state_monitor_array(ctx_isp, true); req_isp->reapply = true; if (req_isp->bubble_report && ctx->ctx_crm_intf && ctx->ctx_crm_intf->notify_err) { Loading Loading @@ -3763,6 +3769,7 @@ static int __cam_isp_ctx_start_dev_in_ready(struct cam_context *ctx, start_isp.hw_config.num_hw_update_entries = req_isp->num_cfg; start_isp.hw_config.priv = &req_isp->hw_update_data; start_isp.hw_config.init_packet = 1; start_isp.hw_config.reapply = 0; start_isp.start_only = false; atomic_set(&ctx_isp->process_bubble, 0); Loading drivers/media/platform/msm/camera/cam_isp/cam_isp_context.h +2 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ struct cam_isp_ctx_irq_ops { * @hw_update_data: HW update data for this request * @event_timestamp: Timestamp for different stage of request * @bubble_detected: Flag to indicate if bubble detected * @reapply: True if reapplying after bubble * */ struct cam_isp_ctx_req { Loading @@ -140,6 +141,7 @@ struct cam_isp_ctx_req { struct timeval event_timestamp [CAM_ISP_CTX_EVENT_MAX]; bool bubble_detected; bool reapply; }; /** Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +22 −6 Original line number Diff line number Diff line Loading @@ -2478,7 +2478,7 @@ static int cam_isp_blob_bw_update( static int cam_ife_mgr_config_hw(void *hw_mgr_priv, void *config_hw_args) { int rc = -1, i; int rc = -1, i, skip = 0; struct cam_hw_config_args *cfg; struct cam_hw_update_entry *cmd; struct cam_cdm_bl_request *cdm_cmd; Loading Loading @@ -2528,18 +2528,34 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv, if (cfg->num_hw_update_entries > 0) { cdm_cmd = ctx->cdm_cmd; cdm_cmd->cmd_arrary_count = cfg->num_hw_update_entries; cdm_cmd->type = CAM_CDM_BL_CMD_TYPE_MEM_HANDLE; cdm_cmd->flag = true; cdm_cmd->userdata = ctx; cdm_cmd->cookie = cfg->request_id; for (i = 0 ; i <= cfg->num_hw_update_entries; i++) { for (i = 0 ; i < cfg->num_hw_update_entries; i++) { cmd = (cfg->hw_update_entries + i); cdm_cmd->cmd[i].bl_addr.mem_handle = cmd->handle; cdm_cmd->cmd[i].offset = cmd->offset; cdm_cmd->cmd[i].len = cmd->len; CAM_DBG(CAM_ISP, "reapply:%d cmd flags:%d", cfg->reapply, cmd->flags); if (cfg->reapply && (cmd->flags == CAM_ISP_IQ_BL)) { skip++; continue; } if (cmd->flags == CAM_ISP_UNUSED_BL || cmd->flags >= CAM_ISP_BL_MAX) CAM_ERR(CAM_ISP, "Unexpected BL type %d", cmd->flags); cdm_cmd->cmd[i - skip].bl_addr.mem_handle = cmd->handle; cdm_cmd->cmd[i - skip].offset = cmd->offset; cdm_cmd->cmd[i - skip].len = cmd->len; } cdm_cmd->cmd_arrary_count = cfg->num_hw_update_entries - skip; CAM_DBG(CAM_ISP, "updated cmd array count:%d skip value:%d", cdm_cmd->cmd_arrary_count, skip); if (cfg->init_packet) init_completion(&ctx->config_done_complete); Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/hw_utils/cam_isp_packet_parser.c +13 −9 Original line number Diff line number Diff line Loading @@ -70,6 +70,8 @@ int cam_isp_add_change_base( hw_entry[num_ent].handle = kmd_buf_info->handle; hw_entry[num_ent].len = get_base.cmd.used_bytes; hw_entry[num_ent].offset = kmd_buf_info->offset; /* Marking change base as IOCFG to reapply on bubble */ hw_entry[num_ent].flags = CAM_ISP_IOCFG_BL; CAM_DBG(CAM_ISP, "num_ent=%d handle=0x%x, len=%u, offset=%u", num_ent, Loading Loading @@ -314,10 +316,7 @@ int cam_isp_add_command_buffers( hw_entry[num_ent].handle, hw_entry[num_ent].len, hw_entry[num_ent].offset); if (cmd_meta_data == CAM_ISP_PACKET_META_DMI_LEFT) hw_entry[num_ent].flags = 0x1; hw_entry[num_ent].flags = CAM_ISP_IQ_BL; num_ent++; } Loading @@ -336,9 +335,7 @@ int cam_isp_add_command_buffers( hw_entry[num_ent].len, hw_entry[num_ent].offset); if (cmd_meta_data == CAM_ISP_PACKET_META_DMI_RIGHT) hw_entry[num_ent].flags = 0x1; hw_entry[num_ent].flags = CAM_ISP_IQ_BL; num_ent++; } break; Loading @@ -354,8 +351,7 @@ int cam_isp_add_command_buffers( hw_entry[num_ent].handle, hw_entry[num_ent].len, hw_entry[num_ent].offset); if (cmd_meta_data == CAM_ISP_PACKET_META_DMI_COMMON) hw_entry[num_ent].flags = 0x1; hw_entry[num_ent].flags = CAM_ISP_IQ_BL; num_ent++; break; Loading Loading @@ -386,6 +382,7 @@ int cam_isp_add_command_buffers( rc); return rc; } hw_entry[num_ent].flags = CAM_ISP_IQ_BL; num_ent = prepare->num_hw_update_entries; } break; Loading @@ -408,6 +405,7 @@ int cam_isp_add_command_buffers( rc); return rc; } hw_entry[num_ent].flags = CAM_ISP_IQ_BL; num_ent = prepare->num_hw_update_entries; } break; Loading @@ -428,6 +426,7 @@ int cam_isp_add_command_buffers( "Failed in processing blobs %d", rc); return rc; } hw_entry[num_ent].flags = CAM_ISP_IQ_BL; num_ent = prepare->num_hw_update_entries; } break; Loading Loading @@ -839,6 +838,8 @@ int cam_isp_add_io_buffers( prepare->hw_update_entries[num_ent].len = io_cfg_used_bytes; prepare->hw_update_entries[num_ent].offset = kmd_buf_info->offset; prepare->hw_update_entries[num_ent].flags = CAM_ISP_IOCFG_BL; CAM_DBG(CAM_ISP, "num_ent=%d handle=0x%x, len=%u, offset=%u", num_ent, Loading Loading @@ -945,6 +946,9 @@ int cam_isp_add_reg_update( prepare->hw_update_entries[num_ent].len = reg_update_size; prepare->hw_update_entries[num_ent].offset = kmd_buf_info->offset; /* Marking reg update as IOCFG to reapply on bubble */ prepare->hw_update_entries[num_ent].flags = CAM_ISP_IOCFG_BL; CAM_DBG(CAM_ISP, "num_ent=%d handle=0x%x, len=%u, offset=%u", num_ent, Loading Loading
drivers/media/platform/msm/camera/cam_core/cam_hw_mgr_intf.h +2 −0 Original line number Diff line number Diff line Loading @@ -211,6 +211,7 @@ struct cam_hw_stream_setttings { * @num_out_map_entries: Number of out map entries * @priv: Private pointer * @request_id: Request ID * @reapply True if reapplying after bubble * */ struct cam_hw_config_args { Loading @@ -222,6 +223,7 @@ struct cam_hw_config_args { void *priv; uint64_t request_id; bool init_packet; bool reapply; }; /** Loading
drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c +7 −0 Original line number Diff line number Diff line Loading @@ -698,6 +698,7 @@ static int __cam_isp_ctx_handle_buf_done_in_activated_state( } else { list_del_init(&req->list); list_add_tail(&req->list, &ctx->free_req_list); req_isp->reapply = false; CAM_DBG(CAM_REQ, "Move active request %lld to free list(cnt = %d) [all fences done], ctx %u", Loading Loading @@ -1125,6 +1126,7 @@ static int __cam_isp_ctx_epoch_in_applied(struct cam_isp_context *ctx_isp, list); req_isp = (struct cam_isp_ctx_req *)req->req_priv; req_isp->bubble_detected = true; req_isp->reapply = true; CAM_INFO(CAM_ISP, "ctx:%d Report Bubble flag %d req id:%lld", ctx->ctx_id, req_isp->bubble_report, req->request_id); Loading Loading @@ -1288,6 +1290,7 @@ static int __cam_isp_ctx_epoch_in_bubble_applied( CAM_INFO(CAM_ISP, "Ctx:%d Report Bubble flag %d req id:%lld", ctx->ctx_id, req_isp->bubble_report, req->request_id); __cam_isp_ctx_dump_state_monitor_array(ctx_isp, true); req_isp->reapply = true; if (req_isp->bubble_report && ctx->ctx_crm_intf && ctx->ctx_crm_intf->notify_err) { Loading Loading @@ -2065,6 +2068,7 @@ static int __cam_isp_ctx_apply_req_in_activated_state( cfg.num_hw_update_entries = req_isp->num_cfg; cfg.priv = &req_isp->hw_update_data; cfg.init_packet = 0; cfg.reapply = req_isp->reapply; rc = ctx->hw_mgr_intf->hw_config(ctx->hw_mgr_intf->hw_mgr_priv, &cfg); if (rc) { Loading Loading @@ -2345,6 +2349,7 @@ static int __cam_isp_ctx_flush_req(struct cam_context *ctx, req_isp->fence_map_out[i].sync_id = -1; } } req_isp->reapply = false; list_add_tail(&req->list, &ctx->free_req_list); } Loading Loading @@ -2707,6 +2712,7 @@ static int __cam_isp_ctx_rdi_only_sof_in_bubble_applied( CAM_INFO(CAM_ISP, "Ctx:%d Report Bubble flag %d req id:%lld", ctx->ctx_id, req_isp->bubble_report, req->request_id); __cam_isp_ctx_dump_state_monitor_array(ctx_isp, true); req_isp->reapply = true; if (req_isp->bubble_report && ctx->ctx_crm_intf && ctx->ctx_crm_intf->notify_err) { Loading Loading @@ -3763,6 +3769,7 @@ static int __cam_isp_ctx_start_dev_in_ready(struct cam_context *ctx, start_isp.hw_config.num_hw_update_entries = req_isp->num_cfg; start_isp.hw_config.priv = &req_isp->hw_update_data; start_isp.hw_config.init_packet = 1; start_isp.hw_config.reapply = 0; start_isp.start_only = false; atomic_set(&ctx_isp->process_bubble, 0); Loading
drivers/media/platform/msm/camera/cam_isp/cam_isp_context.h +2 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,7 @@ struct cam_isp_ctx_irq_ops { * @hw_update_data: HW update data for this request * @event_timestamp: Timestamp for different stage of request * @bubble_detected: Flag to indicate if bubble detected * @reapply: True if reapplying after bubble * */ struct cam_isp_ctx_req { Loading @@ -140,6 +141,7 @@ struct cam_isp_ctx_req { struct timeval event_timestamp [CAM_ISP_CTX_EVENT_MAX]; bool bubble_detected; bool reapply; }; /** Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/cam_ife_hw_mgr.c +22 −6 Original line number Diff line number Diff line Loading @@ -2478,7 +2478,7 @@ static int cam_isp_blob_bw_update( static int cam_ife_mgr_config_hw(void *hw_mgr_priv, void *config_hw_args) { int rc = -1, i; int rc = -1, i, skip = 0; struct cam_hw_config_args *cfg; struct cam_hw_update_entry *cmd; struct cam_cdm_bl_request *cdm_cmd; Loading Loading @@ -2528,18 +2528,34 @@ static int cam_ife_mgr_config_hw(void *hw_mgr_priv, if (cfg->num_hw_update_entries > 0) { cdm_cmd = ctx->cdm_cmd; cdm_cmd->cmd_arrary_count = cfg->num_hw_update_entries; cdm_cmd->type = CAM_CDM_BL_CMD_TYPE_MEM_HANDLE; cdm_cmd->flag = true; cdm_cmd->userdata = ctx; cdm_cmd->cookie = cfg->request_id; for (i = 0 ; i <= cfg->num_hw_update_entries; i++) { for (i = 0 ; i < cfg->num_hw_update_entries; i++) { cmd = (cfg->hw_update_entries + i); cdm_cmd->cmd[i].bl_addr.mem_handle = cmd->handle; cdm_cmd->cmd[i].offset = cmd->offset; cdm_cmd->cmd[i].len = cmd->len; CAM_DBG(CAM_ISP, "reapply:%d cmd flags:%d", cfg->reapply, cmd->flags); if (cfg->reapply && (cmd->flags == CAM_ISP_IQ_BL)) { skip++; continue; } if (cmd->flags == CAM_ISP_UNUSED_BL || cmd->flags >= CAM_ISP_BL_MAX) CAM_ERR(CAM_ISP, "Unexpected BL type %d", cmd->flags); cdm_cmd->cmd[i - skip].bl_addr.mem_handle = cmd->handle; cdm_cmd->cmd[i - skip].offset = cmd->offset; cdm_cmd->cmd[i - skip].len = cmd->len; } cdm_cmd->cmd_arrary_count = cfg->num_hw_update_entries - skip; CAM_DBG(CAM_ISP, "updated cmd array count:%d skip value:%d", cdm_cmd->cmd_arrary_count, skip); if (cfg->init_packet) init_completion(&ctx->config_done_complete); Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/hw_utils/cam_isp_packet_parser.c +13 −9 Original line number Diff line number Diff line Loading @@ -70,6 +70,8 @@ int cam_isp_add_change_base( hw_entry[num_ent].handle = kmd_buf_info->handle; hw_entry[num_ent].len = get_base.cmd.used_bytes; hw_entry[num_ent].offset = kmd_buf_info->offset; /* Marking change base as IOCFG to reapply on bubble */ hw_entry[num_ent].flags = CAM_ISP_IOCFG_BL; CAM_DBG(CAM_ISP, "num_ent=%d handle=0x%x, len=%u, offset=%u", num_ent, Loading Loading @@ -314,10 +316,7 @@ int cam_isp_add_command_buffers( hw_entry[num_ent].handle, hw_entry[num_ent].len, hw_entry[num_ent].offset); if (cmd_meta_data == CAM_ISP_PACKET_META_DMI_LEFT) hw_entry[num_ent].flags = 0x1; hw_entry[num_ent].flags = CAM_ISP_IQ_BL; num_ent++; } Loading @@ -336,9 +335,7 @@ int cam_isp_add_command_buffers( hw_entry[num_ent].len, hw_entry[num_ent].offset); if (cmd_meta_data == CAM_ISP_PACKET_META_DMI_RIGHT) hw_entry[num_ent].flags = 0x1; hw_entry[num_ent].flags = CAM_ISP_IQ_BL; num_ent++; } break; Loading @@ -354,8 +351,7 @@ int cam_isp_add_command_buffers( hw_entry[num_ent].handle, hw_entry[num_ent].len, hw_entry[num_ent].offset); if (cmd_meta_data == CAM_ISP_PACKET_META_DMI_COMMON) hw_entry[num_ent].flags = 0x1; hw_entry[num_ent].flags = CAM_ISP_IQ_BL; num_ent++; break; Loading Loading @@ -386,6 +382,7 @@ int cam_isp_add_command_buffers( rc); return rc; } hw_entry[num_ent].flags = CAM_ISP_IQ_BL; num_ent = prepare->num_hw_update_entries; } break; Loading @@ -408,6 +405,7 @@ int cam_isp_add_command_buffers( rc); return rc; } hw_entry[num_ent].flags = CAM_ISP_IQ_BL; num_ent = prepare->num_hw_update_entries; } break; Loading @@ -428,6 +426,7 @@ int cam_isp_add_command_buffers( "Failed in processing blobs %d", rc); return rc; } hw_entry[num_ent].flags = CAM_ISP_IQ_BL; num_ent = prepare->num_hw_update_entries; } break; Loading Loading @@ -839,6 +838,8 @@ int cam_isp_add_io_buffers( prepare->hw_update_entries[num_ent].len = io_cfg_used_bytes; prepare->hw_update_entries[num_ent].offset = kmd_buf_info->offset; prepare->hw_update_entries[num_ent].flags = CAM_ISP_IOCFG_BL; CAM_DBG(CAM_ISP, "num_ent=%d handle=0x%x, len=%u, offset=%u", num_ent, Loading Loading @@ -945,6 +946,9 @@ int cam_isp_add_reg_update( prepare->hw_update_entries[num_ent].len = reg_update_size; prepare->hw_update_entries[num_ent].offset = kmd_buf_info->offset; /* Marking reg update as IOCFG to reapply on bubble */ prepare->hw_update_entries[num_ent].flags = CAM_ISP_IOCFG_BL; CAM_DBG(CAM_ISP, "num_ent=%d handle=0x%x, len=%u, offset=%u", num_ent, Loading