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

Commit e64e4e79 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: npu: Don't allow RSC handshake to be interrupted"

parents 09e15d63 fb1d6cda
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -394,20 +394,20 @@ int npu_enable_core_power(struct npu_device *npu_dev)
	mutex_lock(&npu_dev->dev_lock);
	NPU_DBG("Enable core power %d\n", pwr->pwr_vote_num);
	if (!pwr->pwr_vote_num) {
		ret = npu_enable_regulators(npu_dev);
		ret = npu_set_bw(npu_dev, 100, 100);
		if (ret)
			goto fail;

		ret = npu_set_bw(npu_dev, 100, 100);
		ret = npu_enable_regulators(npu_dev);
		if (ret) {
			npu_disable_regulators(npu_dev);
			npu_set_bw(npu_dev, 0, 0);
			goto fail;
		}

		ret = npu_enable_core_clocks(npu_dev);
		if (ret) {
			npu_set_bw(npu_dev, 0, 0);
			npu_disable_regulators(npu_dev);
			npu_set_bw(npu_dev, 0, 0);
			goto fail;
		}
		npu_resume_devbw(npu_dev);
@@ -434,8 +434,8 @@ void npu_disable_core_power(struct npu_device *npu_dev)
	if (!pwr->pwr_vote_num) {
		npu_suspend_devbw(npu_dev);
		npu_disable_core_clocks(npu_dev);
		npu_set_bw(npu_dev, 0, 0);
		npu_disable_regulators(npu_dev);
		npu_set_bw(npu_dev, 0, 0);
		pwr->active_pwrlevel = pwr->default_pwrlevel;
		pwr->uc_pwrlevel = pwr->max_pwrlevel;
		pwr->cdsprm_pwrlevel = pwr->max_pwrlevel;
+3 −3
Original line number Diff line number Diff line
@@ -312,7 +312,7 @@ static int enable_fw_nolock(struct npu_device *npu_dev)
		goto notify_fw_pwr_fail;
	}

	ret = wait_for_completion_interruptible_timeout(
	ret = wait_for_completion_timeout(
		&host_ctx->fw_bringup_done, NW_CMD_TIMEOUT);
	if (!ret) {
		NPU_ERR("Wait for fw bringup timedout\n");
@@ -388,7 +388,7 @@ static void disable_fw_nolock(struct npu_device *npu_dev)
	}

	if (!host_ctx->auto_pil_disable) {
		ret = wait_for_completion_interruptible_timeout(
		ret = wait_for_completion_timeout(
			&host_ctx->fw_shutdown_done, NW_CMD_TIMEOUT);
		if (!ret)
			NPU_ERR("Wait for fw shutdown timedout\n");
@@ -1613,7 +1613,7 @@ int32_t npu_host_unmap_buf(struct npu_client *client,
	 * fw is disabled
	 */
	if (host_ctx->fw_error && (host_ctx->fw_state == FW_ENABLED) &&
		!wait_for_completion_interruptible_timeout(
		!wait_for_completion_timeout(
		&host_ctx->fw_deinit_done, NW_CMD_TIMEOUT))
		NPU_WARN("npu: wait for fw_deinit_done time out\n");