Loading drivers/media/platform/msm/npu_v2/npu_mgr.c +16 −2 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ static int wait_npu_cpc_power_off(struct npu_device *npu_dev) { uint32_t reg_val = NPU_CPC_PWR_ON; uint32_t wait_cnt = 0, max_wait_ms; struct npu_host_ctx *host_ctx = &npu_dev->host_ctx; max_wait_ms = NPU_FW_TIMEOUT_MS; Loading @@ -114,6 +115,12 @@ static int wait_npu_cpc_power_off(struct npu_device *npu_dev) break; } if ((host_ctx->wdg_irq_sts != 0) || (host_ctx->err_irq_sts != 0)) { NPU_WARN("fw is in bad state, skip wait\n"); return -EIO; } wait_cnt += NPU_FW_TIMEOUT_POLL_INTERVAL_MS; if (wait_cnt > max_wait_ms) { NPU_ERR("timeout wait for cpc power off\n"); Loading Loading @@ -913,6 +920,9 @@ static int host_error_hdlr(struct npu_device *npu_dev, bool force) goto fw_start_done; } host_ctx->wdg_irq_sts = 0; host_ctx->err_irq_sts = 0; /* Keep reading ctrl status until NPU is ready */ if (wait_for_status_ready(npu_dev, REG_NPU_FW_CTRL_STATUS, FW_CTRL_STATUS_MAIN_THREAD_READY_VAL, false)) { Loading @@ -939,8 +949,6 @@ static int host_error_hdlr(struct npu_device *npu_dev, bool force) } complete(&host_ctx->fw_deinit_done); host_ctx->wdg_irq_sts = 0; host_ctx->err_irq_sts = 0; /* flush all pending npu cmds */ for (i = 0; i < MAX_LOADED_NETWORK; i++) { Loading Loading @@ -1151,6 +1159,12 @@ static int wait_for_status_ready(struct npu_device *npu_dev, return -ETIMEDOUT; } if ((host_ctx->wdg_irq_sts != 0) || (host_ctx->err_irq_sts != 0)) { NPU_WARN("fw is in bad state, skip wait\n"); return -EIO; } if (poll) udelay(100); else Loading Loading
drivers/media/platform/msm/npu_v2/npu_mgr.c +16 −2 Original line number Diff line number Diff line Loading @@ -104,6 +104,7 @@ static int wait_npu_cpc_power_off(struct npu_device *npu_dev) { uint32_t reg_val = NPU_CPC_PWR_ON; uint32_t wait_cnt = 0, max_wait_ms; struct npu_host_ctx *host_ctx = &npu_dev->host_ctx; max_wait_ms = NPU_FW_TIMEOUT_MS; Loading @@ -114,6 +115,12 @@ static int wait_npu_cpc_power_off(struct npu_device *npu_dev) break; } if ((host_ctx->wdg_irq_sts != 0) || (host_ctx->err_irq_sts != 0)) { NPU_WARN("fw is in bad state, skip wait\n"); return -EIO; } wait_cnt += NPU_FW_TIMEOUT_POLL_INTERVAL_MS; if (wait_cnt > max_wait_ms) { NPU_ERR("timeout wait for cpc power off\n"); Loading Loading @@ -913,6 +920,9 @@ static int host_error_hdlr(struct npu_device *npu_dev, bool force) goto fw_start_done; } host_ctx->wdg_irq_sts = 0; host_ctx->err_irq_sts = 0; /* Keep reading ctrl status until NPU is ready */ if (wait_for_status_ready(npu_dev, REG_NPU_FW_CTRL_STATUS, FW_CTRL_STATUS_MAIN_THREAD_READY_VAL, false)) { Loading @@ -939,8 +949,6 @@ static int host_error_hdlr(struct npu_device *npu_dev, bool force) } complete(&host_ctx->fw_deinit_done); host_ctx->wdg_irq_sts = 0; host_ctx->err_irq_sts = 0; /* flush all pending npu cmds */ for (i = 0; i < MAX_LOADED_NETWORK; i++) { Loading Loading @@ -1151,6 +1159,12 @@ static int wait_for_status_ready(struct npu_device *npu_dev, return -ETIMEDOUT; } if ((host_ctx->wdg_irq_sts != 0) || (host_ctx->err_irq_sts != 0)) { NPU_WARN("fw is in bad state, skip wait\n"); return -EIO; } if (poll) udelay(100); else Loading