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

Commit 29111f11 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: Don't report unsupported bitstreams as hardware errors"

parents 7af2265a fa10e48f
Loading
Loading
Loading
Loading
+13 −12
Original line number Diff line number Diff line
@@ -1170,6 +1170,7 @@ static void handle_session_error(enum hal_command_response cmd, void *data)
	struct msm_vidc_cb_cmd_done *response = data;
	struct hfi_device *hdev = NULL;
	struct msm_vidc_inst *inst = NULL;
	int event = V4L2_EVENT_MSM_VIDC_SYS_ERROR;

	if (!response) {
		dprintk(VIDC_ERR,
@@ -1189,27 +1190,27 @@ static void handle_session_error(enum hal_command_response cmd, void *data)
	change_inst_state(inst, MSM_VIDC_CORE_INVALID);

	if (response->status == VIDC_ERR_MAX_CLIENTS) {
		dprintk(VIDC_WARN,
			"send max clients reached error to client: %p\n",
			inst);
		msm_vidc_queue_v4l2_event(inst,
			V4L2_EVENT_MSM_VIDC_MAX_CLIENTS);
		dprintk(VIDC_WARN, "Too many clients, rejecting %p", inst);
		event = V4L2_EVENT_MSM_VIDC_MAX_CLIENTS;

		/* Clean the HFI session now. Since inst->state is moved to
		 * INVLAID, forward thread doesn't know FW has valid session
		/*
		 * Clean the HFI session now. Since inst->state is moved to
		 * INVALID, forward thread doesn't know FW has valid session
		 * or not. This is the last place driver knows that there is
		 * no session in FW. Hence clean HFI session now.
		 */

		msm_comm_session_clean(inst);
	} else if (response->status == VIDC_ERR_NOT_SUPPORTED) {
		dprintk(VIDC_WARN, "Unsupported bitstream in %p", inst);
		event = V4L2_EVENT_MSM_VIDC_HW_UNSUPPORTED;
	} else {
		dprintk(VIDC_ERR,
			"send session error to client: %p\n",
			inst);
		msm_vidc_queue_v4l2_event(inst,
			V4L2_EVENT_MSM_VIDC_SYS_ERROR);
		dprintk(VIDC_WARN, "Unknown session error (%d) for %p\n",
				response->status, inst);
		event = V4L2_EVENT_MSM_VIDC_SYS_ERROR;
	}

	msm_vidc_queue_v4l2_event(inst, event);
	put_inst(inst);
}