| .. | .. |
|---|
| 55 | 55 | * device (ie. the one that belongs to the fd it |
|---|
| 56 | 56 | * opened) |
|---|
| 57 | 57 | */ |
|---|
| 58 | | - if (nvif_device_init(&cli->base.object, 0, NV_DEVICE, |
|---|
| 59 | | - &args, sizeof(args), |
|---|
| 58 | + if (nvif_device_ctor(&cli->base.object, "abi16Device", |
|---|
| 59 | + 0, NV_DEVICE, &args, sizeof(args), |
|---|
| 60 | 60 | &abi16->device) == 0) |
|---|
| 61 | 61 | return cli->abi16; |
|---|
| 62 | 62 | |
|---|
| .. | .. |
|---|
| 114 | 114 | nouveau_abi16_ntfy_fini(struct nouveau_abi16_chan *chan, |
|---|
| 115 | 115 | struct nouveau_abi16_ntfy *ntfy) |
|---|
| 116 | 116 | { |
|---|
| 117 | | - nvif_object_fini(&ntfy->object); |
|---|
| 117 | + nvif_object_dtor(&ntfy->object); |
|---|
| 118 | 118 | nvkm_mm_free(&chan->heap, &ntfy->node); |
|---|
| 119 | 119 | list_del(&ntfy->head); |
|---|
| 120 | 120 | kfree(ntfy); |
|---|
| .. | .. |
|---|
| 139 | 139 | if (chan->ntfy) { |
|---|
| 140 | 140 | nouveau_vma_del(&chan->ntfy_vma); |
|---|
| 141 | 141 | nouveau_bo_unpin(chan->ntfy); |
|---|
| 142 | | - drm_gem_object_put_unlocked(&chan->ntfy->gem); |
|---|
| 142 | + drm_gem_object_put(&chan->ntfy->bo.base); |
|---|
| 143 | 143 | } |
|---|
| 144 | 144 | |
|---|
| 145 | 145 | if (chan->heap.block_size) |
|---|
| .. | .. |
|---|
| 167 | 167 | } |
|---|
| 168 | 168 | |
|---|
| 169 | 169 | /* destroy the device object */ |
|---|
| 170 | | - nvif_device_fini(&abi16->device); |
|---|
| 170 | + nvif_device_dtor(&abi16->device); |
|---|
| 171 | 171 | |
|---|
| 172 | 172 | kfree(cli->abi16); |
|---|
| 173 | 173 | cli->abi16 = NULL; |
|---|
| .. | .. |
|---|
| 245 | 245 | } |
|---|
| 246 | 246 | |
|---|
| 247 | 247 | int |
|---|
| 248 | | -nouveau_abi16_ioctl_setparam(ABI16_IOCTL_ARGS) |
|---|
| 249 | | -{ |
|---|
| 250 | | - return -EINVAL; |
|---|
| 251 | | -} |
|---|
| 252 | | - |
|---|
| 253 | | -int |
|---|
| 254 | 248 | nouveau_abi16_ioctl_channel_alloc(ABI16_IOCTL_ARGS) |
|---|
| 255 | 249 | { |
|---|
| 256 | 250 | struct drm_nouveau_channel_alloc *init = data; |
|---|
| .. | .. |
|---|
| 307 | 301 | |
|---|
| 308 | 302 | /* create channel object and initialise dma and fence management */ |
|---|
| 309 | 303 | ret = nouveau_channel_new(drm, device, init->fb_ctxdma_handle, |
|---|
| 310 | | - init->tt_ctxdma_handle, &chan->chan); |
|---|
| 304 | + init->tt_ctxdma_handle, false, &chan->chan); |
|---|
| 311 | 305 | if (ret) |
|---|
| 312 | 306 | goto done; |
|---|
| 313 | 307 | |
|---|
| .. | .. |
|---|
| 334 | 328 | ret = nouveau_gem_new(cli, PAGE_SIZE, 0, NOUVEAU_GEM_DOMAIN_GART, |
|---|
| 335 | 329 | 0, 0, &chan->ntfy); |
|---|
| 336 | 330 | if (ret == 0) |
|---|
| 337 | | - ret = nouveau_bo_pin(chan->ntfy, TTM_PL_FLAG_TT, false); |
|---|
| 331 | + ret = nouveau_bo_pin(chan->ntfy, NOUVEAU_GEM_DOMAIN_GART, |
|---|
| 332 | + false); |
|---|
| 338 | 333 | if (ret) |
|---|
| 339 | 334 | goto done; |
|---|
| 340 | 335 | |
|---|
| 341 | 336 | if (device->info.family >= NV_DEVICE_INFO_V0_TESLA) { |
|---|
| 342 | | - ret = nouveau_vma_new(chan->ntfy, &cli->vmm, &chan->ntfy_vma); |
|---|
| 337 | + ret = nouveau_vma_new(chan->ntfy, chan->chan->vmm, |
|---|
| 338 | + &chan->ntfy_vma); |
|---|
| 343 | 339 | if (ret) |
|---|
| 344 | 340 | goto done; |
|---|
| 345 | 341 | } |
|---|
| 346 | 342 | |
|---|
| 347 | | - ret = drm_gem_handle_create(file_priv, &chan->ntfy->gem, |
|---|
| 343 | + ret = drm_gem_handle_create(file_priv, &chan->ntfy->bo.base, |
|---|
| 348 | 344 | &init->notifier_handle); |
|---|
| 349 | 345 | if (ret) |
|---|
| 350 | 346 | goto done; |
|---|
| .. | .. |
|---|
| 507 | 503 | list_add(&ntfy->head, &chan->notifiers); |
|---|
| 508 | 504 | |
|---|
| 509 | 505 | client->route = NVDRM_OBJECT_ABI16; |
|---|
| 510 | | - ret = nvif_object_init(&chan->chan->user, init->handle, oclass, |
|---|
| 511 | | - NULL, 0, &ntfy->object); |
|---|
| 506 | + ret = nvif_object_ctor(&chan->chan->user, "abi16EngObj", init->handle, |
|---|
| 507 | + oclass, NULL, 0, &ntfy->object); |
|---|
| 512 | 508 | client->route = NVDRM_OBJECT_NVIF; |
|---|
| 513 | 509 | |
|---|
| 514 | 510 | if (ret) |
|---|
| .. | .. |
|---|
| 563 | 559 | if (drm->agp.bridge) { |
|---|
| 564 | 560 | args.target = NV_DMA_V0_TARGET_AGP; |
|---|
| 565 | 561 | args.access = NV_DMA_V0_ACCESS_RDWR; |
|---|
| 566 | | - args.start += drm->agp.base + chan->ntfy->bo.offset; |
|---|
| 567 | | - args.limit += drm->agp.base + chan->ntfy->bo.offset; |
|---|
| 562 | + args.start += drm->agp.base + chan->ntfy->offset; |
|---|
| 563 | + args.limit += drm->agp.base + chan->ntfy->offset; |
|---|
| 568 | 564 | } else { |
|---|
| 569 | 565 | args.target = NV_DMA_V0_TARGET_VM; |
|---|
| 570 | 566 | args.access = NV_DMA_V0_ACCESS_RDWR; |
|---|
| 571 | | - args.start += chan->ntfy->bo.offset; |
|---|
| 572 | | - args.limit += chan->ntfy->bo.offset; |
|---|
| 567 | + args.start += chan->ntfy->offset; |
|---|
| 568 | + args.limit += chan->ntfy->offset; |
|---|
| 573 | 569 | } |
|---|
| 574 | 570 | |
|---|
| 575 | 571 | client->route = NVDRM_OBJECT_ABI16; |
|---|
| 576 | 572 | client->super = true; |
|---|
| 577 | | - ret = nvif_object_init(&chan->chan->user, info->handle, |
|---|
| 573 | + ret = nvif_object_ctor(&chan->chan->user, "abi16Ntfy", info->handle, |
|---|
| 578 | 574 | NV_DMA_IN_MEMORY, &args, sizeof(args), |
|---|
| 579 | 575 | &ntfy->object); |
|---|
| 580 | 576 | client->super = false; |
|---|