Loading drivers/media/platform/msm/ais/cam_sensor_module/cam_csiphy/cam_csiphy_core.c +1 −1 Original line number Diff line number Diff line Loading @@ -164,7 +164,7 @@ int32_t cam_cmd_buf_parser(struct csiphy_device *csiphy_dev, struct cam_cmd_buf_desc *cmd_desc = NULL; uint32_t *cmd_buf = NULL; struct cam_csiphy_info *cam_cmd_csiphy_info = NULL; size_t len; size_t len = 0; if (!cfg_dev || !csiphy_dev) { CAM_ERR(CAM_CSIPHY, "Invalid Args"); Loading drivers/media/platform/msm/camera/cam_cdm/cam_cdm_virtual_core.c +8 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,14 @@ int cam_virtual_cdm_submit_bl(struct cam_hw_info *cdm_hw, if ((!rc) && (vaddr_ptr) && (len) && (len >= cdm_cmd->cmd[i].offset)) { if ((len - cdm_cmd->cmd[i].offset) <= cdm_cmd->cmd[i].len) { CAM_ERR(CAM_CDM, "Not enough buffer"); rc = -EINVAL; break; } CAM_DBG(CAM_CDM, "hdl=%x vaddr=%pK offset=%d cmdlen=%d:%zu", cdm_cmd->cmd[i].bl_addr.mem_handle, Loading drivers/media/platform/msm/camera/cam_core/cam_context.c +2 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,7 @@ int cam_context_handle_crm_apply_req(struct cam_context *ctx, return -EINVAL; } mutex_lock(&ctx->ctx_mutex); if (ctx->state_machine[ctx->state].crm_ops.apply_req) { rc = ctx->state_machine[ctx->state].crm_ops.apply_req(ctx, apply); Loading @@ -180,6 +181,7 @@ int cam_context_handle_crm_apply_req(struct cam_context *ctx, ctx->dev_hdl, ctx->state); rc = -EPROTO; } mutex_unlock(&ctx->ctx_mutex); return rc; } Loading drivers/media/platform/msm/camera/cam_core/cam_context_utils.c +17 −0 Original line number Diff line number Diff line Loading @@ -303,6 +303,12 @@ int32_t cam_context_config_dev_to_hw( return rc; } if ((len < sizeof(struct cam_packet)) || (cmd->offset >= (len - sizeof(struct cam_packet)))) { CAM_ERR(CAM_CTXT, "Not enough buf"); return -EINVAL; } packet = (struct cam_packet *) ((uint8_t *)packet_addr + (uint32_t)cmd->offset); Loading Loading @@ -333,6 +339,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, uintptr_t packet_addr; struct cam_packet *packet; size_t len = 0; size_t remain_len = 0; int32_t i = 0, j = 0; if (!ctx || !cmd) { Loading Loading @@ -378,6 +385,15 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, goto free_req; } remain_len = len; if ((len < sizeof(struct cam_packet)) || ((size_t)cmd->offset >= len - sizeof(struct cam_packet))) { CAM_ERR(CAM_CTXT, "invalid buff length: %zu or offset", len); rc = -EINVAL; goto free_cpu_buf; } remain_len -= (size_t)cmd->offset; packet = (struct cam_packet *) ((uint8_t *)packet_addr + (uint32_t)cmd->offset); Loading @@ -395,6 +411,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, /* preprocess the configuration */ memset(&cfg, 0, sizeof(cfg)); cfg.packet = packet; cfg.remain_len = remain_len; cfg.ctxt_to_hw_map = ctx->ctxt_to_hw_map; cfg.max_hw_update_entries = CAM_CTX_CFG_MAX; cfg.num_hw_update_entries = req->num_hw_update_entries; Loading drivers/media/platform/msm/camera/cam_core/cam_hw_mgr_intf.h +2 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ struct cam_hw_mgr_dump_pf_data { * struct cam_hw_prepare_update_args - Payload for prepare command * * @packet: CSL packet from user mode driver * @remain_len Remaining length of CPU buffer after config offset * @ctxt_to_hw_map: HW context from the acquire * @max_hw_update_entries: Maximum hardware update entries supported * @hw_update_entries: Actual hardware update configuration (returned) Loading @@ -169,6 +170,7 @@ struct cam_hw_mgr_dump_pf_data { */ struct cam_hw_prepare_update_args { struct cam_packet *packet; size_t remain_len; void *ctxt_to_hw_map; uint32_t max_hw_update_entries; struct cam_hw_update_entry *hw_update_entries; Loading Loading
drivers/media/platform/msm/ais/cam_sensor_module/cam_csiphy/cam_csiphy_core.c +1 −1 Original line number Diff line number Diff line Loading @@ -164,7 +164,7 @@ int32_t cam_cmd_buf_parser(struct csiphy_device *csiphy_dev, struct cam_cmd_buf_desc *cmd_desc = NULL; uint32_t *cmd_buf = NULL; struct cam_csiphy_info *cam_cmd_csiphy_info = NULL; size_t len; size_t len = 0; if (!cfg_dev || !csiphy_dev) { CAM_ERR(CAM_CSIPHY, "Invalid Args"); Loading
drivers/media/platform/msm/camera/cam_cdm/cam_cdm_virtual_core.c +8 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,14 @@ int cam_virtual_cdm_submit_bl(struct cam_hw_info *cdm_hw, if ((!rc) && (vaddr_ptr) && (len) && (len >= cdm_cmd->cmd[i].offset)) { if ((len - cdm_cmd->cmd[i].offset) <= cdm_cmd->cmd[i].len) { CAM_ERR(CAM_CDM, "Not enough buffer"); rc = -EINVAL; break; } CAM_DBG(CAM_CDM, "hdl=%x vaddr=%pK offset=%d cmdlen=%d:%zu", cdm_cmd->cmd[i].bl_addr.mem_handle, Loading
drivers/media/platform/msm/camera/cam_core/cam_context.c +2 −0 Original line number Diff line number Diff line Loading @@ -172,6 +172,7 @@ int cam_context_handle_crm_apply_req(struct cam_context *ctx, return -EINVAL; } mutex_lock(&ctx->ctx_mutex); if (ctx->state_machine[ctx->state].crm_ops.apply_req) { rc = ctx->state_machine[ctx->state].crm_ops.apply_req(ctx, apply); Loading @@ -180,6 +181,7 @@ int cam_context_handle_crm_apply_req(struct cam_context *ctx, ctx->dev_hdl, ctx->state); rc = -EPROTO; } mutex_unlock(&ctx->ctx_mutex); return rc; } Loading
drivers/media/platform/msm/camera/cam_core/cam_context_utils.c +17 −0 Original line number Diff line number Diff line Loading @@ -303,6 +303,12 @@ int32_t cam_context_config_dev_to_hw( return rc; } if ((len < sizeof(struct cam_packet)) || (cmd->offset >= (len - sizeof(struct cam_packet)))) { CAM_ERR(CAM_CTXT, "Not enough buf"); return -EINVAL; } packet = (struct cam_packet *) ((uint8_t *)packet_addr + (uint32_t)cmd->offset); Loading Loading @@ -333,6 +339,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, uintptr_t packet_addr; struct cam_packet *packet; size_t len = 0; size_t remain_len = 0; int32_t i = 0, j = 0; if (!ctx || !cmd) { Loading Loading @@ -378,6 +385,15 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, goto free_req; } remain_len = len; if ((len < sizeof(struct cam_packet)) || ((size_t)cmd->offset >= len - sizeof(struct cam_packet))) { CAM_ERR(CAM_CTXT, "invalid buff length: %zu or offset", len); rc = -EINVAL; goto free_cpu_buf; } remain_len -= (size_t)cmd->offset; packet = (struct cam_packet *) ((uint8_t *)packet_addr + (uint32_t)cmd->offset); Loading @@ -395,6 +411,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, /* preprocess the configuration */ memset(&cfg, 0, sizeof(cfg)); cfg.packet = packet; cfg.remain_len = remain_len; cfg.ctxt_to_hw_map = ctx->ctxt_to_hw_map; cfg.max_hw_update_entries = CAM_CTX_CFG_MAX; cfg.num_hw_update_entries = req->num_hw_update_entries; Loading
drivers/media/platform/msm/camera/cam_core/cam_hw_mgr_intf.h +2 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ struct cam_hw_mgr_dump_pf_data { * struct cam_hw_prepare_update_args - Payload for prepare command * * @packet: CSL packet from user mode driver * @remain_len Remaining length of CPU buffer after config offset * @ctxt_to_hw_map: HW context from the acquire * @max_hw_update_entries: Maximum hardware update entries supported * @hw_update_entries: Actual hardware update configuration (returned) Loading @@ -169,6 +170,7 @@ struct cam_hw_mgr_dump_pf_data { */ struct cam_hw_prepare_update_args { struct cam_packet *packet; size_t remain_len; void *ctxt_to_hw_map; uint32_t max_hw_update_entries; struct cam_hw_update_entry *hw_update_entries; Loading