Loading drivers/media/platform/msm/npu/npu_host_ipc.c +4 −8 Original line number Diff line number Diff line Loading @@ -217,7 +217,7 @@ static int ipc_queue_read(struct npu_device *npu_dev, */ queue.qhdr_rx_req = 1; *is_tx_req_set = 0; status = -EPERM; status = -EIO; goto exit; } Loading @@ -232,12 +232,8 @@ static int ipc_queue_read(struct npu_device *npu_dev, target_que, packet_size); if (packet_size == 0) { status = -EPERM; goto exit; } if (packet_size > NPU_IPC_BUF_LENGTH) { if ((packet_size == 0) || (packet_size > NPU_IPC_BUF_LENGTH)) { NPU_ERR("Invalid packet size %d\n", packet_size); status = -EINVAL; goto exit; Loading Loading @@ -313,7 +309,7 @@ static int ipc_queue_write(struct npu_device *npu_dev, packet_size = (*(uint32_t *)packet); if (packet_size == 0) { /* assign failed status and return */ status = -EPERM; status = -EINVAL; goto exit; } Loading drivers/media/platform/msm/npu/npu_mgr.c +8 −9 Original line number Diff line number Diff line Loading @@ -154,11 +154,10 @@ static int load_fw_nolock(struct npu_device *npu_dev, bool enable) } /* 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)) { ret = -EPERM; ret = wait_for_status_ready(npu_dev, REG_NPU_FW_CTRL_STATUS, FW_CTRL_STATUS_MAIN_THREAD_READY_VAL, false); if (ret) goto load_fw_fail; } npu_host_ipc_post_init(npu_dev); NPU_DBG("firmware init complete\n"); Loading Loading @@ -527,7 +526,7 @@ static int npu_notify_fw_pwr_state(struct npu_device *npu_dev, reg_val = REGR(npu_dev, REG_NPU_FW_CTRL_STATUS); if (reg_val & FW_CTRL_STATUS_PWR_NOTIFY_ERR_VAL) { NPU_ERR("NOTIfY_PWR failed\n"); ret = -EPERM; ret = -EIO; } } } Loading Loading @@ -691,7 +690,7 @@ int npu_host_init(struct npu_device *npu_dev) host_ctx->wq_pri = alloc_workqueue("npu_ipc_wq", WQ_HIGHPRI | WQ_UNBOUND, 0); if (!host_ctx->wq || !host_ctx->wq_pri) { ret = -EPERM; ret = -ENOMEM; goto fail; } else { INIT_WORK(&host_ctx->ipc_irq_work, npu_ipc_irq_work); Loading Loading @@ -918,10 +917,10 @@ static int host_error_hdlr(struct npu_device *npu_dev, bool force) 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)) { ret = wait_for_status_ready(npu_dev, REG_NPU_FW_CTRL_STATUS, FW_CTRL_STATUS_MAIN_THREAD_READY_VAL, false); if (ret) { NPU_ERR("wait for fw status ready timedout\n"); ret = -EPERM; goto fw_start_done; } Loading Loading
drivers/media/platform/msm/npu/npu_host_ipc.c +4 −8 Original line number Diff line number Diff line Loading @@ -217,7 +217,7 @@ static int ipc_queue_read(struct npu_device *npu_dev, */ queue.qhdr_rx_req = 1; *is_tx_req_set = 0; status = -EPERM; status = -EIO; goto exit; } Loading @@ -232,12 +232,8 @@ static int ipc_queue_read(struct npu_device *npu_dev, target_que, packet_size); if (packet_size == 0) { status = -EPERM; goto exit; } if (packet_size > NPU_IPC_BUF_LENGTH) { if ((packet_size == 0) || (packet_size > NPU_IPC_BUF_LENGTH)) { NPU_ERR("Invalid packet size %d\n", packet_size); status = -EINVAL; goto exit; Loading Loading @@ -313,7 +309,7 @@ static int ipc_queue_write(struct npu_device *npu_dev, packet_size = (*(uint32_t *)packet); if (packet_size == 0) { /* assign failed status and return */ status = -EPERM; status = -EINVAL; goto exit; } Loading
drivers/media/platform/msm/npu/npu_mgr.c +8 −9 Original line number Diff line number Diff line Loading @@ -154,11 +154,10 @@ static int load_fw_nolock(struct npu_device *npu_dev, bool enable) } /* 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)) { ret = -EPERM; ret = wait_for_status_ready(npu_dev, REG_NPU_FW_CTRL_STATUS, FW_CTRL_STATUS_MAIN_THREAD_READY_VAL, false); if (ret) goto load_fw_fail; } npu_host_ipc_post_init(npu_dev); NPU_DBG("firmware init complete\n"); Loading Loading @@ -527,7 +526,7 @@ static int npu_notify_fw_pwr_state(struct npu_device *npu_dev, reg_val = REGR(npu_dev, REG_NPU_FW_CTRL_STATUS); if (reg_val & FW_CTRL_STATUS_PWR_NOTIFY_ERR_VAL) { NPU_ERR("NOTIfY_PWR failed\n"); ret = -EPERM; ret = -EIO; } } } Loading Loading @@ -691,7 +690,7 @@ int npu_host_init(struct npu_device *npu_dev) host_ctx->wq_pri = alloc_workqueue("npu_ipc_wq", WQ_HIGHPRI | WQ_UNBOUND, 0); if (!host_ctx->wq || !host_ctx->wq_pri) { ret = -EPERM; ret = -ENOMEM; goto fail; } else { INIT_WORK(&host_ctx->ipc_irq_work, npu_ipc_irq_work); Loading Loading @@ -918,10 +917,10 @@ static int host_error_hdlr(struct npu_device *npu_dev, bool force) 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)) { ret = wait_for_status_ready(npu_dev, REG_NPU_FW_CTRL_STATUS, FW_CTRL_STATUS_MAIN_THREAD_READY_VAL, false); if (ret) { NPU_ERR("wait for fw status ready timedout\n"); ret = -EPERM; goto fw_start_done; } Loading