Loading drivers/media/platform/msm/vidc/msm_vidc.c +12 −5 Original line number Diff line number Diff line Loading @@ -1171,14 +1171,17 @@ static void msm_vidc_buf_queue(struct vb2_buffer *vb2) mbuf = msm_comm_get_vidc_buffer(inst, vb2); if (IS_ERR_OR_NULL(mbuf)) { if (PTR_ERR(mbuf) != -EEXIST) if (PTR_ERR(mbuf) == -EEXIST) return; print_vb2_buffer(VIDC_ERR, "failed to get vidc-buf", inst, vb2); return; rc = -EINVAL; goto error; } if (!kref_get_mbuf(inst, mbuf)) { dprintk(VIDC_ERR, "%s: mbuf not found\n", __func__); return; rc = -EINVAL; goto error; } rc = msm_comm_qbuf(inst, mbuf); Loading @@ -1186,6 +1189,10 @@ static void msm_vidc_buf_queue(struct vb2_buffer *vb2) print_vidc_buffer(VIDC_ERR, "failed qbuf", inst, mbuf); kref_put_mbuf(mbuf); error: if (rc) msm_comm_generate_session_error(inst); } static const struct vb2_ops msm_vidc_vb2q_ops = { Loading drivers/media/platform/msm/vidc/msm_vidc_common.c +2 −4 Original line number Diff line number Diff line Loading @@ -70,8 +70,6 @@ const char *const mpeg_video_vidc_extradata[] = { "Extradata UBWC CR stats info", }; static void msm_comm_generate_session_error(struct msm_vidc_inst *inst); static void msm_comm_generate_sys_error(struct msm_vidc_inst *inst); static void handle_session_error(enum hal_command_response cmd, void *data); static void msm_vidc_print_running_insts(struct msm_vidc_core *core); Loading Loading @@ -5517,7 +5515,7 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst) return rc; } static void msm_comm_generate_session_error(struct msm_vidc_inst *inst) void msm_comm_generate_session_error(struct msm_vidc_inst *inst) { enum hal_command_response cmd = HAL_SESSION_ERROR; struct msm_vidc_cb_cmd_done response = {0}; Loading @@ -5532,7 +5530,7 @@ static void msm_comm_generate_session_error(struct msm_vidc_inst *inst) handle_session_error(cmd, (void *)&response); } static void msm_comm_generate_sys_error(struct msm_vidc_inst *inst) void msm_comm_generate_sys_error(struct msm_vidc_inst *inst) { struct msm_vidc_core *core; enum hal_command_response cmd = HAL_SYS_ERROR; Loading drivers/media/platform/msm/vidc/msm_vidc_common.h +2 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,8 @@ struct hal_buffer_requirements *get_buff_req_buffer( V4L2_CTRL_DRIVER_PRIV(idx)) void msm_comm_session_clean(struct msm_vidc_inst *inst); int msm_comm_kill_session(struct msm_vidc_inst *inst); void msm_comm_generate_session_error(struct msm_vidc_inst *inst); void msm_comm_generate_sys_error(struct msm_vidc_inst *inst); enum multi_stream msm_comm_get_stream_output_mode(struct msm_vidc_inst *inst); enum hal_buffer msm_comm_get_hal_output_buffer(struct msm_vidc_inst *inst); int msm_comm_smem_alloc(struct msm_vidc_inst *inst, size_t size, u32 align, Loading Loading
drivers/media/platform/msm/vidc/msm_vidc.c +12 −5 Original line number Diff line number Diff line Loading @@ -1171,14 +1171,17 @@ static void msm_vidc_buf_queue(struct vb2_buffer *vb2) mbuf = msm_comm_get_vidc_buffer(inst, vb2); if (IS_ERR_OR_NULL(mbuf)) { if (PTR_ERR(mbuf) != -EEXIST) if (PTR_ERR(mbuf) == -EEXIST) return; print_vb2_buffer(VIDC_ERR, "failed to get vidc-buf", inst, vb2); return; rc = -EINVAL; goto error; } if (!kref_get_mbuf(inst, mbuf)) { dprintk(VIDC_ERR, "%s: mbuf not found\n", __func__); return; rc = -EINVAL; goto error; } rc = msm_comm_qbuf(inst, mbuf); Loading @@ -1186,6 +1189,10 @@ static void msm_vidc_buf_queue(struct vb2_buffer *vb2) print_vidc_buffer(VIDC_ERR, "failed qbuf", inst, mbuf); kref_put_mbuf(mbuf); error: if (rc) msm_comm_generate_session_error(inst); } static const struct vb2_ops msm_vidc_vb2q_ops = { Loading
drivers/media/platform/msm/vidc/msm_vidc_common.c +2 −4 Original line number Diff line number Diff line Loading @@ -70,8 +70,6 @@ const char *const mpeg_video_vidc_extradata[] = { "Extradata UBWC CR stats info", }; static void msm_comm_generate_session_error(struct msm_vidc_inst *inst); static void msm_comm_generate_sys_error(struct msm_vidc_inst *inst); static void handle_session_error(enum hal_command_response cmd, void *data); static void msm_vidc_print_running_insts(struct msm_vidc_core *core); Loading Loading @@ -5517,7 +5515,7 @@ int msm_vidc_check_session_supported(struct msm_vidc_inst *inst) return rc; } static void msm_comm_generate_session_error(struct msm_vidc_inst *inst) void msm_comm_generate_session_error(struct msm_vidc_inst *inst) { enum hal_command_response cmd = HAL_SESSION_ERROR; struct msm_vidc_cb_cmd_done response = {0}; Loading @@ -5532,7 +5530,7 @@ static void msm_comm_generate_session_error(struct msm_vidc_inst *inst) handle_session_error(cmd, (void *)&response); } static void msm_comm_generate_sys_error(struct msm_vidc_inst *inst) void msm_comm_generate_sys_error(struct msm_vidc_inst *inst) { struct msm_vidc_core *core; enum hal_command_response cmd = HAL_SYS_ERROR; Loading
drivers/media/platform/msm/vidc/msm_vidc_common.h +2 −0 Original line number Diff line number Diff line Loading @@ -77,6 +77,8 @@ struct hal_buffer_requirements *get_buff_req_buffer( V4L2_CTRL_DRIVER_PRIV(idx)) void msm_comm_session_clean(struct msm_vidc_inst *inst); int msm_comm_kill_session(struct msm_vidc_inst *inst); void msm_comm_generate_session_error(struct msm_vidc_inst *inst); void msm_comm_generate_sys_error(struct msm_vidc_inst *inst); enum multi_stream msm_comm_get_stream_output_mode(struct msm_vidc_inst *inst); enum hal_buffer msm_comm_get_hal_output_buffer(struct msm_vidc_inst *inst); int msm_comm_smem_alloc(struct msm_vidc_inst *inst, size_t size, u32 align, Loading