summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
index 11ccee875ed7..d968bcdfa90d 100644
--- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
+++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
@@ -876,19 +876,17 @@ gm107_grctx_generate_r419e00(struct gf100_gr *gr)
}
void
-gm107_grctx_generate_bundle(struct gf100_grctx *info)
+gm107_grctx_generate_bundle(struct gf100_gr_chan *chan, u64 addr, u32 size)
{
- const struct gf100_grctx_func *grctx = info->gr->func->grctx;
- const u32 state_limit = min(grctx->bundle_min_gpm_fifo_depth,
- grctx->bundle_size / 0x20);
+ const struct gf100_grctx_func *grctx = chan->gr->func->grctx;
+ const u32 state_limit = min(grctx->bundle_min_gpm_fifo_depth, size / 0x20);
const u32 token_limit = grctx->bundle_token_limit;
- const int s = 8;
- const int b = mmio_vram(info, grctx->bundle_size, (1 << s), true);
- mmio_refn(info, 0x408004, 0x00000000, s, b);
- mmio_wr32(info, 0x408008, 0x80000000 | (grctx->bundle_size >> s));
- mmio_refn(info, 0x418e24, 0x00000000, s, b);
- mmio_wr32(info, 0x418e28, 0x80000000 | (grctx->bundle_size >> s));
- mmio_wr32(info, 0x4064c8, (state_limit << 16) | token_limit);
+
+ gf100_grctx_patch_wr32(chan, 0x408004, addr >> 8);
+ gf100_grctx_patch_wr32(chan, 0x408008, 0x80000000 | (size >> 8));
+ gf100_grctx_patch_wr32(chan, 0x418e24, addr >> 8);
+ gf100_grctx_patch_wr32(chan, 0x418e28, 0x80000000 | (size >> 8));
+ gf100_grctx_patch_wr32(chan, 0x4064c8, (state_limit << 16) | token_limit);
}
void