Lines Matching refs:drm

49 	struct nouveau_drm *drm = nouveau_drm(dev);  in nv10_bo_update_tile_region()  local
50 int i = reg - drm->tile.reg; in nv10_bo_update_tile_region()
51 struct nvkm_device *device = nvxx_device(&drm->device); in nv10_bo_update_tile_region()
69 struct nouveau_drm *drm = nouveau_drm(dev); in nv10_bo_get_tile_region() local
70 struct nouveau_drm_tile *tile = &drm->tile.reg[i]; in nv10_bo_get_tile_region()
72 spin_lock(&drm->tile.lock); in nv10_bo_get_tile_region()
80 spin_unlock(&drm->tile.lock); in nv10_bo_get_tile_region()
88 struct nouveau_drm *drm = nouveau_drm(dev); in nv10_bo_put_tile_region() local
91 spin_lock(&drm->tile.lock); in nv10_bo_put_tile_region()
94 spin_unlock(&drm->tile.lock); in nv10_bo_put_tile_region()
102 struct nouveau_drm *drm = nouveau_drm(dev); in nv10_bo_set_tiling() local
103 struct nvkm_fb *fb = nvxx_fb(&drm->device); in nv10_bo_set_tiling()
131 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_bo_del_ttm() local
132 struct drm_device *dev = drm->dev; in nouveau_bo_del_ttm()
146 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); in nouveau_bo_fixup_align() local
147 struct nvif_device *device = &drm->device; in nouveau_bo_fixup_align()
182 struct nouveau_drm *drm = nouveau_drm(dev); in nouveau_bo_new() local
190 if (drm->client.vm) in nouveau_bo_new()
191 lpg_shift = drm->client.vm->mmu->lpg_shift; in nouveau_bo_new()
195 NV_WARN(drm, "skipped size %x\n", (u32)size); in nouveau_bo_new()
210 nvbo->bo.bdev = &drm->ttm.bdev; in nouveau_bo_new()
212 if (!nvxx_device(&drm->device)->func->cpu_coherent) in nouveau_bo_new()
216 if (drm->client.vm) { in nouveau_bo_new()
218 nvbo->page_shift = drm->client.vm->mmu->lpg_shift; in nouveau_bo_new()
225 acc_size = ttm_bo_dma_acc_size(&drm->ttm.bdev, size, in nouveau_bo_new()
228 ret = ttm_bo_init(&drm->ttm.bdev, &nvbo->bo, size, in nouveau_bo_new()
257 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); in set_placement_range() local
258 u32 vram_pages = drm->device.info.ram_size >> PAGE_SHIFT; in set_placement_range()
261 if (drm->device.info.family == NV_DEVICE_INFO_V0_CELSIUS && in set_placement_range()
310 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); in nouveau_bo_pin() local
319 if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA && in nouveau_bo_pin()
334 NV_ERROR(drm, "bo %p pinned elsewhere: " in nouveau_bo_pin()
365 drm->gem.vram_available -= bo->mem.size; in nouveau_bo_pin()
368 drm->gem.gart_available -= bo->mem.size; in nouveau_bo_pin()
384 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); in nouveau_bo_unpin() local
403 drm->gem.vram_available += bo->mem.size; in nouveau_bo_unpin()
406 drm->gem.gart_available += bo->mem.size; in nouveau_bo_unpin()
456 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); in nouveau_bo_sync_for_device() local
457 struct nvkm_device *device = nvxx_device(&drm->device); in nouveau_bo_sync_for_device()
476 struct nouveau_drm *drm = nouveau_bdev(nvbo->bo.bdev); in nouveau_bo_sync_for_cpu() local
477 struct nvkm_device *device = nvxx_device(&drm->device); in nouveau_bo_sync_for_cpu()
578 struct nouveau_drm *drm = nouveau_bdev(bdev); in nouveau_ttm_tt_create() local
580 if (drm->agp.bridge) { in nouveau_ttm_tt_create()
581 return ttm_agp_tt_create(bdev, drm->agp.bridge, size, in nouveau_ttm_tt_create()
600 struct nouveau_drm *drm = nouveau_bdev(bdev); in nouveau_bo_init_mem_type() local
615 if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { in nouveau_bo_init_mem_type()
617 if (nvxx_bar(&drm->device)->iomap_uncached) { in nouveau_bo_init_mem_type()
630 if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) in nouveau_bo_init_mem_type()
633 if (!drm->agp.bridge) in nouveau_bo_init_mem_type()
638 if (drm->agp.bridge) { in nouveau_bo_init_mem_type()
879 OUT_RING (chan, chan->drm->ntfy.handle); in nv50_bo_move_init()
968 OUT_RING (chan, chan->drm->ntfy.handle); in nv04_bo_move_init()
1030 nouveau_bo_move_prep(struct nouveau_drm *drm, struct ttm_buffer_object *bo, in nouveau_bo_move_prep() argument
1038 ret = nvkm_vm_get(drm->client.vm, size, old_node->page_shift, in nouveau_bo_move_prep()
1043 ret = nvkm_vm_get(drm->client.vm, size, new_node->page_shift, in nouveau_bo_move_prep()
1059 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_bo_move_m2mf() local
1060 struct nouveau_channel *chan = drm->ttm.chan; in nouveau_bo_move_m2mf()
1069 if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { in nouveau_bo_move_m2mf()
1070 ret = nouveau_bo_move_prep(drm, bo, new_mem); in nouveau_bo_move_m2mf()
1078 ret = drm->ttm.move(chan, bo, &bo->mem, new_mem); in nouveau_bo_move_m2mf()
1096 nouveau_bo_move_init(struct nouveau_drm *drm) in nouveau_bo_move_init() argument
1128 chan = drm->cechan; in nouveau_bo_move_init()
1130 chan = drm->channel; in nouveau_bo_move_init()
1137 &drm->ttm.copy); in nouveau_bo_move_init()
1139 ret = mthd->init(chan, drm->ttm.copy.handle); in nouveau_bo_move_init()
1141 nvif_object_fini(&drm->ttm.copy); in nouveau_bo_move_init()
1145 drm->ttm.move = mthd->exec; in nouveau_bo_move_init()
1146 drm->ttm.chan = chan; in nouveau_bo_move_init()
1152 NV_INFO(drm, "MM: using %s for buffer copies\n", name); in nouveau_bo_move_init()
1251 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_bo_vm_bind() local
1252 struct drm_device *dev = drm->dev; in nouveau_bo_vm_bind()
1260 if (drm->device.info.family >= NV_DEVICE_INFO_V0_CELSIUS) { in nouveau_bo_vm_bind()
1274 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_bo_vm_cleanup() local
1275 struct drm_device *dev = drm->dev; in nouveau_bo_vm_cleanup()
1286 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_bo_move() local
1293 NV_WARN(drm, "Moving pinned object %p!\n", nvbo); in nouveau_bo_move()
1295 if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) { in nouveau_bo_move()
1310 if (drm->ttm.move) { in nouveau_bo_move()
1330 if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA) { in nouveau_bo_move()
1352 struct nouveau_drm *drm = nouveau_bdev(bdev); in nouveau_ttm_io_mem_reserve() local
1353 struct nvkm_device *device = nvxx_device(&drm->device); in nouveau_ttm_io_mem_reserve()
1370 if (drm->agp.bridge) { in nouveau_ttm_io_mem_reserve()
1372 mem->bus.base = drm->agp.base; in nouveau_ttm_io_mem_reserve()
1373 mem->bus.is_iomem = !drm->agp.cma; in nouveau_ttm_io_mem_reserve()
1376 if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA || !node->memtype) in nouveau_ttm_io_mem_reserve()
1384 if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA) { in nouveau_ttm_io_mem_reserve()
1385 struct nvkm_bar *bar = nvxx_bar(&drm->device); in nouveau_ttm_io_mem_reserve()
1387 if (drm->device.info.family >= NV_DEVICE_INFO_V0_FERMI) in nouveau_ttm_io_mem_reserve()
1420 struct nouveau_drm *drm = nouveau_bdev(bo->bdev); in nouveau_ttm_fault_reserve_notify() local
1422 struct nvkm_device *device = nvxx_device(&drm->device); in nouveau_ttm_fault_reserve_notify()
1430 if (drm->device.info.family < NV_DEVICE_INFO_V0_TESLA || in nouveau_ttm_fault_reserve_notify()
1445 if (drm->device.info.family >= NV_DEVICE_INFO_V0_TESLA || in nouveau_ttm_fault_reserve_notify()
1467 struct nouveau_drm *drm; in nouveau_ttm_tt_populate() local
1486 drm = nouveau_bdev(ttm->bdev); in nouveau_ttm_tt_populate()
1487 device = nvxx_device(&drm->device); in nouveau_ttm_tt_populate()
1488 dev = drm->dev; in nouveau_ttm_tt_populate()
1495 if (!nvxx_device(&drm->device)->func->cpu_coherent && in nouveau_ttm_tt_populate()
1500 if (drm->agp.bridge) { in nouveau_ttm_tt_populate()
1541 struct nouveau_drm *drm; in nouveau_ttm_tt_unpopulate() local
1551 drm = nouveau_bdev(ttm->bdev); in nouveau_ttm_tt_unpopulate()
1552 device = nvxx_device(&drm->device); in nouveau_ttm_tt_unpopulate()
1553 dev = drm->dev; in nouveau_ttm_tt_unpopulate()
1560 if (!nvxx_device(&drm->device)->func->cpu_coherent && in nouveau_ttm_tt_unpopulate()
1567 if (drm->agp.bridge) { in nouveau_ttm_tt_unpopulate()