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

Commit 1fd02e66 authored by Jilai Wang's avatar Jilai Wang
Browse files

Revert "msm: npu: allow IPC commands to be interrupted by signal"



This reverts commit cd038fc1.

Change-Id: Id30fd193b47c9d4c51c768641fa42091717404e5
Signed-off-by: default avatarJilai Wang <jilaiw@codeaurora.org>
parent 2df7c68f
Loading
Loading
Loading
Loading
+4 −19
Original line number Diff line number Diff line
@@ -1775,7 +1775,7 @@ int32_t npu_host_load_network_v2(struct npu_client *client,

	mutex_unlock(&host_ctx->lock);

	ret = wait_for_completion_interruptible_timeout(
	ret = wait_for_completion_timeout(
		&network->cmd_done,
		(host_ctx->fw_dbg_mode & FW_DBG_MODE_INC_TIMEOUT) ?
		NW_DEBUG_TIMEOUT : NW_CMD_TIMEOUT);
@@ -1786,9 +1786,6 @@ int32_t npu_host_load_network_v2(struct npu_client *client,
		NPU_ERR("npu: NPU_IPC_CMD_LOAD time out\n");
		ret = -ETIMEDOUT;
		goto error_load_network;
	} else if (ret < 0) {
		NPU_ERR("NPU_IPC_CMD_LOAD_V2 is interrupted by signal\n");
		goto error_free_network;
	}

	if (network->fw_error) {
@@ -1892,7 +1889,7 @@ int32_t npu_host_unload_network(struct npu_client *client,

	mutex_unlock(&host_ctx->lock);

	ret = wait_for_completion_interruptible_timeout(
	ret = wait_for_completion_timeout(
		&network->cmd_done,
		(host_ctx->fw_dbg_mode & FW_DBG_MODE_INC_TIMEOUT) ?
		NW_DEBUG_TIMEOUT : NW_CMD_TIMEOUT);
@@ -1904,10 +1901,6 @@ int32_t npu_host_unload_network(struct npu_client *client,
		network->cmd_pending = false;
		ret = -ETIMEDOUT;
		goto free_network;
	} else if (ret < 0) {
		NPU_ERR("Wait for unload done interrupted by signal\n");
		network->cmd_pending = false;
		goto free_network;
	}

	if (network->fw_error) {
@@ -2022,7 +2015,7 @@ int32_t npu_host_exec_network(struct npu_client *client,

	mutex_unlock(&host_ctx->lock);

	ret = wait_for_completion_interruptible_timeout(
	ret = wait_for_completion_timeout(
		&network->cmd_done,
		(host_ctx->fw_dbg_mode & FW_DBG_MODE_INC_TIMEOUT) ?
		NW_DEBUG_TIMEOUT : NW_CMD_TIMEOUT);
@@ -2035,10 +2028,6 @@ int32_t npu_host_exec_network(struct npu_client *client,
		network->cmd_pending = false;
		ret = -ETIMEDOUT;
		goto exec_done;
	} else if (ret == -ERESTARTSYS) {
		NPU_ERR("Wait for execution done interrupted by signal\n");
		network->cmd_pending = false;
		goto exec_done;
	}

	if (network->fw_error) {
@@ -2160,7 +2149,7 @@ int32_t npu_host_exec_network_v2(struct npu_client *client,

	mutex_unlock(&host_ctx->lock);

	ret = wait_for_completion_interruptible_timeout(
	ret = wait_for_completion_timeout(
		&network->cmd_done,
		(host_ctx->fw_dbg_mode & FW_DBG_MODE_INC_TIMEOUT) ?
		NW_DEBUG_TIMEOUT : NW_CMD_TIMEOUT);
@@ -2173,10 +2162,6 @@ int32_t npu_host_exec_network_v2(struct npu_client *client,
		network->cmd_pending = false;
		ret = -ETIMEDOUT;
		goto free_exec_packet;
	} else if (ret == -ERESTARTSYS) {
		NPU_ERR("Wait for execution_v2 done interrupted by signal\n");
		network->cmd_pending = false;
		goto free_exec_packet;
	}

	if (network->fw_error) {