hc
2024-05-10 61598093bbdd283a7edc367d900f223070ead8d2
kernel/drivers/gpu/drm/nouveau/nv50_fence.c
....@@ -37,7 +37,7 @@
3737 {
3838 struct nv10_fence_priv *priv = chan->drm->fence;
3939 struct nv10_fence_chan *fctx;
40
- struct ttm_mem_reg *reg = &priv->bo->bo.mem;
40
+ struct ttm_resource *reg = &priv->bo->bo.mem;
4141 u32 start = reg->start * PAGE_SIZE;
4242 u32 limit = start + reg->size - 1;
4343 int ret;
....@@ -51,7 +51,8 @@
5151 fctx->base.read = nv10_fence_read;
5252 fctx->base.sync = nv17_fence_sync;
5353
54
- ret = nvif_object_init(&chan->user, NvSema, NV_DMA_IN_MEMORY,
54
+ ret = nvif_object_ctor(&chan->user, "fenceCtxDma", NvSema,
55
+ NV_DMA_IN_MEMORY,
5556 &(struct nv_dma_v0) {
5657 .target = NV_DMA_V0_TARGET_VRAM,
5758 .access = NV_DMA_V0_ACCESS_RDWR,
....@@ -80,10 +81,11 @@
8081 priv->base.context_del = nv10_fence_context_del;
8182 spin_lock_init(&priv->lock);
8283
83
- ret = nouveau_bo_new(&drm->client, 4096, 0x1000, TTM_PL_FLAG_VRAM,
84
+ ret = nouveau_bo_new(&drm->client, 4096, 0x1000,
85
+ NOUVEAU_GEM_DOMAIN_VRAM,
8486 0, 0x0000, NULL, NULL, &priv->bo);
8587 if (!ret) {
86
- ret = nouveau_bo_pin(priv->bo, TTM_PL_FLAG_VRAM, false);
88
+ ret = nouveau_bo_pin(priv->bo, NOUVEAU_GEM_DOMAIN_VRAM, false);
8789 if (!ret) {
8890 ret = nouveau_bo_map(priv->bo);
8991 if (ret)