Lines Matching +full:mode +full:- +full:flag

1 /* SPDX-License-Identifier: MIT */
12 } mode; member
27 u32 *ctxprog = ctx->ucode; in cp_out()
29 if (ctx->mode != NVKM_GRCTX_PROG) in cp_out()
32 BUG_ON(ctx->ctxprog_len == ctx->ctxprog_max); in cp_out()
33 ctxprog[ctx->ctxprog_len++] = inst; in cp_out()
45 ctx->ctxprog_reg = (reg - 0x00400000) >> 2; in cp_ctx()
47 ctx->ctxvals_base = ctx->ctxvals_pos; in cp_ctx()
48 ctx->ctxvals_pos = ctx->ctxvals_base + length; in cp_ctx()
55 cp_out(ctx, CP_CTX | (length << CP_CTX_COUNT_SHIFT) | ctx->ctxprog_reg); in cp_ctx()
61 u32 *ctxprog = ctx->ucode; in cp_name()
64 if (ctx->mode != NVKM_GRCTX_PROG) in cp_name()
67 ctx->ctxprog_label[name] = ctx->ctxprog_len; in cp_name()
68 for (i = 0; i < ctx->ctxprog_len; i++) { in cp_name()
74 (ctx->ctxprog_len << CP_BRA_IP_SHIFT); in cp_name()
79 _cp_bra(struct nvkm_grctx *ctx, u32 mod, int flag, int state, int name) in _cp_bra() argument
84 ip = ctx->ctxprog_label[name] << CP_BRA_IP_SHIFT; in _cp_bra()
89 cp_out(ctx, CP_BRA | (mod << 18) | ip | flag | in _cp_bra()
97 _cp_wait(struct nvkm_grctx *ctx, int flag, int state) in _cp_wait() argument
99 cp_out(ctx, CP_WAIT | flag | (state ? CP_WAIT_SET : 0)); in _cp_wait()
104 _cp_set(struct nvkm_grctx *ctx, int flag, int state) in _cp_set() argument
106 cp_out(ctx, CP_SET | flag | (state ? CP_SET_1 : 0)); in _cp_set()
113 ctx->ctxvals_pos = offset; in cp_pos()
114 ctx->ctxvals_base = ctx->ctxvals_pos; in cp_pos()
116 cp_lsr(ctx, ctx->ctxvals_pos); in cp_pos()
123 if (ctx->mode != NVKM_GRCTX_VALS) in gr_def()
126 reg = (reg - 0x00400000) / 4; in gr_def()
127 reg = (reg - ctx->ctxprog_reg) + ctx->ctxvals_base; in gr_def()
129 nvkm_wo32(ctx->data, reg * 4, val); in gr_def()