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

Commit 4b449078 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: Do a proper clean-up in case of session abort"

parents 1a0b5a7c a91776ae
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -847,6 +847,14 @@ int msm_vdec_streamoff(struct msm_vidc_inst *inst, enum v4l2_buf_type i)
		return -EINVAL;
	}
	dprintk(VIDC_DBG, "Calling streamoff\n");

	if (!inst->in_reconfig) {
		rc = msm_comm_try_state(inst, MSM_VIDC_RELEASE_RESOURCES_DONE);
		if (rc)
			dprintk(VIDC_ERR,
			"Failed to move inst: %pK to res done state\n", inst);
	}

	mutex_lock(&q->lock);
	rc = vb2_streamoff(&q->vb2_bufq, i);
	mutex_unlock(&q->lock);
+6 −0
Original line number Diff line number Diff line
@@ -4620,6 +4620,12 @@ int msm_venc_streamoff(struct msm_vidc_inst *inst, enum v4l2_buf_type i)
		return -EINVAL;
	}
	dprintk(VIDC_DBG, "Calling streamoff on port: %d\n", i);

	rc = msm_comm_try_state(inst, MSM_VIDC_RELEASE_RESOURCES_DONE);
	if (rc)
		dprintk(VIDC_ERR,
			"Failed to move inst: %pK to res done state\n", inst);

	mutex_lock(&q->lock);
	rc = vb2_streamoff(&q->vb2_bufq, i);
	mutex_unlock(&q->lock);
+1 −1
Original line number Diff line number Diff line
@@ -1179,7 +1179,7 @@ static void handle_event_change(enum hal_command_response cmd, void *data)
				__func__, inst, &event_notify->packet_buffer,
				&event_notify->extra_data_buffer);

		if (inst->state == MSM_VIDC_CORE_INVALID ||
		if (inst->state >= MSM_VIDC_STOP ||
				inst->core->state == VIDC_CORE_INVALID) {
			dprintk(VIDC_DBG,
					"Event release buf ref received in invalid state - discard\n");