Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e67252c8 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: vidc: Report asynchronous error if buf_queue fails"

parents 9c6e59ad 279da4a2
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -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);
@@ -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 = {
+2 −4
Original line number Diff line number Diff line
@@ -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);

@@ -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};
@@ -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;
+2 −0
Original line number Diff line number Diff line
@@ -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,