diff options
Diffstat (limited to 'drivers/accel/amdxdna/aie2_message.c')
| -rw-r--r-- | drivers/accel/amdxdna/aie2_message.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/accel/amdxdna/aie2_message.c b/drivers/accel/amdxdna/aie2_message.c index b4c49259a1a2..56b919b350ac 100644 --- a/drivers/accel/amdxdna/aie2_message.c +++ b/drivers/accel/amdxdna/aie2_message.c @@ -261,8 +261,9 @@ int aie2_create_context(struct amdxdna_dev_hdl *ndev, struct amdxdna_hwctx *hwct goto del_ctx_req; } + /* +1 for the config_cu message that can be in-flight concurrently */ ret = xdna_mailbox_start_channel(hwctx->priv->mbox_chann, &x2i, &i2x, - intr_reg, ret); + intr_reg, ret, HWCTX_MAX_CMDS + 1); if (ret) { XDNA_ERR(xdna, "Not able to create channel"); ret = -EINVAL; @@ -277,6 +278,7 @@ int aie2_create_context(struct amdxdna_dev_hdl *ndev, struct amdxdna_hwctx *hwct free_channel: xdna_mailbox_free_channel(hwctx->priv->mbox_chann); + hwctx->priv->mbox_chann = NULL; del_ctx_req: aie2_destroy_context_req(ndev, hwctx->fw_ctx_id); return ret; @@ -485,7 +487,7 @@ int aie2_register_asyn_event_msg(struct amdxdna_dev_hdl *ndev, dma_addr_t addr, req.buf_size = size; XDNA_DBG(ndev->aie.xdna, "Register addr 0x%llx size 0x%x", addr, size); - return xdna_mailbox_send_msg(ndev->aie.mgmt_chann, &msg, TX_TIMEOUT); + return xdna_mailbox_send_msg(ndev->aie.mgmt_chann, &msg); } int aie2_config_cu(struct amdxdna_hwctx *hwctx, @@ -544,7 +546,8 @@ int aie2_config_cu(struct amdxdna_hwctx *hwctx, msg.handle = hwctx; msg.opcode = MSG_OP_CONFIG_CU; msg.notify_cb = notify_cb; - return xdna_mailbox_send_msg(chann, &msg, TX_TIMEOUT); + + return xdna_mailbox_send_msg(chann, &msg); } static int aie2_init_exec_cu_req(struct amdxdna_gem_obj *cmd_bo, void *req, @@ -949,7 +952,7 @@ int aie2_execbuf(struct amdxdna_hwctx *hwctx, struct amdxdna_sched_job *job, print_hex_dump_debug("cmd: ", DUMP_PREFIX_OFFSET, 16, 4, &req, 0x40, false); - ret = xdna_mailbox_send_msg(chann, &msg, TX_TIMEOUT); + ret = xdna_mailbox_send_msg(chann, &msg); if (ret) { XDNA_ERR(xdna, "Send message failed"); return ret; @@ -1038,7 +1041,7 @@ int aie2_cmdlist_multi_execbuf(struct amdxdna_hwctx *hwctx, msg.send_size = sizeof(req); print_hex_dump_debug("cmdlist msg: ", DUMP_PREFIX_OFFSET, 16, 4, &req, msg.send_size, false); - ret = xdna_mailbox_send_msg(chann, &msg, TX_TIMEOUT); + ret = xdna_mailbox_send_msg(chann, &msg); if (ret) { XDNA_ERR(xdna, "Send message failed"); return ret; @@ -1085,7 +1088,7 @@ int aie2_cmdlist_single_execbuf(struct amdxdna_hwctx *hwctx, msg.send_size = sizeof(req); print_hex_dump_debug("cmdlist msg: ", DUMP_PREFIX_OFFSET, 16, 4, &req, msg.send_size, false); - ret = xdna_mailbox_send_msg(chann, &msg, TX_TIMEOUT); + ret = xdna_mailbox_send_msg(chann, &msg); if (ret) { XDNA_ERR(hwctx->client->xdna, "Send message failed"); return ret; @@ -1121,7 +1124,7 @@ int aie2_sync_bo(struct amdxdna_hwctx *hwctx, struct amdxdna_sched_job *job, msg.send_size = sizeof(req); msg.opcode = MSG_OP_SYNC_BO; - ret = xdna_mailbox_send_msg(chann, &msg, TX_TIMEOUT); + ret = xdna_mailbox_send_msg(chann, &msg); if (ret) { XDNA_ERR(xdna, "Send message failed"); return ret; @@ -1156,7 +1159,7 @@ int aie2_config_debug_bo(struct amdxdna_hwctx *hwctx, struct amdxdna_sched_job * msg.send_size = sizeof(req); msg.opcode = MSG_OP_CONFIG_DEBUG_BO; - return xdna_mailbox_send_msg(chann, &msg, TX_TIMEOUT); + return xdna_mailbox_send_msg(chann, &msg); } int aie2_query_app_health(struct amdxdna_dev_hdl *ndev, u32 context_id, |
