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

Commit 6abe9c4f 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: ignore processing responses in invalid state"

parents 7a4fa3be 6efa3feb
Loading
Loading
Loading
Loading
+11 −3
Original line number Diff line number Diff line
@@ -1175,7 +1175,7 @@ static int __iface_cmdq_write_relaxed(struct venus_hfi_device *device,
	__strict_check(device);

	if (!__core_in_valid_state(device)) {
		dprintk(VIDC_DBG, "%s - fw not in init state\n", __func__);
		dprintk(VIDC_ERR, "%s - fw not in init state\n", __func__);
		result = -EINVAL;
		goto err_q_null;
	}
@@ -2904,8 +2904,6 @@ static void __process_sys_error(struct venus_hfi_device *device)
{
	struct hfi_sfr_struct *vsfr = NULL;

	__set_state(device, VENUS_STATE_DEINIT);

	if (__halt_axi(device))
		dprintk(VIDC_WARN, "Failed to halt AXI after SYS_ERROR\n");

@@ -3163,6 +3161,10 @@ static int __response_handler(struct venus_hfi_device *device)
					"Too many packets in message queue to handle at once, deferring read\n");
			break;
		}

		/* do not read packets after sys error packet */
		if (info->response_type == HAL_SYS_ERROR)
			break;
	}

	if (requeue_pm_work && device->res->sw_power_collapsible) {
@@ -3227,6 +3229,12 @@ static void venus_hfi_core_work_handler(struct work_struct *work)
		struct msm_vidc_cb_info *r = &device->response_pkt[i];
		dprintk(VIDC_DBG, "Processing response %d of %d, type %d\n",
			(i + 1), num_responses, r->response_type);
		if (!__core_in_valid_state(device)) {
			dprintk(VIDC_ERR,
				"Ignore responses from %d to %d as device is in invalid state",
				(i + 1), num_responses);
			break;
		}
		device->callback(r->response_type, &r->response);
	}