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

Commit 5b46d743 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: Add state checks for start streaming"

parents b22aa202 df5936a4
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -872,7 +872,7 @@ int msm_vdec_prepare_buf(struct msm_vidc_inst *inst,
		dprintk(VIDC_ERR,
			"Core %pK in bad state, ignoring prepare buf\n",
				inst->core);
		goto exit;
		return -EINVAL;
	}

	switch (b->type) {
@@ -925,7 +925,7 @@ int msm_vdec_prepare_buf(struct msm_vidc_inst *inst,
		dprintk(VIDC_ERR, "Buffer type not recognized: %d\n", b->type);
		break;
	}
exit:

	return rc;
}

@@ -1778,6 +1778,12 @@ static int msm_vdec_start_streaming(struct vb2_queue *q, unsigned int count)
		dprintk(VIDC_ERR, "%s invalid parameters\n", __func__);
		return -EINVAL;
	}

	if (inst->state == MSM_VIDC_CORE_INVALID ||
		inst->core->state == VIDC_CORE_INVALID ||
		inst->core->state == VIDC_CORE_UNINIT)
		return -EINVAL;

	hdev = inst->core->device;
	dprintk(VIDC_DBG, "Streamon called on: %d capability for inst: %pK\n",
		q->type, inst);
+8 −2
Original line number Diff line number Diff line
@@ -1905,6 +1905,12 @@ static int msm_venc_start_streaming(struct vb2_queue *q, unsigned int count)
		return -EINVAL;
	}
	inst = q->drv_priv;

	if (inst->state == MSM_VIDC_CORE_INVALID ||
		inst->core->state == VIDC_CORE_INVALID ||
		inst->core->state == VIDC_CORE_UNINIT)
		return -EINVAL;

	dprintk(VIDC_DBG, "Streamon called on: %d capability for inst: %pK\n",
		q->type, inst);
	switch (q->type) {
@@ -4429,7 +4435,7 @@ int msm_venc_prepare_buf(struct msm_vidc_inst *inst,
		dprintk(VIDC_ERR,
			"Core %pK in bad state, ignoring prepare buf\n",
				inst->core);
		goto exit;
		return -EINVAL;
	}

	switch (b->type) {
@@ -4477,7 +4483,7 @@ int msm_venc_prepare_buf(struct msm_vidc_inst *inst,
			"Buffer type not recognized: %d\n", b->type);
		break;
	}
exit:

	return rc;
}