Line data Source code
1 : /**
2 : * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4 : * CANN Open Software License Agreement Version 2.0 (the "License").
5 : * Please refer to the License for details. You may not use this file except in compliance with the License.
6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 : * See LICENSE in the root of the software repository for the full text of the License.
9 : */
10 :
11 : #ifndef RS_UB_JETTY_H
12 : #define RS_UB_JETTY_H
13 :
14 : #include "urma_types.h"
15 : #include "udma_u_ctl.h"
16 : #include "dl_hal_function.h"
17 : #include "rs_ctx_inner.h"
18 :
19 : #define WQEBB_NUM_PER_SQE 4ULL
20 : #define ALIGN_DOWN(x, a) ((x) & (~((a) - 1)))
21 :
22 0 : static inline bool RsIsCcuJetty(int jettyMode)
23 : {
24 0 : return (jettyMode == JETTY_MODE_CCU) || (jettyMode == JETTY_MODE_CCU_TA_CACHE);
25 : }
26 :
27 : void RsUbCtxExtJettyCreate(struct RsCtxJettyCb *jettyCb, urma_jetty_cfg_t *jettyCfg);
28 : void RsUbCtxExtJettyDelete(struct RsCtxJettyCb *jettyCb);
29 : void RsUbVaMunmapBatch(struct RsCtxJettyCb **jettyCbArr, unsigned int num);
30 : void RsUbFreeJettyIdBatch(struct RsCtxJettyCb **jettyCbArr, unsigned int num);
31 : #endif // RS_UB_JETTY_H
|