Loading drivers/media/platform/msm/camera/cam_core/cam_context_utils.c +15 −13 Original line number Diff line number Diff line Loading @@ -337,15 +337,13 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, if (!ctx || !cmd) { CAM_ERR(CAM_CTXT, "Invalid input params %pK %pK", ctx, cmd); rc = -EINVAL; goto end; return -EINVAL; } if (!ctx->hw_mgr_intf) { CAM_ERR(CAM_CTXT, "[%s][%d] HW interface is not ready", ctx->dev_name, ctx->ctx_id); rc = -EFAULT; goto end; return -EFAULT; } rc = cam_context_validate_thread(); if (rc) Loading @@ -362,8 +360,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, if (!req) { CAM_ERR(CAM_CTXT, "[%s][%d] No more request obj free", ctx->dev_name, ctx->ctx_id); rc = -ENOMEM; goto end; return -ENOMEM; } memset(req, 0, sizeof(*req)); Loading @@ -389,7 +386,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, "request %lld has been flushed, reject packet", packet->header.request_id); rc = -EINVAL; goto free_req; goto free_cpu_buf; } if (packet->header.request_id > ctx->last_flush_req) Loading @@ -415,7 +412,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, "[%s][%d] Prepare config packet failed in HW layer", ctx->dev_name, ctx->ctx_id); rc = -EFAULT; goto free_req; goto free_cpu_buf; } req->num_hw_update_entries = cfg.num_hw_update_entries; req->num_out_map_entries = cfg.num_out_map_entries; Loading Loading @@ -466,30 +463,35 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, req->request_id); cam_context_putref(ctx); goto put_ref; } CAM_DBG(CAM_CTXT, "register in fence cb: %d ret = %d", req->in_map_entries[j].sync_id, rc); } goto end; } if (cam_mem_put_cpu_buf((int32_t) cmd->packet_handle)) CAM_WARN(CAM_CTXT, "[%s][%d] Can not put packet address", ctx->dev_name, ctx->ctx_id); return rc; put_ref: for (--i; i >= 0; i--) { rc = cam_sync_put_obj_ref(req->out_map_entries[i].sync_id); if (rc) if (cam_sync_put_obj_ref(req->out_map_entries[i].sync_id)) CAM_ERR(CAM_CTXT, "Failed to put ref of fence %d", req->out_map_entries[i].sync_id); } free_cpu_buf: if (cam_mem_put_cpu_buf((int32_t) cmd->packet_handle)) CAM_WARN(CAM_CTXT, "[%s][%d] Can not put packet address", ctx->dev_name, ctx->ctx_id); free_req: spin_lock(&ctx->lock); list_add_tail(&req->list, &ctx->free_req_list); req->ctx = NULL; spin_unlock(&ctx->lock); end: return rc; } Loading drivers/media/platform/msm/camera/cam_fd/fd_hw_mgr/cam_fd_hw_mgr.c +25 −4 Original line number Diff line number Diff line Loading @@ -534,7 +534,8 @@ static int cam_fd_mgr_util_prepare_io_buf_info(int32_t iommu_hdl, struct cam_fd_hw_io_buffer *output_buf, uint32_t io_buf_size) { int rc = -EINVAL; uint32_t i, j, plane, num_out_buf, num_in_buf; uint32_t plane, num_out_buf, num_in_buf; int i, j; struct cam_buf_io_cfg *io_cfg; dma_addr_t io_addr[CAM_PACKET_MAX_PLANES]; uintptr_t cpu_addr[CAM_PACKET_MAX_PLANES]; Loading Loading @@ -606,7 +607,7 @@ static int cam_fd_mgr_util_prepare_io_buf_info(int32_t iommu_hdl, io_cfg[i].direction, io_cfg[i].resource_type, plane, rc); return rc; goto rel_cpu_buf; } cpu_addr[plane] += io_cfg[i].offsets[plane]; Loading Loading @@ -656,14 +657,34 @@ static int cam_fd_mgr_util_prepare_io_buf_info(int32_t iommu_hdl, default: CAM_ERR(CAM_FD, "Unsupported io direction %d", io_cfg[i].direction); return -EINVAL; rc = -EINVAL; break; } for (j = 0; j < plane; j++) { if (need_cpu_map) { if (cam_mem_put_cpu_buf( io_cfg[i].mem_handle[j])) CAM_WARN(CAM_FD, "Invalid cpu buf %d %d %d %d", io_cfg[i].direction, io_cfg[i].resource_type, j); } } } prepare->num_in_map_entries = num_in_buf; prepare->num_out_map_entries = num_out_buf; return rc; return 0; rel_cpu_buf: for (j = plane - 1; j >= 0; j--) { if (cam_mem_put_cpu_buf(io_cfg[i].mem_handle[j])) CAM_WARN(CAM_FD, "Fail to put cpu buf %d %d %d", io_cfg[i].direction, io_cfg[i].resource_type, j); } return rc; } static int cam_fd_mgr_util_prepare_hw_update_entries( Loading drivers/media/platform/msm/camera/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c +41 −9 Original line number Diff line number Diff line Loading @@ -3333,12 +3333,32 @@ static int cam_icp_mgr_pkt_validation(struct cam_packet *packet) return 0; } static int cam_icp_mgr_put_cmd_buf(struct cam_packet *packet) { int i = 0; struct cam_cmd_buf_desc *cmd_desc = NULL; cmd_desc = (struct cam_cmd_buf_desc *) ((uint32_t *) &packet->payload + packet->cmd_buf_offset/4); for (i = 0; i < packet->num_cmd_buf; i++) { if (cmd_desc[i].type == CAM_CMD_BUF_FW) { if (cam_mem_put_cpu_buf(cmd_desc[i].mem_handle)) CAM_WARN(CAM_ICP, "put cmd buf failed: 0x%x", cmd_desc[i].mem_handle); } } return 0; } static int cam_icp_mgr_process_cmd_desc(struct cam_icp_hw_mgr *hw_mgr, struct cam_packet *packet, struct cam_icp_hw_ctx_data *ctx_data, uint32_t *fw_cmd_buf_iova_addr) { int rc = 0; int i, j, k; int num_cmd_buf = 0; uint64_t addr; size_t len; struct cam_cmd_buf_desc *cmd_desc = NULL; Loading @@ -3352,35 +3372,34 @@ static int cam_icp_mgr_process_cmd_desc(struct cam_icp_hw_mgr *hw_mgr, ((uint32_t *) &packet->payload + packet->cmd_buf_offset/4); *fw_cmd_buf_iova_addr = 0; for (i = 0; i < packet->num_cmd_buf; i++) { for (i = 0; i < packet->num_cmd_buf; i++, num_cmd_buf++) { if (cmd_desc[i].type == CAM_CMD_BUF_FW) { rc = cam_mem_get_io_buf(cmd_desc[i].mem_handle, hw_mgr->iommu_hdl, &addr, &len); if (rc) { CAM_ERR(CAM_ICP, "get cmd buf failed %x", hw_mgr->iommu_hdl); return rc; num_cmd_buf = (num_cmd_buf > 0) ? num_cmd_buf-- : 0; goto rel_cmd_buf; } *fw_cmd_buf_iova_addr = addr; *fw_cmd_buf_iova_addr = (*fw_cmd_buf_iova_addr + cmd_desc[i].offset); rc = cam_mem_get_cpu_buf(cmd_desc[i].mem_handle, &cpu_addr, &len); if (rc) { if (rc || !cpu_addr) { CAM_ERR(CAM_ICP, "get cmd buf failed %x", hw_mgr->iommu_hdl); *fw_cmd_buf_iova_addr = 0; return rc; num_cmd_buf = (num_cmd_buf > 0) ? num_cmd_buf-- : 0; goto rel_cmd_buf; } cpu_addr = cpu_addr + cmd_desc[i].offset; } } if (!cpu_addr) { CAM_ERR(CAM_ICP, "Invalid cpu addr"); return -EINVAL; } if (ctx_data->icp_dev_acquire_info->dev_type != CAM_ICP_RES_TYPE_BPS) { CAM_DBG(CAM_ICP, "cpu addr = %zx", cpu_addr); Loading Loading @@ -3424,6 +3443,18 @@ static int cam_icp_mgr_process_cmd_desc(struct cam_icp_hw_mgr *hw_mgr, } } return rc; rel_cmd_buf: for (i = num_cmd_buf; i >= 0; i--) { if (cmd_desc[i].type == CAM_CMD_BUF_FW) { if (cam_mem_put_cpu_buf(cmd_desc[i].mem_handle)) { CAM_WARN(CAM_ICP, "put cmd buf failed 0x%x", cmd_desc[i].mem_handle); } } } return rc; } Loading Loading @@ -3994,6 +4025,7 @@ static int cam_icp_mgr_prepare_hw_update(void *hw_mgr_priv, CAM_DBG(CAM_ICP, "X: req id = %lld ctx_id = %u", packet->header.request_id, ctx_data->ctx_id); cam_icp_mgr_put_cmd_buf(packet); mutex_unlock(&ctx_data->ctx_mutex); return rc; } Loading drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c +20 −7 Original line number Diff line number Diff line Loading @@ -146,9 +146,16 @@ static void cam_isp_ctx_dump_req(struct cam_isp_ctx_req *req_isp) CAM_ERR(CAM_ISP, "Invalid len %lld buf_start-end=%d", len, (buf_end - buf_start + 1)); if (cam_mem_put_cpu_buf(req_isp->cfg[i].handle)) CAM_WARN(CAM_ISP, "Failed to put cpu buf: 0x%x", req_isp->cfg[i].handle); continue; } cam_cdm_util_dump_cmd_buf(buf_start, buf_end); if (cam_mem_put_cpu_buf(req_isp->cfg[i].handle)) CAM_WARN(CAM_ISP, "Failed to put cpu buf: 0x%x", req_isp->cfg[i].handle); } } } Loading Loading @@ -2165,8 +2172,7 @@ static int __cam_isp_ctx_config_dev_in_top_state( if (!req) { CAM_ERR(CAM_ISP, "No more request obj free"); rc = -ENOMEM; goto end; return -ENOMEM; } req_isp = (struct cam_isp_ctx_req *) req->req_priv; Loading Loading @@ -2197,7 +2203,7 @@ static int __cam_isp_ctx_config_dev_in_top_state( "request %lld has been flushed, reject packet", packet->header.request_id); rc = -EINVAL; goto free_req; goto free_cpu_buf; } /* preprocess the configuration */ Loading @@ -2220,7 +2226,7 @@ static int __cam_isp_ctx_config_dev_in_top_state( if (rc != 0) { CAM_ERR(CAM_ISP, "Prepare config packet failed in HW layer"); rc = -EFAULT; goto free_req; goto free_cpu_buf; } req_isp->num_cfg = cfg.num_hw_update_entries; req_isp->num_fence_map_out = cfg.num_out_map_entries; Loading Loading @@ -2281,6 +2287,10 @@ static int __cam_isp_ctx_config_dev_in_top_state( if (rc) goto put_ref; if (cam_mem_put_cpu_buf((int32_t) cmd->packet_handle)) CAM_WARN(CAM_ISP, "Can not put packet address : 0x%x", cmd->packet_handle); CAM_DBG(CAM_REQ, "Preprocessing Config req_id %lld successful on ctx %u", req->request_id, ctx->ctx_id); Loading @@ -2289,16 +2299,19 @@ static int __cam_isp_ctx_config_dev_in_top_state( put_ref: for (--i; i >= 0; i--) { rc = cam_sync_put_obj_ref(req_isp->fence_map_out[i].sync_id); if (rc) if (cam_sync_put_obj_ref(req_isp->fence_map_out[i].sync_id)) CAM_ERR(CAM_CTXT, "Failed to put ref of fence %d", req_isp->fence_map_out[i].sync_id); } free_cpu_buf: if (cam_mem_put_cpu_buf((int32_t) cmd->packet_handle)) CAM_WARN(CAM_ISP, "Can not put packet address: 0x%x", cmd->packet_handle); free_req: spin_lock_bh(&ctx->lock); list_add_tail(&req->list, &ctx->free_req_list); spin_unlock_bh(&ctx->lock); end: return rc; } Loading drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/hw_utils/cam_isp_packet_parser.c +8 −2 Original line number Diff line number Diff line Loading @@ -126,7 +126,8 @@ static int cam_isp_update_dual_config( CAM_ERR(CAM_UTIL, "failed update for i:%d > size_isp_out:%d", i, size_isp_out); return -EINVAL; rc = -EINVAL; goto put_buf; } hw_mgr_res = &res_list_isp_out[i]; Loading Loading @@ -161,10 +162,15 @@ static int cam_isp_update_dual_config( &dual_isp_update_args, sizeof(struct cam_isp_hw_dual_isp_update_args)); if (rc) return rc; goto put_buf; } } put_buf: if (cam_mem_put_cpu_buf(cmd_desc->mem_handle)) CAM_WARN(CAM_UTIL, "Failed to put buf: 0x%x", cmd_desc->mem_handle); return rc; } Loading Loading
drivers/media/platform/msm/camera/cam_core/cam_context_utils.c +15 −13 Original line number Diff line number Diff line Loading @@ -337,15 +337,13 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, if (!ctx || !cmd) { CAM_ERR(CAM_CTXT, "Invalid input params %pK %pK", ctx, cmd); rc = -EINVAL; goto end; return -EINVAL; } if (!ctx->hw_mgr_intf) { CAM_ERR(CAM_CTXT, "[%s][%d] HW interface is not ready", ctx->dev_name, ctx->ctx_id); rc = -EFAULT; goto end; return -EFAULT; } rc = cam_context_validate_thread(); if (rc) Loading @@ -362,8 +360,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, if (!req) { CAM_ERR(CAM_CTXT, "[%s][%d] No more request obj free", ctx->dev_name, ctx->ctx_id); rc = -ENOMEM; goto end; return -ENOMEM; } memset(req, 0, sizeof(*req)); Loading @@ -389,7 +386,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, "request %lld has been flushed, reject packet", packet->header.request_id); rc = -EINVAL; goto free_req; goto free_cpu_buf; } if (packet->header.request_id > ctx->last_flush_req) Loading @@ -415,7 +412,7 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, "[%s][%d] Prepare config packet failed in HW layer", ctx->dev_name, ctx->ctx_id); rc = -EFAULT; goto free_req; goto free_cpu_buf; } req->num_hw_update_entries = cfg.num_hw_update_entries; req->num_out_map_entries = cfg.num_out_map_entries; Loading Loading @@ -466,30 +463,35 @@ int32_t cam_context_prepare_dev_to_hw(struct cam_context *ctx, req->request_id); cam_context_putref(ctx); goto put_ref; } CAM_DBG(CAM_CTXT, "register in fence cb: %d ret = %d", req->in_map_entries[j].sync_id, rc); } goto end; } if (cam_mem_put_cpu_buf((int32_t) cmd->packet_handle)) CAM_WARN(CAM_CTXT, "[%s][%d] Can not put packet address", ctx->dev_name, ctx->ctx_id); return rc; put_ref: for (--i; i >= 0; i--) { rc = cam_sync_put_obj_ref(req->out_map_entries[i].sync_id); if (rc) if (cam_sync_put_obj_ref(req->out_map_entries[i].sync_id)) CAM_ERR(CAM_CTXT, "Failed to put ref of fence %d", req->out_map_entries[i].sync_id); } free_cpu_buf: if (cam_mem_put_cpu_buf((int32_t) cmd->packet_handle)) CAM_WARN(CAM_CTXT, "[%s][%d] Can not put packet address", ctx->dev_name, ctx->ctx_id); free_req: spin_lock(&ctx->lock); list_add_tail(&req->list, &ctx->free_req_list); req->ctx = NULL; spin_unlock(&ctx->lock); end: return rc; } Loading
drivers/media/platform/msm/camera/cam_fd/fd_hw_mgr/cam_fd_hw_mgr.c +25 −4 Original line number Diff line number Diff line Loading @@ -534,7 +534,8 @@ static int cam_fd_mgr_util_prepare_io_buf_info(int32_t iommu_hdl, struct cam_fd_hw_io_buffer *output_buf, uint32_t io_buf_size) { int rc = -EINVAL; uint32_t i, j, plane, num_out_buf, num_in_buf; uint32_t plane, num_out_buf, num_in_buf; int i, j; struct cam_buf_io_cfg *io_cfg; dma_addr_t io_addr[CAM_PACKET_MAX_PLANES]; uintptr_t cpu_addr[CAM_PACKET_MAX_PLANES]; Loading Loading @@ -606,7 +607,7 @@ static int cam_fd_mgr_util_prepare_io_buf_info(int32_t iommu_hdl, io_cfg[i].direction, io_cfg[i].resource_type, plane, rc); return rc; goto rel_cpu_buf; } cpu_addr[plane] += io_cfg[i].offsets[plane]; Loading Loading @@ -656,14 +657,34 @@ static int cam_fd_mgr_util_prepare_io_buf_info(int32_t iommu_hdl, default: CAM_ERR(CAM_FD, "Unsupported io direction %d", io_cfg[i].direction); return -EINVAL; rc = -EINVAL; break; } for (j = 0; j < plane; j++) { if (need_cpu_map) { if (cam_mem_put_cpu_buf( io_cfg[i].mem_handle[j])) CAM_WARN(CAM_FD, "Invalid cpu buf %d %d %d %d", io_cfg[i].direction, io_cfg[i].resource_type, j); } } } prepare->num_in_map_entries = num_in_buf; prepare->num_out_map_entries = num_out_buf; return rc; return 0; rel_cpu_buf: for (j = plane - 1; j >= 0; j--) { if (cam_mem_put_cpu_buf(io_cfg[i].mem_handle[j])) CAM_WARN(CAM_FD, "Fail to put cpu buf %d %d %d", io_cfg[i].direction, io_cfg[i].resource_type, j); } return rc; } static int cam_fd_mgr_util_prepare_hw_update_entries( Loading
drivers/media/platform/msm/camera/cam_icp/icp_hw/icp_hw_mgr/cam_icp_hw_mgr.c +41 −9 Original line number Diff line number Diff line Loading @@ -3333,12 +3333,32 @@ static int cam_icp_mgr_pkt_validation(struct cam_packet *packet) return 0; } static int cam_icp_mgr_put_cmd_buf(struct cam_packet *packet) { int i = 0; struct cam_cmd_buf_desc *cmd_desc = NULL; cmd_desc = (struct cam_cmd_buf_desc *) ((uint32_t *) &packet->payload + packet->cmd_buf_offset/4); for (i = 0; i < packet->num_cmd_buf; i++) { if (cmd_desc[i].type == CAM_CMD_BUF_FW) { if (cam_mem_put_cpu_buf(cmd_desc[i].mem_handle)) CAM_WARN(CAM_ICP, "put cmd buf failed: 0x%x", cmd_desc[i].mem_handle); } } return 0; } static int cam_icp_mgr_process_cmd_desc(struct cam_icp_hw_mgr *hw_mgr, struct cam_packet *packet, struct cam_icp_hw_ctx_data *ctx_data, uint32_t *fw_cmd_buf_iova_addr) { int rc = 0; int i, j, k; int num_cmd_buf = 0; uint64_t addr; size_t len; struct cam_cmd_buf_desc *cmd_desc = NULL; Loading @@ -3352,35 +3372,34 @@ static int cam_icp_mgr_process_cmd_desc(struct cam_icp_hw_mgr *hw_mgr, ((uint32_t *) &packet->payload + packet->cmd_buf_offset/4); *fw_cmd_buf_iova_addr = 0; for (i = 0; i < packet->num_cmd_buf; i++) { for (i = 0; i < packet->num_cmd_buf; i++, num_cmd_buf++) { if (cmd_desc[i].type == CAM_CMD_BUF_FW) { rc = cam_mem_get_io_buf(cmd_desc[i].mem_handle, hw_mgr->iommu_hdl, &addr, &len); if (rc) { CAM_ERR(CAM_ICP, "get cmd buf failed %x", hw_mgr->iommu_hdl); return rc; num_cmd_buf = (num_cmd_buf > 0) ? num_cmd_buf-- : 0; goto rel_cmd_buf; } *fw_cmd_buf_iova_addr = addr; *fw_cmd_buf_iova_addr = (*fw_cmd_buf_iova_addr + cmd_desc[i].offset); rc = cam_mem_get_cpu_buf(cmd_desc[i].mem_handle, &cpu_addr, &len); if (rc) { if (rc || !cpu_addr) { CAM_ERR(CAM_ICP, "get cmd buf failed %x", hw_mgr->iommu_hdl); *fw_cmd_buf_iova_addr = 0; return rc; num_cmd_buf = (num_cmd_buf > 0) ? num_cmd_buf-- : 0; goto rel_cmd_buf; } cpu_addr = cpu_addr + cmd_desc[i].offset; } } if (!cpu_addr) { CAM_ERR(CAM_ICP, "Invalid cpu addr"); return -EINVAL; } if (ctx_data->icp_dev_acquire_info->dev_type != CAM_ICP_RES_TYPE_BPS) { CAM_DBG(CAM_ICP, "cpu addr = %zx", cpu_addr); Loading Loading @@ -3424,6 +3443,18 @@ static int cam_icp_mgr_process_cmd_desc(struct cam_icp_hw_mgr *hw_mgr, } } return rc; rel_cmd_buf: for (i = num_cmd_buf; i >= 0; i--) { if (cmd_desc[i].type == CAM_CMD_BUF_FW) { if (cam_mem_put_cpu_buf(cmd_desc[i].mem_handle)) { CAM_WARN(CAM_ICP, "put cmd buf failed 0x%x", cmd_desc[i].mem_handle); } } } return rc; } Loading Loading @@ -3994,6 +4025,7 @@ static int cam_icp_mgr_prepare_hw_update(void *hw_mgr_priv, CAM_DBG(CAM_ICP, "X: req id = %lld ctx_id = %u", packet->header.request_id, ctx_data->ctx_id); cam_icp_mgr_put_cmd_buf(packet); mutex_unlock(&ctx_data->ctx_mutex); return rc; } Loading
drivers/media/platform/msm/camera/cam_isp/cam_isp_context.c +20 −7 Original line number Diff line number Diff line Loading @@ -146,9 +146,16 @@ static void cam_isp_ctx_dump_req(struct cam_isp_ctx_req *req_isp) CAM_ERR(CAM_ISP, "Invalid len %lld buf_start-end=%d", len, (buf_end - buf_start + 1)); if (cam_mem_put_cpu_buf(req_isp->cfg[i].handle)) CAM_WARN(CAM_ISP, "Failed to put cpu buf: 0x%x", req_isp->cfg[i].handle); continue; } cam_cdm_util_dump_cmd_buf(buf_start, buf_end); if (cam_mem_put_cpu_buf(req_isp->cfg[i].handle)) CAM_WARN(CAM_ISP, "Failed to put cpu buf: 0x%x", req_isp->cfg[i].handle); } } } Loading Loading @@ -2165,8 +2172,7 @@ static int __cam_isp_ctx_config_dev_in_top_state( if (!req) { CAM_ERR(CAM_ISP, "No more request obj free"); rc = -ENOMEM; goto end; return -ENOMEM; } req_isp = (struct cam_isp_ctx_req *) req->req_priv; Loading Loading @@ -2197,7 +2203,7 @@ static int __cam_isp_ctx_config_dev_in_top_state( "request %lld has been flushed, reject packet", packet->header.request_id); rc = -EINVAL; goto free_req; goto free_cpu_buf; } /* preprocess the configuration */ Loading @@ -2220,7 +2226,7 @@ static int __cam_isp_ctx_config_dev_in_top_state( if (rc != 0) { CAM_ERR(CAM_ISP, "Prepare config packet failed in HW layer"); rc = -EFAULT; goto free_req; goto free_cpu_buf; } req_isp->num_cfg = cfg.num_hw_update_entries; req_isp->num_fence_map_out = cfg.num_out_map_entries; Loading Loading @@ -2281,6 +2287,10 @@ static int __cam_isp_ctx_config_dev_in_top_state( if (rc) goto put_ref; if (cam_mem_put_cpu_buf((int32_t) cmd->packet_handle)) CAM_WARN(CAM_ISP, "Can not put packet address : 0x%x", cmd->packet_handle); CAM_DBG(CAM_REQ, "Preprocessing Config req_id %lld successful on ctx %u", req->request_id, ctx->ctx_id); Loading @@ -2289,16 +2299,19 @@ static int __cam_isp_ctx_config_dev_in_top_state( put_ref: for (--i; i >= 0; i--) { rc = cam_sync_put_obj_ref(req_isp->fence_map_out[i].sync_id); if (rc) if (cam_sync_put_obj_ref(req_isp->fence_map_out[i].sync_id)) CAM_ERR(CAM_CTXT, "Failed to put ref of fence %d", req_isp->fence_map_out[i].sync_id); } free_cpu_buf: if (cam_mem_put_cpu_buf((int32_t) cmd->packet_handle)) CAM_WARN(CAM_ISP, "Can not put packet address: 0x%x", cmd->packet_handle); free_req: spin_lock_bh(&ctx->lock); list_add_tail(&req->list, &ctx->free_req_list); spin_unlock_bh(&ctx->lock); end: return rc; } Loading
drivers/media/platform/msm/camera/cam_isp/isp_hw_mgr/hw_utils/cam_isp_packet_parser.c +8 −2 Original line number Diff line number Diff line Loading @@ -126,7 +126,8 @@ static int cam_isp_update_dual_config( CAM_ERR(CAM_UTIL, "failed update for i:%d > size_isp_out:%d", i, size_isp_out); return -EINVAL; rc = -EINVAL; goto put_buf; } hw_mgr_res = &res_list_isp_out[i]; Loading Loading @@ -161,10 +162,15 @@ static int cam_isp_update_dual_config( &dual_isp_update_args, sizeof(struct cam_isp_hw_dual_isp_update_args)); if (rc) return rc; goto put_buf; } } put_buf: if (cam_mem_put_cpu_buf(cmd_desc->mem_handle)) CAM_WARN(CAM_UTIL, "Failed to put buf: 0x%x", cmd_desc->mem_handle); return rc; } Loading