Loading drivers/cam_cdm/cam_cdm_hw_core.c +5 −0 Original line number Diff line number Diff line Loading @@ -1587,6 +1587,11 @@ int cam_hw_cdm_handle_error_info( set_bit(CAM_CDM_RESET_HW_STATUS, &cdm_core->cdm_status); set_bit(CAM_CDM_FLUSH_HW_STATUS, &cdm_core->cdm_status); if (cdm_hw->hw_state == CAM_HW_STATE_POWER_DOWN) { CAM_WARN(CAM_CDM, "CDM is in power down state"); goto end; } /* First pause CDM, If it fails still proceed to dump debug info */ cam_hw_cdm_pause_core(cdm_hw, true); Loading drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.c +24 −6 Original line number Diff line number Diff line Loading @@ -81,6 +81,11 @@ static int cam_ope_mgr_get_rsc_idx(struct cam_ope_ctx *ctx_data, return rsc_idx; } static bool cam_ope_is_pending_request(struct cam_ope_ctx *ctx_data) { return !bitmap_empty(ctx_data->bitmap, CAM_CTX_REQ_MAX); } static int cam_ope_mgr_process_cmd(void *priv, void *data) { int rc; Loading @@ -96,14 +101,16 @@ static int cam_ope_mgr_process_cmd(void *priv, void *data) ctx_data = priv; task_data = (struct ope_cmd_work_data *)data; mutex_lock(&hw_mgr->hw_mgr_mutex); cdm_cmd = task_data->data; if (!cdm_cmd) { CAM_ERR(CAM_OPE, "Invalid params%pK", cdm_cmd); mutex_unlock(&hw_mgr->hw_mgr_mutex); return -EINVAL; } mutex_lock(&hw_mgr->hw_mgr_mutex); if (ctx_data->ctx_state != OPE_CTX_STATE_ACQUIRED) { mutex_unlock(&hw_mgr->hw_mgr_mutex); CAM_ERR(CAM_OPE, "ctx id :%u is not in use", Loading @@ -119,6 +126,13 @@ static int cam_ope_mgr_process_cmd(void *priv, void *data) return -EINVAL; } if (!cam_ope_is_pending_request(ctx_data)) { CAM_WARN(CAM_OPE, "no pending req, req %lld last flush %lld", task_data->req_id, ctx_data->last_flush_req); mutex_unlock(&hw_mgr->hw_mgr_mutex); return -EINVAL; } CAM_DBG(CAM_OPE, "cam_cdm_submit_bls: handle 0x%x, ctx_id %d req %d cookie %d", ctx_data->ope_cdm.cdm_handle, ctx_data->ctx_id, Loading Loading @@ -256,11 +270,6 @@ static int cam_ope_mgr_reapply_config(struct cam_ope_hw_mgr *hw_mgr, return rc; } static bool cam_ope_is_pending_request(struct cam_ope_ctx *ctx_data) { return !bitmap_empty(ctx_data->bitmap, CAM_CTX_REQ_MAX); } static int cam_get_valid_ctx_id(void) { struct cam_ope_hw_mgr *hw_mgr = ope_hw_mgr; Loading Loading @@ -698,6 +707,7 @@ static int32_t cam_ope_process_request_timer(void *priv, void *data) task = cam_req_mgr_workq_get_task(ope_hw_mgr->msg_work); if (!task) { CAM_ERR(CAM_OPE, "no empty task"); mutex_unlock(&ctx_data->ctx_mutex); return 0; } task_data = (struct ope_msg_work_data *)task->payload; Loading Loading @@ -1947,6 +1957,14 @@ static int cam_ope_mgr_process_cmd_io_buf_req(struct cam_ope_hw_mgr *hw_mgr, alignment = in_res->alignment; unpack_format = in_res->unpacker_format; pack_format = 0; if (in_io_buf->pix_pattern > PIXEL_PATTERN_CRYCBY) { CAM_ERR(CAM_OPE, "Invalid pix pattern = %u", in_io_buf->pix_pattern); return -EINVAL; } io_buf->pix_pattern = in_io_buf->pix_pattern; } else if (in_io_buf->direction == CAM_BUF_OUTPUT) { out_res = &ctx_data->ope_acquire.out_res[rsc_idx]; Loading drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.h +1 −0 Original line number Diff line number Diff line Loading @@ -363,6 +363,7 @@ struct ope_io_buf { uint32_t format; uint32_t fence; uint32_t num_planes; uint32_t pix_pattern; uint32_t num_stripes[OPE_MAX_PLANES]; struct ope_stripe_io s_io[OPE_MAX_PLANES][OPE_MAX_STRIPES]; }; Loading drivers/cam_ope/ope_hw_mgr/ope_hw/bus_rd/ope_bus_rd.c +1 −1 Original line number Diff line number Diff line Loading @@ -244,7 +244,7 @@ static uint32_t *cam_ope_bus_rd_update(struct ope_hw *ope_hw_info, temp = 0; temp |= stripe_io->s_location & rd_res_val_client->stripe_location_mask; temp |= (io_port_info->pixel_pattern[rsc_type] & temp |= (io_buf->pix_pattern & rd_res_val_client->pix_pattern_mask) << rd_res_val_client->pix_pattern_shift; temp_reg[count++] = temp; Loading include/uapi/media/cam_ope.h +2 −2 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ struct ope_stripe_info { * @direction: Direction of a buffer of a port(Input/Output) * @resource_type: Port type * @num_planes: Number of planes for a port * @reserved: Reserved * @pix_pattern: Pixel pattern for raw input * @num_stripes: Stripes per plane * @mem_handle: Memhandles of each Input/Output Port * @plane_offset: Offsets of planes Loading @@ -120,7 +120,7 @@ struct ope_io_buf_info { uint32_t direction; uint32_t resource_type; uint32_t num_planes; uint32_t reserved; uint32_t pix_pattern; uint32_t num_stripes[OPE_MAX_PLANES]; uint32_t mem_handle[OPE_MAX_PLANES]; uint32_t plane_offset[OPE_MAX_PLANES]; Loading Loading
drivers/cam_cdm/cam_cdm_hw_core.c +5 −0 Original line number Diff line number Diff line Loading @@ -1587,6 +1587,11 @@ int cam_hw_cdm_handle_error_info( set_bit(CAM_CDM_RESET_HW_STATUS, &cdm_core->cdm_status); set_bit(CAM_CDM_FLUSH_HW_STATUS, &cdm_core->cdm_status); if (cdm_hw->hw_state == CAM_HW_STATE_POWER_DOWN) { CAM_WARN(CAM_CDM, "CDM is in power down state"); goto end; } /* First pause CDM, If it fails still proceed to dump debug info */ cam_hw_cdm_pause_core(cdm_hw, true); Loading
drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.c +24 −6 Original line number Diff line number Diff line Loading @@ -81,6 +81,11 @@ static int cam_ope_mgr_get_rsc_idx(struct cam_ope_ctx *ctx_data, return rsc_idx; } static bool cam_ope_is_pending_request(struct cam_ope_ctx *ctx_data) { return !bitmap_empty(ctx_data->bitmap, CAM_CTX_REQ_MAX); } static int cam_ope_mgr_process_cmd(void *priv, void *data) { int rc; Loading @@ -96,14 +101,16 @@ static int cam_ope_mgr_process_cmd(void *priv, void *data) ctx_data = priv; task_data = (struct ope_cmd_work_data *)data; mutex_lock(&hw_mgr->hw_mgr_mutex); cdm_cmd = task_data->data; if (!cdm_cmd) { CAM_ERR(CAM_OPE, "Invalid params%pK", cdm_cmd); mutex_unlock(&hw_mgr->hw_mgr_mutex); return -EINVAL; } mutex_lock(&hw_mgr->hw_mgr_mutex); if (ctx_data->ctx_state != OPE_CTX_STATE_ACQUIRED) { mutex_unlock(&hw_mgr->hw_mgr_mutex); CAM_ERR(CAM_OPE, "ctx id :%u is not in use", Loading @@ -119,6 +126,13 @@ static int cam_ope_mgr_process_cmd(void *priv, void *data) return -EINVAL; } if (!cam_ope_is_pending_request(ctx_data)) { CAM_WARN(CAM_OPE, "no pending req, req %lld last flush %lld", task_data->req_id, ctx_data->last_flush_req); mutex_unlock(&hw_mgr->hw_mgr_mutex); return -EINVAL; } CAM_DBG(CAM_OPE, "cam_cdm_submit_bls: handle 0x%x, ctx_id %d req %d cookie %d", ctx_data->ope_cdm.cdm_handle, ctx_data->ctx_id, Loading Loading @@ -256,11 +270,6 @@ static int cam_ope_mgr_reapply_config(struct cam_ope_hw_mgr *hw_mgr, return rc; } static bool cam_ope_is_pending_request(struct cam_ope_ctx *ctx_data) { return !bitmap_empty(ctx_data->bitmap, CAM_CTX_REQ_MAX); } static int cam_get_valid_ctx_id(void) { struct cam_ope_hw_mgr *hw_mgr = ope_hw_mgr; Loading Loading @@ -698,6 +707,7 @@ static int32_t cam_ope_process_request_timer(void *priv, void *data) task = cam_req_mgr_workq_get_task(ope_hw_mgr->msg_work); if (!task) { CAM_ERR(CAM_OPE, "no empty task"); mutex_unlock(&ctx_data->ctx_mutex); return 0; } task_data = (struct ope_msg_work_data *)task->payload; Loading Loading @@ -1947,6 +1957,14 @@ static int cam_ope_mgr_process_cmd_io_buf_req(struct cam_ope_hw_mgr *hw_mgr, alignment = in_res->alignment; unpack_format = in_res->unpacker_format; pack_format = 0; if (in_io_buf->pix_pattern > PIXEL_PATTERN_CRYCBY) { CAM_ERR(CAM_OPE, "Invalid pix pattern = %u", in_io_buf->pix_pattern); return -EINVAL; } io_buf->pix_pattern = in_io_buf->pix_pattern; } else if (in_io_buf->direction == CAM_BUF_OUTPUT) { out_res = &ctx_data->ope_acquire.out_res[rsc_idx]; Loading
drivers/cam_ope/ope_hw_mgr/cam_ope_hw_mgr.h +1 −0 Original line number Diff line number Diff line Loading @@ -363,6 +363,7 @@ struct ope_io_buf { uint32_t format; uint32_t fence; uint32_t num_planes; uint32_t pix_pattern; uint32_t num_stripes[OPE_MAX_PLANES]; struct ope_stripe_io s_io[OPE_MAX_PLANES][OPE_MAX_STRIPES]; }; Loading
drivers/cam_ope/ope_hw_mgr/ope_hw/bus_rd/ope_bus_rd.c +1 −1 Original line number Diff line number Diff line Loading @@ -244,7 +244,7 @@ static uint32_t *cam_ope_bus_rd_update(struct ope_hw *ope_hw_info, temp = 0; temp |= stripe_io->s_location & rd_res_val_client->stripe_location_mask; temp |= (io_port_info->pixel_pattern[rsc_type] & temp |= (io_buf->pix_pattern & rd_res_val_client->pix_pattern_mask) << rd_res_val_client->pix_pattern_shift; temp_reg[count++] = temp; Loading
include/uapi/media/cam_ope.h +2 −2 Original line number Diff line number Diff line Loading @@ -104,7 +104,7 @@ struct ope_stripe_info { * @direction: Direction of a buffer of a port(Input/Output) * @resource_type: Port type * @num_planes: Number of planes for a port * @reserved: Reserved * @pix_pattern: Pixel pattern for raw input * @num_stripes: Stripes per plane * @mem_handle: Memhandles of each Input/Output Port * @plane_offset: Offsets of planes Loading @@ -120,7 +120,7 @@ struct ope_io_buf_info { uint32_t direction; uint32_t resource_type; uint32_t num_planes; uint32_t reserved; uint32_t pix_pattern; uint32_t num_stripes[OPE_MAX_PLANES]; uint32_t mem_handle[OPE_MAX_PLANES]; uint32_t plane_offset[OPE_MAX_PLANES]; Loading