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

Commit 4d3e6927 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: Return only active state VBs during flush"

parents 650bcc06 7203cff5
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -1781,8 +1781,10 @@ static int msm_vdec_start_streaming(struct vb2_queue *q, unsigned int count)

	if (inst->state == MSM_VIDC_CORE_INVALID ||
		inst->core->state == VIDC_CORE_INVALID ||
		inst->core->state == VIDC_CORE_UNINIT)
		return -EINVAL;
		inst->core->state == VIDC_CORE_UNINIT) {
		rc = -EINVAL;
		goto stream_start_failed;
	}

	hdev = inst->core->device;
	dprintk(VIDC_DBG, "Streamon called on: %d capability for inst: %pK\n",
+4 −2
Original line number Diff line number Diff line
@@ -1908,8 +1908,10 @@ static int msm_venc_start_streaming(struct vb2_queue *q, unsigned int count)

	if (inst->state == MSM_VIDC_CORE_INVALID ||
		inst->core->state == VIDC_CORE_INVALID ||
		inst->core->state == VIDC_CORE_UNINIT)
		return -EINVAL;
		inst->core->state == VIDC_CORE_UNINIT) {
		rc = -EINVAL;
		goto stream_start_failed;
	}

	dprintk(VIDC_DBG, "Streamon called on: %d capability for inst: %pK\n",
		q->type, inst);
+9 −4
Original line number Diff line number Diff line
@@ -4524,10 +4524,15 @@ static void msm_comm_flush_in_invalid_state(struct msm_vidc_inst *inst)
			struct vb2_buffer *vb = container_of(ptr,
					struct vb2_buffer, queued_entry);

			if (vb->state == VB2_BUF_STATE_ACTIVE) {
				vb->planes[0].bytesused = 0;
				vb->planes[0].data_offset = 0;

				vb2_buffer_done(vb, VB2_BUF_STATE_DONE);
			} else {
				dprintk(VIDC_WARN,
					"%s VB is in state %d not in ACTIVE state\n"
					, __func__, vb->state);
			}
		}
		mutex_unlock(&inst->bufq[port].lock);
	}